From 77cb141e467e64bd51fd28e130af35f545f7e9a0 Mon Sep 17 00:00:00 2001 From: insistence <3055204202@qq.com> Date: Sat, 5 Dec 2026 21:44:06 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E5=B0=86=E5=89=8D=E7=AB=AF=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=BF=81=E7=A7=BB=E8=87=B3=20Vitest=20=E5=92=8C?= =?UTF-8?q?=E4=B8=A5=E6=A0=BC=20TypeScript=EF=BC=8C=E5=88=86=E7=AB=AF?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=20ESLint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 迁移六个主应用和两个插件示例的测试,按框架在各端独立配置 ESLint。同步插件脚手架生成的用例与 CI 测试入口,并在六端执行测试类型检查和跨时区契约验证。 --- .github/scripts/ci_plan.py | 6 +- .github/tests/test_ci_contracts.py | 13 +- .github/tests/test_ci_plan.py | 16 +- .github/workflows/ci-frontend.yml | 21 +- .github/workflows/ci-integration.yml | 14 +- README.md | 4 + .../cli/runtime/plugin/scaffold/backend.py | 4 +- .../cli/runtime/plugin/scaffold/builder.py | 2 +- .../cli/runtime/plugin/scaffold/frontend.py | 24 +- .../runtime/plugin/scaffold/frontend_react.py | 24 +- .../runtime/plugin/scaffold/frontend_vue2.py | 22 +- .../cli/runtime/plugin/support.py | 12 +- .../examples/python/bundle_demo/README.md | 3 + .../python/bundle_demo/web/dev/mockRequest.js | 9 +- .../python/bundle_demo/web/eslint.config.mjs | 25 + .../python/bundle_demo/web/package.json | 15 +- .../python/bundle_demo/web/pnpm-lock.yaml | 1080 ++++++ .../bundle_demo/web/tests/mockRequest.test.ts | 28 + .../python/bundle_demo/web/tsconfig.test.json | 13 + .../examples/python/task_demo/README.md | 2 + .../python/task_demo/web/dev/mockRequest.js | 1 + .../python/task_demo/web/eslint.config.mjs | 33 + .../python/task_demo/web/package.json | 14 +- .../python/task_demo/web/pnpm-lock.yaml | 1080 ++++++ .../task_demo/web/tests/mockRequest.test.js | 92 - .../task_demo/web/tests/mockRequest.test.ts | 107 + .../python/task_demo/web/tsconfig.test.json | 13 + .../python/task_demo/web/vitest.config.ts | 5 + .../plugin/test_runtime_react_scaffold.py | 7 +- .../runtime/plugin/test_runtime_scaffold.py | 16 +- .../runtime/plugin/test_runtime_testing.py | 13 +- ruoyi-fastapi-frontend/react/mobile/README.md | 8 +- .../react/mobile/eslint.config.mjs | 43 + .../react/mobile/package.json | 22 +- .../react/mobile/pnpm-lock.yaml | 1420 +++++++- .../react/mobile/src/plugins/modal.ts | 2 +- ...atar-crop.test.mjs => avatar-crop.test.ts} | 34 +- .../mobile/tests/i18n/bootstrap.test.mjs | 118 - .../react/mobile/tests/i18n/bootstrap.test.ts | 130 + ...-locale.test.mjs => native-locale.test.ts} | 57 +- .../react/mobile/tests/i18n/protocol.test.mjs | 226 -- .../react/mobile/tests/i18n/protocol.test.ts | 264 ++ .../{runtime.test.mjs => runtime.test.ts} | 141 +- .../i18n/{x18n.test.mjs => x18n.test.ts} | 33 +- .../tests/{logout.test.mjs => logout.test.ts} | 7 +- ...-styles.test.mjs => native-styles.test.ts} | 38 +- ...e-params.test.mjs => route-params.test.ts} | 19 +- .../mobile/tests/time-polyfill.test.ts} | 8 +- .../mobile/tests/time.test.ts} | 5 +- ...ne-data.test.mjs => timezone-data.test.ts} | 15 +- ...forge.test.mjs => transport-forge.test.ts} | 27 +- .../react/mobile/tsconfig.node.json | 2 +- .../react/mobile/tsconfig.tests.json | 12 + .../react/mobile/vitest.config.mts | 36 + ruoyi-fastapi-frontend/react/web/README.md | 11 +- .../react/web/eslint.config.mjs | 42 + ruoyi-fastapi-frontend/react/web/package.json | 34 +- .../react/web/pnpm-lock.yaml | 1084 +++++- .../views/auth-center/interactionSecurity.ts | 4 +- .../tests/auth-center/availability.test.js | 45 - .../tests/auth-center/availability.test.ts | 49 + ...{clientForm.test.js => clientForm.test.ts} | 22 +- .../auth-center/interactionSecurity.test.js | 28 - .../auth-center/interactionSecurity.test.ts | 27 + .../web/tests/auth-center/oauthUri.test.js | 46 - .../web/tests/auth-center/oauthUri.test.ts | 42 + .../{consent.test.mjs => consent.test.ts} | 7 +- .../{entities.test.mjs => entities.test.ts} | 49 +- .../web/tests/i18n/message-shapes.test.ts} | 23 +- .../i18n/{plugin.test.mjs => plugin.test.ts} | 44 +- ...oling.test.mjs => project-tooling.test.ts} | 30 +- .../react/web/tests/i18n/protocol.test.mjs | 226 -- .../react/web/tests/i18n/protocol.test.ts | 264 ++ .../{runtime.test.mjs => runtime.test.ts} | 121 +- .../{workspace.test.mjs => workspace.test.ts} | 39 +- .../i18n/{x18n.test.mjs => x18n.test.ts} | 33 +- .../web/tests/job/job-form.test.ts} | 23 +- .../tests/plugins/fixtures/json-only-host.ts} | 41 +- .../tests/plugins/fixtures/messageWindows.ts | 57 + .../web/tests/plugins/pluginBridge.test.js | 950 ----- .../web/tests/plugins/pluginBridge.test.ts | 933 +++++ .../plugins/pluginBridgeCompatibility.test.js | 230 -- .../plugins/pluginBridgeCompatibility.test.ts | 203 ++ .../web/tests/plugins/pluginDevMock.test.js | 77 - .../web/tests/plugins/pluginDevMock.test.ts | 84 + ...luginProxy.test.js => pluginProxy.test.ts} | 177 +- .../plugins/pluginReleaseFormatter.test.js | 91 - .../plugins/pluginReleaseFormatter.test.ts | 102 + .../tests/plugins/pluginRepeatSubmit.test.js | 3 - .../tests/plugins/pluginRepeatSubmit.test.ts | 6 + .../react/web/tests/plugins/pluginSse.test.js | 202 -- .../react/web/tests/plugins/pluginSse.test.ts | 221 ++ .../tests/plugins/pluginViewResolver.test.js | 20 - .../tests/plugins/pluginViewResolver.test.ts | 20 + ...tUpload.test.jsx => aiChatUpload.test.tsx} | 23 +- .../{authRole.test.jsx => authRole.test.tsx} | 16 +- ...ePreview.test.jsx => codePreview.test.tsx} | 12 +- ...est.jsx => formBuilderValidation.test.tsx} | 7 +- .../react/{i18n.test.jsx => i18n.test.tsx} | 28 +- ...est.jsx => oauthPluginValidation.test.tsx} | 8 +- ...status.test.jsx => plugin-status.test.tsx} | 69 +- ...ginFrame.test.jsx => pluginFrame.test.tsx} | 14 +- ...e.test.jsx => rolePermissionTree.test.tsx} | 36 +- .../web/tests/react/{setup.js => setup.ts} | 0 ...ds.test.jsx => translationFields.test.tsx} | 20 +- ...ction.test.jsx => useInteraction.test.tsx} | 8 +- .../{logout.test.mjs => logout.test.ts} | 7 +- ...tice-html.test.cjs => notice-html.test.ts} | 41 +- .../tests/time/{time.test.js => time.test.ts} | 5 +- .../react/web/tsconfig.tests.json | 13 + .../react/web/vitest.config.ts | 38 +- .../vue2/mobile/eslint.config.mjs | 53 + .../vue2/mobile/package.json | 33 +- .../vue2/mobile/pnpm-lock.yaml | 3054 ++++++++--------- .../vue2/mobile/src/permission.ts | 2 +- .../vue2/mobile/src/plugins/modal.ts | 2 +- .../vue2/mobile/src/utils/transportForge.ts | 8 +- .../{behavior.test.mjs => behavior.test.ts} | 17 +- ...-template.test.cjs => h5-template.test.ts} | 11 +- .../vue2/mobile/tests/i18n/adapter.test.mjs | 40 - .../vue2/mobile/tests/i18n/adapter.test.ts | 26 + .../vue2/mobile/tests/i18n/bootstrap.test.mjs | 118 - .../vue2/mobile/tests/i18n/bootstrap.test.ts | 130 + ...navigation.test.mjs => navigation.test.ts} | 37 +- .../vue2/mobile/tests/i18n/protocol.test.mjs | 226 -- .../vue2/mobile/tests/i18n/protocol.test.ts | 262 ++ .../{runtime.test.mjs => runtime.test.ts} | 133 +- .../tests/i18n/x18n.test.ts} | 33 +- ...me-bundle.test.cjs => time-bundle.test.ts} | 40 +- .../mobile/tests/time-polyfill.test.ts} | 7 +- .../mobile/tests/time.test.ts} | 5 +- .../vue2/mobile/tests/vitest/response.test.ts | 29 + .../vue2/mobile/tsconfig.tests.json | 20 + .../vue2/mobile/vitest.config.mts | 12 + .../vue2/web/eslint.config.mjs | 69 + ruoyi-fastapi-frontend/vue2/web/package.json | 30 +- .../vue2/web/pnpm-lock.yaml | 1462 +++++++- .../vue2/web/src/components/Crontab/index.vue | 1 - .../vue2/web/src/utils/dict/DictOptions.ts | 5 +- .../vue2/web/src/utils/request.ts | 4 +- ...lability.test.cjs => availability.test.ts} | 30 +- .../auth-center/interactionSecurity.test.cjs | 27 - .../auth-center/interactionSecurity.test.ts | 31 + .../web/tests/auth-center/oauthUri.test.cjs | 45 - .../web/tests/auth-center/oauthUri.test.ts | 43 + ...nents.test.cjs => vue2-components.test.ts} | 125 +- .../i18n/{charts.test.mjs => charts.test.ts} | 41 +- ...-preview.test.mjs => code-preview.test.ts} | 32 +- ...dict-cache.test.mjs => dict-cache.test.ts} | 35 +- .../web/tests/i18n/message-shapes.test.ts} | 23 +- ...navigation.test.mjs => navigation.test.ts} | 76 +- .../web/tests/i18n/plugin.test.ts} | 46 +- ...oling.test.mjs => project-tooling.test.ts} | 29 +- .../vue2/web/tests/i18n/protocol.test.mjs | 226 -- .../vue2/web/tests/i18n/protocol.test.ts | 262 ++ .../{runtime.test.mjs => runtime.test.ts} | 133 +- .../{test-runtime.cjs => test-runtime.ts} | 13 +- .../{uploads.test.mjs => uploads.test.ts} | 42 +- .../vue2/web/tests/i18n/validation.test.mjs | 58 - .../vue2/web/tests/i18n/validation.test.ts | 63 + .../web/tests/i18n/workspace.test.ts} | 38 +- .../tests/i18n/x18n.test.ts} | 33 +- .../web/tests/job/job-form.test.ts} | 23 +- ...nents.test.cjs => vue2-components.test.ts} | 170 +- .../{json-only-host.js => json-only-host.ts} | 50 +- .../tests/plugins/fixtures/messageWindows.ts | 55 + .../web/tests/plugins/pluginBridge.test.mjs | 950 ----- .../web/tests/plugins/pluginBridge.test.ts | 930 +++++ .../pluginBridgeCompatibility.test.mjs | 226 -- .../plugins/pluginBridgeCompatibility.test.ts | 202 ++ .../tests/plugins/pluginConfigStatus.test.mjs | 81 - .../tests/plugins/pluginConfigStatus.test.ts | 88 + .../web/tests/plugins/pluginDevMock.test.mjs | 77 - .../web/tests/plugins/pluginDevMock.test.ts | 83 + .../web/tests/plugins/pluginFrame.test.mjs | 74 - .../web/tests/plugins/pluginFrame.test.ts | 74 + ...test.cjs => pluginHostIntegration.test.ts} | 154 +- .../plugins/pluginReleaseFormatter.test.mjs | 117 - .../plugins/pluginReleaseFormatter.test.ts | 128 + .../tests/plugins/pluginRepeatSubmit.test.mjs | 3 - .../tests/plugins/pluginRepeatSubmit.test.ts | 8 + .../plugins/pluginRuntimeMetrics.test.mjs | 83 - .../plugins/pluginRuntimeMetrics.test.ts | 89 + .../vue2/web/tests/plugins/pluginSse.test.mjs | 171 - .../vue2/web/tests/plugins/pluginSse.test.ts | 181 + .../tests/plugins/pluginViewResolver.test.js | 14 - .../tests/plugins/pluginViewResolver.test.ts | 18 + .../plugins/pluginVue2Components.test.cjs | 52 - .../plugins/pluginVue2Components.test.ts | 55 + .../web/tests/plugins/run-plugin-tests.js | 40 - .../{logout.test.mjs => logout.test.ts} | 7 +- .../{load-module.cjs => load-module.cts} | 15 +- .../vue2/web/tests/support/vue-sfc.d.ts | 5 + .../time/{time.test.mjs => time.test.ts} | 5 +- .../vue2/web/tests/vitest/tags-view.test.ts | 36 + .../vue2/web/tsconfig.tests.json | 20 + .../vue2/web/vitest.config.mts | 12 + .../vue3/mobile/eslint.config.mjs | 54 + .../vue3/mobile/package.json | 23 +- .../vue3/mobile/pnpm-lock.yaml | 1013 +++++- .../vue3/mobile/src/permission.ts | 2 +- .../vue3/mobile/src/plugins/modal.ts | 2 +- .../vue3/mobile/src/utils/transportForge.ts | 8 +- .../vue3/mobile/tests/behavior.test.mjs | 6 - .../vue3/mobile/tests/behavior.test.ts | 7 + .../vue3/mobile/tests/i18n/adapter.test.mjs | 52 - .../vue3/mobile/tests/i18n/adapter.test.ts | 33 + .../vue3/mobile/tests/i18n/bootstrap.test.mjs | 118 - .../vue3/mobile/tests/i18n/bootstrap.test.ts | 130 + .../vue3/mobile/tests/i18n/names.test.mjs | 39 - .../vue3/mobile/tests/i18n/names.test.ts | 51 + .../vue3/mobile/tests/i18n/protocol.test.mjs | 226 -- .../vue3/mobile/tests/i18n/protocol.test.ts | 261 ++ .../vue3/mobile/tests/i18n/runtime.test.mjs | 195 -- .../vue3/mobile/tests/i18n/runtime.test.ts | 183 + .../i18n/{x18n.test.mjs => x18n.test.ts} | 35 +- ...polyfill.test.js => time-polyfill.test.ts} | 8 +- .../mobile/tests/time.test.ts} | 5 +- .../vue3/mobile/tests/vitest/webview.test.ts | 15 + .../vue3/mobile/tsconfig.test.json | 12 + .../vue3/mobile/vitest.config.ts | 17 + .../vue3/web/eslint.config.mjs | 54 + ruoyi-fastapi-frontend/vue3/web/package.json | 26 +- .../vue3/web/pnpm-lock.yaml | 945 ++++- .../vue3/web/src/utils/generator/html.ts | 1 - .../vue3/web/src/utils/request.ts | 4 +- .../tests/auth-center/availability.test.js | 45 - .../tests/auth-center/availability.test.ts | 49 + .../web/tests/auth-center/clientForm.test.js | 51 - .../web/tests/auth-center/clientForm.test.ts | 52 + .../auth-center/interactionSecurity.test.js | 28 - .../auth-center/interactionSecurity.test.ts | 27 + .../web/tests/auth-center/oauthUri.test.js | 46 - .../web/tests/auth-center/oauthUri.test.ts | 42 + .../tests/auth-center/roleAndLogin.test.js | 118 - .../tests/auth-center/roleAndLogin.test.ts | 124 + .../tests/auth-center/useInteraction.test.js | 74 - .../tests/auth-center/useInteraction.test.ts | 83 + .../vue3/web/tests/fixtures/componentSetup.ts | 20 + ...dict-cache.test.mjs => dict-cache.test.ts} | 45 +- .../{generated.test.mjs => generated.test.ts} | 15 +- .../{generator.test.mjs => generator.test.ts} | 62 +- .../{localeFixture.mjs => localeFixture.ts} | 8 +- ...sage.test.mjs => localizedMessage.test.ts} | 19 +- .../web/tests/i18n/message-shapes.test.ts} | 23 +- .../vue3/web/tests/i18n/names.test.mjs | 49 - .../vue3/web/tests/i18n/names.test.ts | 61 + ...navigation.test.mjs => navigation.test.ts} | 105 +- .../web/tests/i18n/plugin.test.ts} | 44 +- .../{pluginSdk.test.mjs => pluginSdk.test.ts} | 15 +- ...oling.test.mjs => project-tooling.test.ts} | 31 +- .../vue3/web/tests/i18n/protocol.test.mjs | 226 -- .../vue3/web/tests/i18n/protocol.test.ts | 261 ++ .../{runtime.test.mjs => runtime.test.ts} | 140 +- .../{uploads.test.mjs => uploads.test.ts} | 54 +- .../vue3/web/tests/i18n/user-fields.test.mjs | 23 - .../vue3/web/tests/i18n/user-fields.test.ts | 24 + .../web/tests/i18n/workspace.test.ts} | 40 +- .../i18n/{x18n.test.mjs => x18n.test.ts} | 39 +- .../web/tests/job/job-form.test.ts} | 23 +- .../tests/plugins/fixtures/json-only-host.ts} | 41 +- .../tests/plugins/fixtures/messageWindows.ts | 57 + .../tests/plugins/monacoEnvironment.test.js | 32 - .../tests/plugins/monacoEnvironment.test.ts | 35 + .../web/tests/plugins/pluginBridge.test.js | 950 ----- .../web/tests/plugins/pluginBridge.test.ts | 933 +++++ .../plugins/pluginBridgeCompatibility.test.js | 226 -- .../plugins/pluginBridgeCompatibility.test.ts | 203 ++ .../tests/plugins/pluginConfigStatus.test.js | 81 - .../tests/plugins/pluginConfigStatus.test.ts | 87 + .../web/tests/plugins/pluginDevMock.test.js | 77 - .../web/tests/plugins/pluginDevMock.test.ts | 75 + .../web/tests/plugins/pluginFrame.test.js | 73 - .../web/tests/plugins/pluginFrame.test.ts | 75 + .../web/tests/plugins/pluginProxy.test.js | 223 -- .../web/tests/plugins/pluginProxy.test.ts | 242 ++ .../plugins/pluginReleaseFormatter.test.js | 117 - .../plugins/pluginReleaseFormatter.test.ts | 127 + .../tests/plugins/pluginRepeatSubmit.test.js | 3 - .../tests/plugins/pluginRepeatSubmit.test.ts | 6 + .../plugins/pluginRuntimeMetrics.test.js | 83 - .../plugins/pluginRuntimeMetrics.test.ts | 88 + .../vue3/web/tests/plugins/pluginSse.test.js | 171 - .../vue3/web/tests/plugins/pluginSse.test.ts | 190 + .../tests/plugins/pluginViewResolver.test.js | 19 - .../tests/plugins/pluginViewResolver.test.ts | 20 + .../web/tests/plugins/run-plugin-tests.js | 53 - .../vue3/web/tests/run-tests.js | 27 - .../{logout.test.mjs => logout.test.ts} | 7 +- .../tests/time/{time.test.js => time.test.ts} | 5 +- .../web/tests/vitest/transport-path.test.ts | 12 + .../vue3/web/tsconfig.test.json | 14 + .../vue3/web/vitest.config.ts | 15 + ruoyi-fastapi-test/README.md | 15 +- .../frontend/logout-behavior.mjs | 414 --- .../frontend/logout-behavior.mts | 437 +++ .../frontend/mobile-behavior.mjs | 331 -- .../frontend/mobile-behavior.mts | 366 ++ ...{mobile-harness.mjs => mobile-harness.mts} | 174 +- ...t-submit.mjs => request-repeat-submit.mts} | 45 +- ruoyi-fastapi-test/frontend/x18n-report.ts | 5 + ruoyi-fastapi-test/time-contract/contract.mjs | 128 - ruoyi-fastapi-test/time-contract/contract.mts | 184 + .../time-contract/run-host-timezones.mjs | 33 +- 304 files changed, 22060 insertions(+), 13086 deletions(-) create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/eslint.config.mjs create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tests/mockRequest.test.ts create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tsconfig.test.json create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/eslint.config.mjs delete mode 100644 ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.js create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.ts create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tsconfig.test.json create mode 100644 ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/vitest.config.ts create mode 100644 ruoyi-fastapi-frontend/react/mobile/eslint.config.mjs rename ruoyi-fastapi-frontend/react/mobile/tests/{avatar-crop.test.mjs => avatar-crop.test.ts} (62%) delete mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/bootstrap.test.mjs create mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/bootstrap.test.ts rename ruoyi-fastapi-frontend/react/mobile/tests/i18n/{native-locale.test.mjs => native-locale.test.ts} (56%) delete mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/react/mobile/tests/i18n/protocol.test.ts rename ruoyi-fastapi-frontend/react/mobile/tests/i18n/{runtime.test.mjs => runtime.test.ts} (56%) rename ruoyi-fastapi-frontend/react/mobile/tests/i18n/{x18n.test.mjs => x18n.test.ts} (71%) rename ruoyi-fastapi-frontend/react/mobile/tests/{logout.test.mjs => logout.test.ts} (60%) rename ruoyi-fastapi-frontend/react/mobile/tests/{native-styles.test.mjs => native-styles.test.ts} (62%) rename ruoyi-fastapi-frontend/react/mobile/tests/{route-params.test.mjs => route-params.test.ts} (62%) rename ruoyi-fastapi-frontend/{vue2/mobile/tests/time-polyfill.test.mjs => react/mobile/tests/time-polyfill.test.ts} (54%) rename ruoyi-fastapi-frontend/{vue3/mobile/tests/time.test.js => react/mobile/tests/time.test.ts} (55%) rename ruoyi-fastapi-frontend/react/mobile/tests/{timezone-data.test.mjs => timezone-data.test.ts} (67%) rename ruoyi-fastapi-frontend/react/mobile/tests/{transport-forge.test.mjs => transport-forge.test.ts} (78%) create mode 100644 ruoyi-fastapi-frontend/react/mobile/tsconfig.tests.json create mode 100644 ruoyi-fastapi-frontend/react/mobile/vitest.config.mts create mode 100644 ruoyi-fastapi-frontend/react/web/eslint.config.mjs delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/availability.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/availability.test.ts rename ruoyi-fastapi-frontend/react/web/tests/auth-center/{clientForm.test.js => clientForm.test.ts} (50%) delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/interactionSecurity.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/interactionSecurity.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/oauthUri.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/auth-center/oauthUri.test.ts rename ruoyi-fastapi-frontend/react/web/tests/i18n/{consent.test.mjs => consent.test.ts} (84%) rename ruoyi-fastapi-frontend/react/web/tests/i18n/{entities.test.mjs => entities.test.ts} (62%) rename ruoyi-fastapi-frontend/{vue2/web/tests/i18n/message-shapes.test.mjs => react/web/tests/i18n/message-shapes.test.ts} (79%) rename ruoyi-fastapi-frontend/react/web/tests/i18n/{plugin.test.mjs => plugin.test.ts} (60%) rename ruoyi-fastapi-frontend/react/web/tests/i18n/{project-tooling.test.mjs => project-tooling.test.ts} (81%) delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.ts rename ruoyi-fastapi-frontend/react/web/tests/i18n/{runtime.test.mjs => runtime.test.ts} (58%) rename ruoyi-fastapi-frontend/react/web/tests/i18n/{workspace.test.mjs => workspace.test.ts} (79%) rename ruoyi-fastapi-frontend/react/web/tests/i18n/{x18n.test.mjs => x18n.test.ts} (71%) rename ruoyi-fastapi-frontend/{vue2/web/tests/job/job-form.test.mjs => react/web/tests/job/job-form.test.ts} (50%) rename ruoyi-fastapi-frontend/{vue3/web/tests/plugins/fixtures/json-only-host.js => react/web/tests/plugins/fixtures/json-only-host.ts} (62%) create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/messageWindows.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.ts rename ruoyi-fastapi-frontend/react/web/tests/plugins/{pluginProxy.test.js => pluginProxy.test.ts} (50%) delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.ts delete mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.js create mode 100644 ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.ts rename ruoyi-fastapi-frontend/react/web/tests/react/{aiChatUpload.test.jsx => aiChatUpload.test.tsx} (65%) rename ruoyi-fastapi-frontend/react/web/tests/react/{authRole.test.jsx => authRole.test.tsx} (71%) rename ruoyi-fastapi-frontend/react/web/tests/react/{codePreview.test.jsx => codePreview.test.tsx} (83%) rename ruoyi-fastapi-frontend/react/web/tests/react/{formBuilderValidation.test.jsx => formBuilderValidation.test.tsx} (86%) rename ruoyi-fastapi-frontend/react/web/tests/react/{i18n.test.jsx => i18n.test.tsx} (86%) rename ruoyi-fastapi-frontend/react/web/tests/react/{oauthPluginValidation.test.jsx => oauthPluginValidation.test.tsx} (91%) rename ruoyi-fastapi-frontend/react/web/tests/react/{plugin-status.test.jsx => plugin-status.test.tsx} (57%) rename ruoyi-fastapi-frontend/react/web/tests/react/{pluginFrame.test.jsx => pluginFrame.test.tsx} (82%) rename ruoyi-fastapi-frontend/react/web/tests/react/{rolePermissionTree.test.jsx => rolePermissionTree.test.tsx} (67%) rename ruoyi-fastapi-frontend/react/web/tests/react/{setup.js => setup.ts} (100%) rename ruoyi-fastapi-frontend/react/web/tests/react/{translationFields.test.jsx => translationFields.test.tsx} (81%) rename ruoyi-fastapi-frontend/react/web/tests/react/{useInteraction.test.jsx => useInteraction.test.tsx} (89%) rename ruoyi-fastapi-frontend/react/web/tests/security/{logout.test.mjs => logout.test.ts} (59%) rename ruoyi-fastapi-frontend/react/web/tests/security/{notice-html.test.cjs => notice-html.test.ts} (50%) rename ruoyi-fastapi-frontend/react/web/tests/time/{time.test.js => time.test.ts} (55%) create mode 100644 ruoyi-fastapi-frontend/react/web/tsconfig.tests.json create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/eslint.config.mjs rename ruoyi-fastapi-frontend/vue2/mobile/tests/{behavior.test.mjs => behavior.test.ts} (56%) rename ruoyi-fastapi-frontend/vue2/mobile/tests/{h5-template.test.cjs => h5-template.test.ts} (74%) delete mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.ts rename ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/{navigation.test.mjs => navigation.test.ts} (66%) delete mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.ts rename ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/{runtime.test.mjs => runtime.test.ts} (52%) rename ruoyi-fastapi-frontend/vue2/{web/tests/i18n/x18n.test.mjs => mobile/tests/i18n/x18n.test.ts} (71%) rename ruoyi-fastapi-frontend/vue2/mobile/tests/{time-bundle.test.cjs => time-bundle.test.ts} (68%) rename ruoyi-fastapi-frontend/{react/mobile/tests/time-polyfill.test.mjs => vue2/mobile/tests/time-polyfill.test.ts} (54%) rename ruoyi-fastapi-frontend/{react/mobile/tests/time.test.mjs => vue2/mobile/tests/time.test.ts} (55%) create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tests/vitest/response.test.ts create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/tsconfig.tests.json create mode 100644 ruoyi-fastapi-frontend/vue2/mobile/vitest.config.mts create mode 100644 ruoyi-fastapi-frontend/vue2/web/eslint.config.mjs rename ruoyi-fastapi-frontend/vue2/web/tests/auth-center/{availability.test.cjs => availability.test.ts} (53%) delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.cjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.cjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.ts rename ruoyi-fastapi-frontend/vue2/web/tests/auth-center/{vue2-components.test.cjs => vue2-components.test.ts} (63%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{charts.test.mjs => charts.test.ts} (52%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{code-preview.test.mjs => code-preview.test.ts} (62%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{dict-cache.test.mjs => dict-cache.test.ts} (68%) rename ruoyi-fastapi-frontend/{vue3/web/tests/i18n/message-shapes.test.mjs => vue2/web/tests/i18n/message-shapes.test.ts} (79%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{navigation.test.mjs => navigation.test.ts} (69%) rename ruoyi-fastapi-frontend/{vue3/web/tests/i18n/plugin.test.mjs => vue2/web/tests/i18n/plugin.test.ts} (60%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{project-tooling.test.mjs => project-tooling.test.ts} (84%) delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.ts rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{runtime.test.mjs => runtime.test.ts} (52%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{test-runtime.cjs => test-runtime.ts} (67%) rename ruoyi-fastapi-frontend/vue2/web/tests/i18n/{uploads.test.mjs => uploads.test.ts} (65%) delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.ts rename ruoyi-fastapi-frontend/{vue3/web/tests/i18n/workspace.test.mjs => vue2/web/tests/i18n/workspace.test.ts} (81%) rename ruoyi-fastapi-frontend/vue2/{mobile/tests/i18n/x18n.test.mjs => web/tests/i18n/x18n.test.ts} (71%) rename ruoyi-fastapi-frontend/{vue3/web/tests/job/job-form.test.js => vue2/web/tests/job/job-form.test.ts} (50%) rename ruoyi-fastapi-frontend/vue2/web/tests/job/{vue2-components.test.cjs => vue2-components.test.ts} (65%) rename ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/{json-only-host.js => json-only-host.ts} (57%) create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/messageWindows.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.ts rename ruoyi-fastapi-frontend/vue2/web/tests/plugins/{pluginHostIntegration.test.cjs => pluginHostIntegration.test.ts} (63%) delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.js create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.cjs create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/plugins/run-plugin-tests.js rename ruoyi-fastapi-frontend/vue2/web/tests/security/{logout.test.mjs => logout.test.ts} (61%) rename ruoyi-fastapi-frontend/vue2/web/tests/support/{load-module.cjs => load-module.cts} (82%) create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/support/vue-sfc.d.ts rename ruoyi-fastapi-frontend/vue2/web/tests/time/{time.test.mjs => time.test.ts} (55%) create mode 100644 ruoyi-fastapi-frontend/vue2/web/tests/vitest/tags-view.test.ts create mode 100644 ruoyi-fastapi-frontend/vue2/web/tsconfig.tests.json create mode 100644 ruoyi-fastapi-frontend/vue2/web/vitest.config.mts create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/eslint.config.mjs delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.ts rename ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/{x18n.test.mjs => x18n.test.ts} (70%) rename ruoyi-fastapi-frontend/vue3/mobile/tests/{time-polyfill.test.js => time-polyfill.test.ts} (54%) rename ruoyi-fastapi-frontend/{vue2/mobile/tests/time.test.mjs => vue3/mobile/tests/time.test.ts} (55%) create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tests/vitest/webview.test.ts create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/tsconfig.test.json create mode 100644 ruoyi-fastapi-frontend/vue3/mobile/vitest.config.ts create mode 100644 ruoyi-fastapi-frontend/vue3/web/eslint.config.mjs delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.ts create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/fixtures/componentSetup.ts rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{dict-cache.test.mjs => dict-cache.test.ts} (59%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{generated.test.mjs => generated.test.ts} (73%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{generator.test.mjs => generator.test.ts} (62%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{localeFixture.mjs => localeFixture.ts} (72%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{localizedMessage.test.mjs => localizedMessage.test.ts} (75%) rename ruoyi-fastapi-frontend/{react/web/tests/i18n/message-shapes.test.mjs => vue3/web/tests/i18n/message-shapes.test.ts} (79%) delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.ts rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{navigation.test.mjs => navigation.test.ts} (68%) rename ruoyi-fastapi-frontend/{vue2/web/tests/i18n/plugin.test.mjs => vue3/web/tests/i18n/plugin.test.ts} (60%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{pluginSdk.test.mjs => pluginSdk.test.ts} (57%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{project-tooling.test.mjs => project-tooling.test.ts} (83%) delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.ts rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{runtime.test.mjs => runtime.test.ts} (55%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{uploads.test.mjs => uploads.test.ts} (74%) delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.mjs create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.ts rename ruoyi-fastapi-frontend/{vue2/web/tests/i18n/workspace.test.mjs => vue3/web/tests/i18n/workspace.test.ts} (81%) rename ruoyi-fastapi-frontend/vue3/web/tests/i18n/{x18n.test.mjs => x18n.test.ts} (75%) rename ruoyi-fastapi-frontend/{react/web/tests/job/job-form.test.js => vue3/web/tests/job/job-form.test.ts} (50%) rename ruoyi-fastapi-frontend/{react/web/tests/plugins/fixtures/json-only-host.js => vue3/web/tests/plugins/fixtures/json-only-host.ts} (62%) create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/messageWindows.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/monacoEnvironment.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/monacoEnvironment.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginBridge.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginBridge.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginBridgeCompatibility.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginBridgeCompatibility.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginConfigStatus.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginConfigStatus.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginDevMock.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginDevMock.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginFrame.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginFrame.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginProxy.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginProxy.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginReleaseFormatter.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginReleaseFormatter.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginRepeatSubmit.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginRepeatSubmit.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginRuntimeMetrics.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginRuntimeMetrics.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginSse.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginSse.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginViewResolver.test.js create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/pluginViewResolver.test.ts delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/plugins/run-plugin-tests.js delete mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/run-tests.js rename ruoyi-fastapi-frontend/vue3/web/tests/security/{logout.test.mjs => logout.test.ts} (61%) rename ruoyi-fastapi-frontend/vue3/web/tests/time/{time.test.js => time.test.ts} (55%) create mode 100644 ruoyi-fastapi-frontend/vue3/web/tests/vitest/transport-path.test.ts create mode 100644 ruoyi-fastapi-frontend/vue3/web/tsconfig.test.json create mode 100644 ruoyi-fastapi-frontend/vue3/web/vitest.config.ts delete mode 100644 ruoyi-fastapi-test/frontend/logout-behavior.mjs create mode 100644 ruoyi-fastapi-test/frontend/logout-behavior.mts delete mode 100644 ruoyi-fastapi-test/frontend/mobile-behavior.mjs create mode 100644 ruoyi-fastapi-test/frontend/mobile-behavior.mts rename ruoyi-fastapi-test/frontend/{mobile-harness.mjs => mobile-harness.mts} (50%) rename ruoyi-fastapi-test/frontend/{request-repeat-submit.mjs => request-repeat-submit.mts} (67%) create mode 100644 ruoyi-fastapi-test/frontend/x18n-report.ts delete mode 100644 ruoyi-fastapi-test/time-contract/contract.mjs create mode 100644 ruoyi-fastapi-test/time-contract/contract.mts diff --git a/.github/scripts/ci_plan.py b/.github/scripts/ci_plan.py index ebc8f988e..7796d9f77 100644 --- a/.github/scripts/ci_plan.py +++ b/.github/scripts/ci_plan.py @@ -110,8 +110,12 @@ def build_plan(paths: list[str], *, full: bool = False) -> dict[str, Any]: # no projects.update((framework, target) for framework in FRAMEWORKS for target in ('web', 'mobile')) browsers.update(FRAMEWORKS) networks.update(FRAMEWORKS) - elif path.startswith('ruoyi-fastapi-test/frontend/'): + elif path.startswith('ruoyi-fastapi-test/frontend/mobile-'): projects.update((framework, 'mobile') for framework in FRAMEWORKS) + elif path == 'ruoyi-fastapi-test/frontend/request-repeat-submit.mts': + projects.update((framework, 'web') for framework in FRAMEWORKS) + elif path.startswith('ruoyi-fastapi-test/frontend/'): + projects.update((framework, target) for framework in FRAMEWORKS for target in ('web', 'mobile')) elif path.startswith('ruoyi-fastapi-test/time-contract/'): projects.update((framework, target) for framework in FRAMEWORKS for target in ('web', 'mobile')) database = True diff --git a/.github/tests/test_ci_contracts.py b/.github/tests/test_ci_contracts.py index 577be211c..62c44bde3 100644 --- a/.github/tests/test_ci_contracts.py +++ b/.github/tests/test_ci_contracts.py @@ -65,16 +65,27 @@ def test_frontend_ci_commands_exist_in_every_project(framework: str, target: str """矩阵中的工程必须实际提供工作流调用的测试和构建命令。""" directory = ROOT / 'ruoyi-fastapi-frontend' / framework / target package = json.loads((directory / 'package.json').read_text(encoding='utf-8')) - required = {'test:unit', 'test:contract'} + required = {'lint', 'typecheck:tests', 'test:unit', 'test:vitest', 'test:contract'} required.update({'build:prod', 'build:docker'} if target == 'web' else {'build:h5', 'build:mp-weixin'}) assert package['packageManager'] == 'pnpm@11.28.6' assert (directory / 'pnpm-workspace.yaml').is_file() assert (directory / 'pnpm-lock.yaml').is_file() + assert (directory / 'eslint.config.mjs').is_file() if framework == 'react' and target == 'mobile': required.update({'check:platforms', 'build:rn:android', 'build:rn:ios'}) assert required <= package['scripts'].keys() +@pytest.mark.parametrize('framework', ['vue2', 'vue3', 'react']) +@pytest.mark.parametrize('target', ['web', 'mobile']) +def test_frontend_suites_follow_vitest_typescript_naming(framework: str, target: str) -> None: + """所有前端测试套件均使用 Vitest 的 TypeScript 测试文件名。""" + directory = ROOT / 'ruoyi-fastapi-frontend' / framework / target / 'tests' + suites = [path for path in directory.rglob('*') if '.test.' in path.name or '.spec.' in path.name] + assert suites + assert [path for path in suites if not path.name.endswith(('.test.ts', '.test.tsx'))] == [] + + @pytest.mark.parametrize('framework', ['vue2', 'vue3']) def test_web_svg_assets_match_across_frameworks(framework: str) -> None: """三端独立打包的 SVG 应有相同的相对路径和文件内容。""" diff --git a/.github/tests/test_ci_plan.py b/.github/tests/test_ci_plan.py index 30244da78..936919b7c 100644 --- a/.github/tests/test_ci_plan.py +++ b/.github/tests/test_ci_plan.py @@ -102,8 +102,8 @@ def test_mobile_change_does_not_build_other_projects_or_web_e2e(framework: str) @pytest.mark.parametrize( 'path', [ - 'ruoyi-fastapi-test/frontend/mobile-harness.mjs', - 'ruoyi-fastapi-test/frontend/mobile-behavior.mjs', + 'ruoyi-fastapi-test/frontend/mobile-harness.mts', + 'ruoyi-fastapi-test/frontend/mobile-behavior.mts', ], ) def test_shared_mobile_harness_runs_all_mobile_projects(path: str) -> None: @@ -120,6 +120,18 @@ def test_shared_mobile_harness_runs_all_mobile_projects(path: str) -> None: assert not plan['required']['e2e'] +@pytest.mark.parametrize( + ('filename', 'targets'), + [('request-repeat-submit.mts', ['web']), ('logout-behavior.mts', ['web', 'mobile'])], +) +def test_shared_web_and_logout_suites_select_their_consumers(filename: str, targets: list[str]) -> None: + """共享 Vitest 用例变更触发引用这些用例的工程。""" + plan = ci.build_plan([f'ruoyi-fastapi-test/frontend/{filename}']) + assert {(row['framework'], row['target']) for row in plan['frontend_matrix']['include']} == { + (framework, target) for framework in ci.FRAMEWORKS for target in targets + } + + @pytest.mark.parametrize('framework', ci.FRAMEWORKS) def test_web_change_selects_matching_framework_and_both_databases(framework: str) -> None: """Web 变更使用对应框架并覆盖两类数据库。""" diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml index 57848b986..637151b43 100644 --- a/.github/workflows/ci-frontend.yml +++ b/.github/workflows/ci-frontend.yml @@ -49,6 +49,10 @@ jobs: ${{ runner.os }}-node${{ matrix.node }}-${{ matrix.project.framework }}-${{ matrix.project.target }}- - name: Install dependencies from the committed lockfile run: pnpm install --frozen-lockfile + - name: Lint frontend source and tests + run: pnpm run lint + - name: Type-check Vitest suites and test helpers + run: pnpm run typecheck:tests - name: Record resolved dependency versions run: | mkdir -p test-results @@ -56,20 +60,15 @@ jobs: if ! pnpm list --depth Infinity --json > test-results/dependency-tree.json; then echo "Dependency tree includes peer diagnostics; inspect dependency-tree.json." >&2 fi - - name: Verify independent locale resources and runtime contracts + - name: Verify independent locale resources + run: pnpm run i18n:check > test-results/i18n.json.log + - name: Run the full Vitest suite in UTC + run: TZ=UTC pnpm run test:vitest + - name: Verify time contracts in Shanghai and New York run: | - pnpm run i18n:check > test-results/i18n.json.log - pnpm run test:i18n - - name: Run unit and component behavior tests - run: pnpm run test:unit - - name: Verify time contracts in three host timezones - run: | - for zone in UTC Asia/Shanghai America/New_York; do + for zone in Asia/Shanghai America/New_York; do TZ="$zone" pnpm run test:contract done - - name: Verify Vue 2 Mobile Intl polyfills and development templates - if: matrix.project.framework == 'vue2' && matrix.project.target == 'mobile' - run: pnpm run test:bundle - name: Build Web production and Docker targets if: matrix.project.target == 'web' run: | diff --git a/.github/workflows/ci-integration.yml b/.github/workflows/ci-integration.yml index 3281bf051..a64be5b86 100644 --- a/.github/workflows/ci-integration.yml +++ b/.github/workflows/ci-integration.yml @@ -83,13 +83,16 @@ jobs: retention-days: 7 task-bundle: - name: Task plugin bundle + name: Plugin frontend / ${{ matrix.plugin }} if: inputs.release runs-on: ubuntu-latest timeout-minutes: 10 + strategy: + matrix: + plugin: [task_demo, bundle_demo] defaults: run: - working-directory: ruoyi-fastapi-backend/plugins/examples/python/task_demo/web + working-directory: ruoyi-fastapi-backend/plugins/examples/python/${{ matrix.plugin }}/web steps: - uses: actions/checkout@v5 - uses: actions/setup-node@v6 @@ -97,18 +100,21 @@ jobs: node-version: '22' - uses: pnpm/action-setup@v5 with: - package_json_file: ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/package.json + package_json_file: ruoyi-fastapi-backend/plugins/examples/python/${{ matrix.plugin }}/web/package.json - name: Locate the pnpm store id: pnpm-store run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT" - uses: actions/cache@v5 with: path: ${{ steps.pnpm-store.outputs.path }} - key: ${{ runner.os }}-task-bundle-${{ hashFiles('ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/pnpm-lock.yaml') }} + key: ${{ runner.os }}-${{ matrix.plugin }}-${{ hashFiles(format('ruoyi-fastapi-backend/plugins/examples/python/{0}/web/pnpm-lock.yaml', matrix.plugin)) }} - run: pnpm install --frozen-lockfile + - run: pnpm run lint + - run: pnpm run typecheck:tests - run: pnpm test - run: pnpm run build - uses: actions/upload-artifact@v6 + if: matrix.plugin == 'task_demo' with: name: integration-task-bundle path: ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/dist/ diff --git a/README.md b/README.md index c88423269..4f21a11bc 100644 --- a/README.md +++ b/README.md @@ -216,6 +216,10 @@ RuoYi-FastAPI/ └── ruoyi-fastapi-test/ # 端到端与跨工程契约测试 ``` +### 前端检查与测试 + +进入任一前端工程目录,运行 `pnpm install --frozen-lockfile` 安装依赖。`pnpm lint` 按当前框架的规则检查代码,`pnpm typecheck:tests` 检查测试的 TypeScript 类型,`pnpm test` 单次运行全部 Vitest 用例,`pnpm test:watch` 在开发时监听变化。[前端测试说明](./ruoyi-fastapi-test/README.md) + ### 国际化词库 六个前端各自在 `src/i18n/locales/<语言>/<命名空间>.json` 维护页面文案。同一功能的中英文使用相同的语义 key,并保留各语言需要的复数形式。新增词条时,按使用它的功能选择文件。 diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/backend.py b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/backend.py index 929671dd3..c5ac35cf9 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/backend.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/backend.py @@ -481,14 +481,14 @@ def build_readme(plugin_id: str, frontend_framework: str | None = 'vue3') -> str - `migrations/`: database migration scripts declared in `plugin.yaml`. - `seeds/`: initialization scripts declared in `plugin.yaml`. - `tests/plugins/{plugin_id}/`: pytest examples for this plugin. -- frontend project `tests/plugins/{plugin_id}/`: frontend node tests for this plugin. +- frontend project `tests/plugins/{plugin_id}/`: Vitest tests for this plugin. ## Commands ```bash ruoyi plugin check {plugin_id} pytest tests/plugins/{plugin_id} -cd && node tests/plugins/{plugin_id}/pluginView.test.js +cd && pnpm exec vitest run tests/plugins/{plugin_id}/pluginView.test.ts ruoyi plugin install {plugin_id} --dry-run ruoyi plugin install {plugin_id} --yes ruoyi plugin enable {plugin_id} --yes diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/builder.py b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/builder.py index 0a45a15d9..0c945b7cd 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/builder.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/builder.py @@ -328,7 +328,7 @@ def _build_frontend_files( if options.test: files.append( ( - plugin_root.parents[1] / 'tests' / 'plugins' / plugin_id / 'pluginView.test.js', + plugin_root.parents[1] / 'tests' / 'plugins' / plugin_id / 'pluginView.test.ts', PluginFrontendScaffoldTemplateBuilder.build_test(plugin_id, frontend_framework), ) ) diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend.py b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend.py index 8d72f0b14..dd3e10794 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend.py @@ -211,7 +211,7 @@ def build_readme(plugin_id: str) -> str: - `api/`: request wrappers used by plugin pages. - `views/`: Vue pages loaded by backend menu component paths. -- `../../tests/plugins/{plugin_id}/`: frontend node tests for plugin view resolving. +- `../../tests/plugins/{plugin_id}/`: Vitest tests for plugin view resolution. ## Route Component @@ -225,27 +225,19 @@ def build_readme(plugin_id: str) -> str: @staticmethod def build_test(plugin_id: str) -> str: """ - 构建前端插件 node 测试样例。 + 构建前端插件 Vitest 测试样例。 :param plugin_id: 插件ID :return: 前端插件测试样例内容 """ - return f"""import assert from 'node:assert/strict' -import {{ existsSync }} from 'node:fs' -import {{ dirname, resolve }} from 'node:path' -import {{ fileURLToPath }} from 'node:url' - + return f"""import {{ existsSync }} from 'node:fs' +import {{ expect, test }} from 'vitest' import {{ resolvePluginViewPath }} from '../../../src/utils/pluginViewResolver.ts' -const __filename = fileURLToPath(import.meta.url) -const __dirname = dirname(__filename) -const frontendRoot = resolve(__dirname, '../../..') -const viewPath = resolve(frontendRoot, 'plugins', '{plugin_id}', 'views', 'index.vue') - -assert.equal(resolvePluginViewPath('plugin/{plugin_id}/index'), '../../../plugins/{plugin_id}/views/index.vue') -assert.equal(existsSync(viewPath), true) - -console.log('{plugin_id} plugin frontend tests passed') +test('{plugin_id} route resolves to the generated Vue page', () => {{ + expect(resolvePluginViewPath('plugin/{plugin_id}/index')).toBe('../../../plugins/{plugin_id}/views/index.vue') + expect(existsSync(new URL('../../../plugins/{plugin_id}/views/index.vue', import.meta.url))).toBe(true) +}}) """ diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_react.py b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_react.py index d64d7a72f..641e4bdf7 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_react.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_react.py @@ -208,12 +208,12 @@ def build_readme(plugin_id: str) -> str: - `api/`: request wrappers using the host request client. - `views/index.tsx`: React page loaded by the backend menu `plugin/{plugin_id}/index`. -- `../../tests/plugins/{plugin_id}/pluginView.test.js`: Node.js route mapping smoke test. +- `../../tests/plugins/{plugin_id}/pluginView.test.ts`: Vitest route mapping smoke test. From the React Web host, run: ~~~sh -node --test tests/plugins/{plugin_id}/pluginView.test.js +pnpm exec vitest run tests/plugins/{plugin_id}/pluginView.test.ts pnpm build ~~~ @@ -232,19 +232,13 @@ def build_test(plugin_id: str) -> str: :param plugin_id: 插件清单中的唯一标识 :return: 可由 plugin test 调用的 React 路由解析测试 """ - return f"""import assert from 'node:assert/strict'; -import {{ existsSync }} from 'node:fs'; -import {{ dirname, resolve }} from 'node:path'; -import {{ fileURLToPath }} from 'node:url'; -import {{ test }} from 'node:test'; - -import {{ resolvePluginViewPath }} from '../../../src/utils/pluginViewResolver.ts'; - -const frontendRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../..'); + return f"""import {{ existsSync }} from 'node:fs' +import {{ expect, test }} from 'vitest' +import {{ resolvePluginViewPath }} from '../../../src/utils/pluginViewResolver.ts' test('{plugin_id} React plugin view resolves to its generated TSX page', () => {{ - assert.equal(resolvePluginViewPath('plugin/{plugin_id}/index', '.tsx'), '../../plugins/{plugin_id}/views/index.tsx'); - assert.equal(existsSync(resolve(frontendRoot, 'plugins', '{plugin_id}', 'views', 'index.tsx')), true); - assert.equal(existsSync(resolve(frontendRoot, 'plugins', '{plugin_id}', 'api', '{plugin_id}.ts')), true); -}}); + expect(resolvePluginViewPath('plugin/{plugin_id}/index', '.tsx')).toBe('../../plugins/{plugin_id}/views/index.tsx') + expect(existsSync(new URL('../../../plugins/{plugin_id}/views/index.tsx', import.meta.url))).toBe(true) + expect(existsSync(new URL('../../../plugins/{plugin_id}/api/{plugin_id}.ts', import.meta.url))).toBe(true) +}}) """ diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_vue2.py b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_vue2.py index d14ed70e1..2c08c7919 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_vue2.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/scaffold/frontend_vue2.py @@ -222,7 +222,7 @@ def build_readme(plugin_id: str) -> str: - `api/`: request wrappers used by plugin pages. - `views/`: Vue pages loaded by backend menu component paths. -- `../../tests/plugins/{plugin_id}/`: frontend node tests for plugin view resolving. +- `../../tests/plugins/{plugin_id}/`: Vitest tests for plugin view resolution. ## Route Component @@ -236,21 +236,17 @@ def build_readme(plugin_id: str) -> str: @staticmethod def build_test(plugin_id: str) -> str: """ - 构建 Vue 2 前端插件 node 测试样例。 + 构建 Vue 2 前端插件 Vitest 测试样例。 :param plugin_id: 插件ID :return: 前端插件测试样例内容 """ - return f"""const assert = require('assert').strict -const {{ existsSync }} = require('fs') -const {{ resolve }} = require('path') -const {{ resolvePluginViewPath }} = require('../../../src/utils/pluginViewResolver') + return f"""import {{ existsSync }} from 'node:fs' +import {{ expect, test }} from 'vitest' +import resolver from '../../../src/utils/pluginViewResolver.js' -const frontendRoot = resolve(__dirname, '../../..') -const viewPath = resolve(frontendRoot, 'plugins', '{plugin_id}', 'views', 'index.vue') - -assert.equal(resolvePluginViewPath('plugin/{plugin_id}/index'), './{plugin_id}/views/index.vue') -assert.equal(existsSync(viewPath), true) - -console.log('{plugin_id} plugin frontend tests passed') +test('{plugin_id} route resolves to the generated Vue page', () => {{ + expect(resolver.resolvePluginViewPath('plugin/{plugin_id}/index')).toBe('./{plugin_id}/views/index.vue') + expect(existsSync(new URL('../../../plugins/{plugin_id}/views/index.vue', import.meta.url))).toBe(true) +}}) """ diff --git a/ruoyi-fastapi-backend/cli/runtime/plugin/support.py b/ruoyi-fastapi-backend/cli/runtime/plugin/support.py index 7b412689f..9ad5e402c 100644 --- a/ruoyi-fastapi-backend/cli/runtime/plugin/support.py +++ b/ruoyi-fastapi-backend/cli/runtime/plugin/support.py @@ -866,7 +866,7 @@ class PluginTestPlanBuilder: """ 插件 CLI 测试计划构建器。 - 使用 Builder 模式发现后端 pytest 与前端 node 测试目标,并生成可执行命令。 + 发现后端 pytest 与前端测试目标,并生成可执行命令。 :ivar backend_root: 后端项目根目录 :ivar frontend_root: 前端项目根目录 @@ -939,17 +939,21 @@ def build( frontend_target = self.frontend_root / 'tests' / 'plugins' / plugin_id if frontend_target.exists(): + vitest = self.frontend_root / 'node_modules' / 'vitest' / 'vitest.mjs' + # 独立宿主也可以继续使用其已有的 Node 测试。 + runner = [self.node_executable, str(vitest), 'run'] if vitest.is_file() else [self.node_executable] targets.extend( [ PluginTestTarget( kind='frontend', target_path=test_file, - command=[self.node_executable, str(test_file)], + command=[*runner, str(test_file)], workdir=self.frontend_root, timeout=self.timeout, ) - for test_file in sorted(frontend_target.glob('*.test.*')) - if test_file.suffix in {'.js', '.cjs', '.mjs', '.ts', '.cts', '.mts'} and test_file.is_file() + for test_file in sorted(frontend_target.rglob('*.test.*')) + if test_file.suffix in {'.js', '.jsx', '.cjs', '.mjs', '.ts', '.tsx', '.cts', '.mts'} + and test_file.is_file() ] ) if frontend_build and self.frontend_root.exists(): diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/README.md b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/README.md index c5c270caa..fbe04a278 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/README.md +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/README.md @@ -12,6 +12,9 @@ ```bash pnpm --dir plugins/examples/python/bundle_demo/web install --frozen-lockfile +pnpm --dir plugins/examples/python/bundle_demo/web run lint +pnpm --dir plugins/examples/python/bundle_demo/web run typecheck:tests +pnpm --dir plugins/examples/python/bundle_demo/web test pnpm --dir plugins/examples/python/bundle_demo/web run build ``` diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js index 303bdb713..d74e3f357 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js @@ -1,7 +1,9 @@ +/** @typedef {{ getDelay?: () => number, shouldFail?: () => boolean }} MockOptions */ + /** * 创建仅供本地开发的内存请求适配器,不发送网络请求或保存文件。 * - * @param {Object} options 延迟和故障注入选项 + * @param {MockOptions} [options] 延迟和故障注入选项 * @returns {Function} 可传入宿主桥的异步请求函数 */ export function createMockPluginRequest({ getDelay = () => 300, shouldFail = () => false } = {}) { @@ -70,7 +72,10 @@ export function createMockPluginRequest({ getDelay = () => 300, shouldFail = () } } -/** 创建逐条产出事件的本地适配器,复用延迟和故障开关,支持取消与游标恢复。 */ +/** + * 创建逐条产出事件的本地适配器,复用延迟和故障开关,支持取消与游标恢复。 + * @param {MockOptions} [options] 延迟和故障注入选项 + */ export function createMockPluginStream({ getDelay = () => 300, shouldFail = () => false } = {}) { return async function* (config) { if (config.url !== '/apps/bundle_demo/api/events') throw new Error('模拟实时接口未实现') diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/eslint.config.mjs b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/eslint.config.mjs new file mode 100644 index 000000000..d51e44fa2 --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/eslint.config.mjs @@ -0,0 +1,25 @@ +import tseslint from 'typescript-eslint' + +// Adapted from https://github.com/vuejs/core/blob/main/eslint.config.js +export default [ + { ignores: ['dist/**', 'coverage/**', '**/*.config.*.timestamp-*.{mjs,cjs}'] }, + { + files: ['**/*.{js,mjs,ts}'], + rules: { + 'no-debugger': 'error', + 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], + 'no-dupe-keys': 'error', + 'no-eval': 'error', + 'no-implied-eval': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + }, + }, + { files: ['**/*.{js,mjs}'], rules: { 'no-unused-vars': 'error' } }, + { + files: ['**/*.ts'], + languageOptions: { parser: tseslint.parser }, + plugins: { '@typescript-eslint': tseslint.plugin }, + rules: { '@typescript-eslint/no-unused-vars': 'error' }, + }, +] diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/package.json b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/package.json index 2e627a479..57f2ccd1c 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/package.json +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/package.json @@ -5,10 +5,21 @@ "type": "module", "scripts": { "dev": "vite --host 127.0.0.1 --open /dev.html", - "build": "vite build" + "build": "vite build", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "typecheck:tests": "tsc --project tsconfig.test.json", + "test": "vitest run", + "test:unit": "vitest run", + "test:vitest": "vitest run", + "test:watch": "vitest watch" }, "devDependencies": { - "vite": "8.3.4" + "eslint": "9.39.1", + "typescript": "5.9.3", + "typescript-eslint": "8.48.1", + "vite": "8.3.4", + "vitest": "5.0.5" }, "engines": { "node": "^22.22.2 || ^24.15.0" diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/pnpm-lock.yaml b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/pnpm-lock.yaml index 83dbf0441..49c8528d6 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/pnpm-lock.yaml +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/pnpm-lock.yaml @@ -8,12 +8,92 @@ importers: .: devDependencies: + eslint: + specifier: 9.39.1 + version: 9.39.1(supports-color@7.2.0) + typescript: + specifier: 5.9.3 + version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) vite: specifier: 8.3.4 version: 8.3.4 + vitest: + specifier: 5.0.5 + version: 5.0.5(vite@8.3.4) packages: + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@jridgewell/resolve-uri@3.1.3': + resolution: {integrity: sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@oxc-project/types@0.154.0': resolution: {integrity: sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==} @@ -116,10 +196,231 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@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.11': + resolution: {integrity: sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + 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'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@1.1.22: + resolution: {integrity: sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==} + + brace-expansion@2.1.8: + resolution: {integrity: sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.1.2: + resolution: {integrity: sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + 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.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -129,11 +430,88 @@ packages: picomatch: optional: true + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.6.0: + resolution: {integrity: sha512-1Szo+c/GCm/cKBovrfT0Wpqw7fiqZg/xzlZtLtvWlYyvT4zUGZTS8Qo3sXPQ0nWqMg3N4nEFL2Ukzrjnsopwbg==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.17: + resolution: {integrity: sha512-0c3zcBRlWmcKhcIQWckzkYncJRv5HHB8O32wO/FcWL8DDXWDJgiEF6SX9ThbTv5h/eZ+xJK+VvDjjQ+cQJhp3Q==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} engines: {node: '>= 12.0.0'} @@ -208,11 +586,62 @@ packages: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -224,19 +653,88 @@ packages: resolution: {integrity: sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==} engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + rolldown@1.2.14: resolution: {integrity: sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + semver@7.8.6: + resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + source-map-js@1.2.2: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.4.0: + resolution: {integrity: sha512-PV6lIcJQh57aFeJDwx16JNHmgFRh5xguzallrDW1qe8nAghYgr5MKz2K5k7wEyV/ygZhdnIAP8+HZSarHPBCsg==} + engines: {node: '>=18'} + tinyglobby@0.2.17: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + vite@8.3.4: resolution: {integrity: sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -280,8 +778,138 @@ packages: yaml: optional: true + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.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 + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + snapshots: + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(supports-color@7.2.0))': + dependencies: + eslint: 9.39.1(supports-color@7.2.0) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@7.2.0)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@7.2.0)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@7.2.0) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@jridgewell/resolve-uri@3.1.3': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.3 + '@jridgewell/sourcemap-codec': 1.6.0 + '@oxc-project/types@0.154.0': {} '@rolldown/binding-android-arm-eabi@1.2.14': @@ -331,15 +959,338 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} + '@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.11': {} + + '@types/json-schema@7.0.15': {} + + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(supports-color@7.2.0) + graphemer: 1.4.0 + ignore: 7.0.17 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.48.1(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + debug: 4.4.3(supports-color@7.2.0) + eslint: 9.39.1(supports-color@7.2.0) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.48.1': {} + + '@typescript-eslint/typescript-estree@8.48.1(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 9.0.9 + semver: 7.8.6 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + + '@vitest/mocker@5.0.5(vite@8.3.4)': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.3.4 + + '@vitest/spy@5.0.5': {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@1.1.22: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.8: + dependencies: + balanced-match: 1.0.2 + + callsites@3.1.0: {} + + chai@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + concat-map@0.0.1: {} + + cross-spawn@7.1.2: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@7.2.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 7.2.0 + + deep-is@0.1.4: {} + detect-libc@2.1.2: {} + es-module-lexer@2.3.2: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(supports-color@7.2.0): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@7.2.0) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@7.2.0) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.11 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.1.2 + debug: 4.4.3(supports-color@7.2.0) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.11 + + esutils@2.0.3: {} + + expect-type@1.4.0: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: picomatch: 4.0.7 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.6.0 + keyv: 4.5.4 + + flatted@3.6.0: {} + fsevents@2.3.3: optional: true + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@14.0.0: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + ignore@5.3.2: {} + + ignore@7.0.17: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + isexe@2.0.0: {} + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: optional: true @@ -389,8 +1340,57 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.22 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.8 + + ms@2.1.3: {} + nanoid@3.3.20: {} + natural-compare@1.4.0: {} + + obug@3.0.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + picocolors@1.1.1: {} picomatch@4.0.7: {} @@ -401,6 +1401,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + prelude-ls@1.2.1: {} + + punycode@2.3.1: {} + + resolve-from@4.0.0: {} + rolldown@1.2.14: dependencies: '@oxc-project/types': 0.154.0 @@ -422,13 +1428,58 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.14 '@rolldown/binding-win32-x64-msvc': 1.2.14 + semver@7.8.6: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + source-map-js@1.2.2: {} + std-env@4.3.0: {} + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + tinybench@6.2.5: {} + + tinyexec@1.4.0: {} + tinyglobby@0.2.17: dependencies: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + typescript@5.9.3: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + vite@8.3.4: dependencies: lightningcss: 1.33.0 @@ -438,3 +1489,32 @@ snapshots: tinyglobby: 0.2.17 optionalDependencies: fsevents: 2.3.3 + + vitest@5.0.5(vite@8.3.4): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.3.4) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.4.0 + tinyglobby: 0.2.17 + vite: 8.3.4 + why-is-node-running: 3.2.1 + transitivePeerDependencies: + - msw + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@3.2.1: {} + + word-wrap@1.2.5: {} + + yocto-queue@0.1.0: {} diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tests/mockRequest.test.ts b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tests/mockRequest.test.ts new file mode 100644 index 000000000..1fc4614ed --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tests/mockRequest.test.ts @@ -0,0 +1,28 @@ +import { expect, test, vi } from 'vitest' +import { createMockPluginRequest } from '../dev/mockRequest.js' + +test('inspects the uploaded bytes and reports progress through completion', async () => { + const request = createMockPluginRequest({ getDelay: () => 0 }) + const data = new FormData() + data.append('file', new Blob(['abc']), 'sample.txt') + const onUploadProgress = vi.fn() + + await expect( + request({ url: '/apps/bundle_demo/api/files/inspect', method: 'post', data, onUploadProgress }) + ).resolves.toEqual({ + filename: 'sample.txt', + size: 3, + sha256: 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad', + }) + expect(onUploadProgress.mock.calls).toEqual([ + [{ loaded: 1, total: 3 }], + [{ loaded: 3, total: 3 }], + ]) +}) + +test('rejects a request addressed to another plugin', async () => { + const request = createMockPluginRequest({ getDelay: () => 0 }) + await expect(request({ url: '/apps/other/api/summary', method: 'get' })).rejects.toThrow( + '模拟宿主只处理当前插件 API' + ) +}) diff --git a/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tsconfig.test.json b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tsconfig.test.json new file mode 100644 index 000000000..8fc2e7303 --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/tsconfig.test.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ES2022", "DOM"], + "noEmit": true, + "strict": true, + "skipLibCheck": true, + "allowJs": true + }, + "include": ["tests/**/*.ts"] +} diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/README.md b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/README.md index f53a3a18a..a1feaf6c6 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/README.md +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/README.md @@ -8,6 +8,8 @@ ```bash pnpm --dir plugins/examples/python/task_demo/web install --frozen-lockfile +pnpm --dir plugins/examples/python/task_demo/web run lint +pnpm --dir plugins/examples/python/task_demo/web run typecheck:tests pnpm --dir plugins/examples/python/task_demo/web test pnpm --dir plugins/examples/python/task_demo/web run build python plugins/examples/python/task_demo/build_release.py --output target/task-demo-1.1.0 diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/dev/mockRequest.js b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/dev/mockRequest.js index f02ce8c87..9e4b0df3c 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/dev/mockRequest.js +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/dev/mockRequest.js @@ -45,6 +45,7 @@ function validateTask(data) { /** * 本地内存 API:使用与生产接口一致的分页、筛选、详情和写入契约。 * 只供 dev.html 使用;重载整个页面会重置数据,不请求真实服务、不保存凭据。 + * @param {{ getDelay?: () => number, shouldFail?: () => boolean, getCanWrite?: () => boolean }} [options] */ export function createMockTaskApi({ getDelay = () => 300, diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/eslint.config.mjs b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/eslint.config.mjs new file mode 100644 index 000000000..34b878e9d --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/eslint.config.mjs @@ -0,0 +1,33 @@ +import tseslint from 'typescript-eslint' + +// Console and debugger rules follow https://github.com/vuejs/core/blob/main/eslint.config.js. +export default [ + { ignores: ['dist/**', 'coverage/**', '.vite/**'] }, + { + files: ['**/*.{js,mjs,ts}'], + rules: { + 'no-debugger': 'error', + 'no-dupe-keys': 'error', + 'no-unsafe-finally': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + }, + }, + { + files: ['{src,dev}/**/*.js'], + rules: { + 'no-console': ['error', { allow: ['warn', 'error', 'info'] }], + 'no-unused-vars': ['error', { args: 'none' }], + }, + }, + { + files: ['**/*.ts'], + languageOptions: { parser: tseslint.parser }, + plugins: { '@typescript-eslint': tseslint.plugin }, + rules: { + '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 0 }], + '@typescript-eslint/no-import-type-side-effects': 'error', + }, + }, +] diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/package.json b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/package.json index b9dd95e91..dd6d6b703 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/package.json +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/package.json @@ -6,10 +6,20 @@ "scripts": { "dev": "vite --host 127.0.0.1 --open /dev.html", "build": "vite build", - "test": "node --test tests/mockRequest.test.js" + "test": "vitest run", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "typecheck:tests": "tsc --noEmit -p tsconfig.test.json", + "test:vitest": "vitest run", + "test:unit": "vitest run", + "test:watch": "vitest watch" }, "devDependencies": { - "vite": "8.3.4" + "eslint": "9.39.1", + "typescript": "5.9.3", + "typescript-eslint": "8.48.1", + "vite": "8.3.4", + "vitest": "5.0.5" }, "engines": { "node": "^22.22.2 || ^24.15.0" diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/pnpm-lock.yaml b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/pnpm-lock.yaml index 83dbf0441..49c8528d6 100644 --- a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/pnpm-lock.yaml +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/pnpm-lock.yaml @@ -8,12 +8,92 @@ importers: .: devDependencies: + eslint: + specifier: 9.39.1 + version: 9.39.1(supports-color@7.2.0) + typescript: + specifier: 5.9.3 + version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) vite: specifier: 8.3.4 version: 8.3.4 + vitest: + specifier: 5.0.5 + version: 5.0.5(vite@8.3.4) packages: + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@jridgewell/resolve-uri@3.1.3': + resolution: {integrity: sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.6.0': + resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@oxc-project/types@0.154.0': resolution: {integrity: sha512-KYOUGQFlLWR+s4QMV2Q9ko38TZm7EdO87Qm7rvZLqk/webse/cDjtyxKhg/47l0byCbs/k46LT8qc4PKjAikzA==} @@ -116,10 +196,231 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + '@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.11': + resolution: {integrity: sha512-YBdNe5JcjYR0sPhJW1QIeRCmI11YhYvaRuGCs9+WCeTTb+Yhb2BE2XMe5/wAqF10FK5g3+q1PDhQABfT7aX0gg==} + + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + + acorn@8.19.0: + resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} + engines: {node: '>=0.4.0'} + hasBin: true + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + + 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'} + + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + + brace-expansion@1.1.22: + resolution: {integrity: sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==} + + brace-expansion@2.1.8: + resolution: {integrity: sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==} + + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + + chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + + color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + + color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + + concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + + cross-spawn@7.1.2: + resolution: {integrity: sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==} + engines: {node: '>= 8'} + + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + + 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.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fdir@6.5.0: resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} engines: {node: '>=12.0.0'} @@ -129,11 +430,88 @@ packages: picomatch: optional: true + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.6.0: + resolution: {integrity: sha512-1Szo+c/GCm/cKBovrfT0Wpqw7fiqZg/xzlZtLtvWlYyvT4zUGZTS8Qo3sXPQ0nWqMg3N4nEFL2Ukzrjnsopwbg==} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + + ignore@7.0.17: + resolution: {integrity: sha512-0c3zcBRlWmcKhcIQWckzkYncJRv5HHB8O32wO/FcWL8DDXWDJgiEF6SX9ThbTv5h/eZ+xJK+VvDjjQ+cQJhp3Q==} + engines: {node: '>= 4'} + + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + + is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + + is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} engines: {node: '>= 12.0.0'} @@ -208,11 +586,62 @@ packages: resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} engines: {node: '>= 12.0.0'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -224,19 +653,88 @@ packages: resolution: {integrity: sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==} engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + rolldown@1.2.14: resolution: {integrity: sha512-eTBTTqMR6uHKLgcUqpJP8ntzDI6V4LYA8negAMBEI7gkgVvOdrx6VsvS2Ym+83KhOPdLCHWJu0w7UQFJZhHKNw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + semver@7.8.6: + resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==} + engines: {node: '>=10'} + hasBin: true + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + source-map-js@1.2.2: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + + tinyexec@1.4.0: + resolution: {integrity: sha512-PV6lIcJQh57aFeJDwx16JNHmgFRh5xguzallrDW1qe8nAghYgr5MKz2K5k7wEyV/ygZhdnIAP8+HZSarHPBCsg==} + engines: {node: '>=18'} + tinyglobby@0.2.17: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + vite@8.3.4: resolution: {integrity: sha512-IftLE8phJhdNRIGNEV4JCCvfNScoZQVfcXaN8TQropWGJtOHcu+iAB9pHcuGvmEb/kddw0LBe/jS8ztdC6xdiQ==} engines: {node: ^20.19.0 || >=22.12.0} @@ -280,8 +778,138 @@ packages: yaml: optional: true + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.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 + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + snapshots: + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(supports-color@7.2.0))': + dependencies: + eslint: 9.39.1(supports-color@7.2.0) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@7.2.0)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@7.2.0)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@7.2.0) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + + '@jridgewell/resolve-uri@3.1.3': {} + + '@jridgewell/sourcemap-codec@1.6.0': {} + + '@jridgewell/trace-mapping@0.3.31': + dependencies: + '@jridgewell/resolve-uri': 3.1.3 + '@jridgewell/sourcemap-codec': 1.6.0 + '@oxc-project/types@0.154.0': {} '@rolldown/binding-android-arm-eabi@1.2.14': @@ -331,15 +959,338 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} + '@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.11': {} + + '@types/json-schema@7.0.15': {} + + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(supports-color@7.2.0) + graphemer: 1.4.0 + ignore: 7.0.17 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.48.1(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + debug: 4.4.3(supports-color@7.2.0) + eslint: 9.39.1(supports-color@7.2.0) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.48.1': {} + + '@typescript-eslint/typescript-estree@8.48.1(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@7.2.0) + minimatch: 9.0.9 + semver: 7.8.6 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + + '@vitest/mocker@5.0.5(vite@8.3.4)': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.3.4 + + '@vitest/spy@5.0.5': {} + + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn@8.19.0: {} + + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + + argparse@2.0.1: {} + + assertion-error@2.0.1: {} + + balanced-match@1.0.2: {} + + brace-expansion@1.1.22: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + + brace-expansion@2.1.8: + dependencies: + balanced-match: 1.0.2 + + callsites@3.1.0: {} + + chai@6.3.0: {} + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + color-convert@2.0.1: + dependencies: + color-name: 1.1.4 + + color-name@1.1.4: {} + + concat-map@0.0.1: {} + + cross-spawn@7.1.2: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + + debug@4.4.3(supports-color@7.2.0): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 7.2.0 + + deep-is@0.1.4: {} + detect-libc@2.1.2: {} + es-module-lexer@2.3.2: {} + + escape-string-regexp@4.0.0: {} + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(supports-color@7.2.0): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@7.2.0) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@7.2.0) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.11 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.1.2 + debug: 4.4.3(supports-color@7.2.0) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + transitivePeerDependencies: + - supports-color + + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.11 + + esutils@2.0.3: {} + + expect-type@1.4.0: {} + + fast-deep-equal@3.1.3: {} + + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fdir@6.5.0(picomatch@4.0.7): optionalDependencies: picomatch: 4.0.7 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.6.0 + keyv: 4.5.4 + + flatted@3.6.0: {} + fsevents@2.3.3: optional: true + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + + globals@14.0.0: {} + + graphemer@1.4.0: {} + + has-flag@4.0.0: {} + + ignore@5.3.2: {} + + ignore@7.0.17: {} + + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + + imurmurhash@0.1.4: {} + + is-extglob@2.1.1: {} + + is-glob@4.0.3: + dependencies: + is-extglob: 2.1.1 + + isexe@2.0.0: {} + + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: optional: true @@ -389,8 +1340,57 @@ snapshots: lightningcss-win32-arm64-msvc: 1.33.0 lightningcss-win32-x64-msvc: 1.33.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + + lodash.merge@4.6.2: {} + + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + + minimatch@3.1.5: + dependencies: + brace-expansion: 1.1.22 + + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.8 + + ms@2.1.3: {} + nanoid@3.3.20: {} + natural-compare@1.4.0: {} + + obug@3.0.0: {} + + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + + path-exists@4.0.0: {} + + path-key@3.1.1: {} + picocolors@1.1.1: {} picomatch@4.0.7: {} @@ -401,6 +1401,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + prelude-ls@1.2.1: {} + + punycode@2.3.1: {} + + resolve-from@4.0.0: {} + rolldown@1.2.14: dependencies: '@oxc-project/types': 0.154.0 @@ -422,13 +1428,58 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.2.14 '@rolldown/binding-win32-x64-msvc': 1.2.14 + semver@7.8.6: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + source-map-js@1.2.2: {} + std-env@4.3.0: {} + + strip-json-comments@3.1.1: {} + + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + + tinybench@6.2.5: {} + + tinyexec@1.4.0: {} + tinyglobby@0.2.17: dependencies: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + + typescript-eslint@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@7.2.0)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@5.9.3) + eslint: 9.39.1(supports-color@7.2.0) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + typescript@5.9.3: {} + + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + vite@8.3.4: dependencies: lightningcss: 1.33.0 @@ -438,3 +1489,32 @@ snapshots: tinyglobby: 0.2.17 optionalDependencies: fsevents: 2.3.3 + + vitest@5.0.5(vite@8.3.4): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.3.4) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.4.0 + tinyglobby: 0.2.17 + vite: 8.3.4 + why-is-node-running: 3.2.1 + transitivePeerDependencies: + - msw + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + why-is-node-running@3.2.1: {} + + word-wrap@1.2.5: {} + + yocto-queue@0.1.0: {} diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.js b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.js deleted file mode 100644 index 71e86e696..000000000 --- a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.js +++ /dev/null @@ -1,92 +0,0 @@ -import assert from 'node:assert/strict' -import test from 'node:test' -import { createMockTaskApi } from '../dev/mockRequest.js' - -const draft = { - title: '测试任务', - description: '保留完整说明', - status: 'todo', - priority: 'normal', -} -const call = (api, method, path, extra = {}) => - api.request({ - method, - url: `/apps/task_demo/api/${path}`, - ...extra, - }) - -test('内存数据支持分页、筛选、完整 CRUD 和响应副本隔离', async () => { - const api = createMockTaskApi({ getDelay: () => 0 }) - const first = await call(api, 'get', 'tasks', { - params: { page: 1, pageSize: 10 }, - }) - const second = await call(api, 'get', 'tasks', { - params: { page: 2, pageSize: 10 }, - }) - assert.equal(first.total, 12) - assert.equal(first.items.length, 10) - assert.equal(second.items.length, 2) - assert.equal(new Set([...first.items, ...second.items].map((task) => task.id)).size, 12) - const created = await call(api, 'post', 'tasks', { data: draft }) - assert.equal(created.title, draft.title) - created.title = '修改响应不能污染存储' - assert.equal((await call(api, 'get', `tasks/${created.id}`)).title, draft.title) - const updated = await call(api, 'put', `tasks/${created.id}`, { - data: { ...draft, status: 'done', priority: 'high' }, - }) - assert.equal(updated.createdAt, created.createdAt) - const done = await call(api, 'get', 'tasks', { params: { status: 'done' } }) - assert.ok(done.items.every((task) => task.status === 'done')) - assert.ok(done.items.some((task) => task.id === created.id && task.priority === 'high')) - assert.deepEqual(await call(api, 'delete', `tasks/${created.id}`), { - deleted: true, - }) - await assert.rejects(call(api, 'get', `tasks/${created.id}`), /不存在/) -}) - -test('只读权限在请求层拒绝所有写操作并保留数据', async () => { - let writable = true - const api = createMockTaskApi({ - getDelay: () => 0, - getCanWrite: () => writable, - }) - const task = await call(api, 'post', 'tasks', { data: draft }) - writable = false - assert.equal((await call(api, 'get', 'info')).canWrite, false) - assert.equal((await call(api, 'get', 'tasks')).canWrite, false) - for (const [method, path] of [ - ['post', 'tasks'], - ['put', `tasks/${task.id}`], - ['delete', `tasks/${task.id}`], - ]) { - await assert.rejects(call(api, method, path, { data: draft }), /写入权限/) - } - assert.equal((await call(api, 'get', 'tasks')).total, 13) - assert.equal((await call(api, 'get', `tasks/${task.id}`)).title, draft.title) -}) - -test('失败、取消及无效输入不会产生写入副作用', async () => { - let fail = true - const api = createMockTaskApi({ getDelay: () => 10, shouldFail: () => fail }) - await assert.rejects(call(api, 'post', 'tasks', { data: draft }), /模拟请求失败/) - fail = false - const controller = new AbortController() - const pending = call(api, 'post', 'tasks', { - data: draft, - signal: controller.signal, - }) - controller.abort() - await assert.rejects(pending, /取消/) - for (const data of [ - { ...draft, title: ' ' }, - { ...draft, description: 'x'.repeat(501) }, - { ...draft, status: 'invalid' }, - ]) { - await assert.rejects(call(api, 'post', 'tasks', { data })) - } - assert.equal((await call(api, 'get', 'tasks')).total, 12) - api.clear() - assert.equal((await call(api, 'get', 'tasks')).total, 0) - api.reset() - assert.equal((await call(api, 'get', 'tasks')).total, 12) -}) diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.ts b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.ts new file mode 100644 index 000000000..44bf97d4d --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tests/mockRequest.test.ts @@ -0,0 +1,107 @@ +import { expect, test } from 'vitest' +import { createMockTaskApi } from '../dev/mockRequest.js' + +const draft = { + title: '测试任务', + description: '保留完整说明', + status: 'todo', + priority: 'normal', +} +type TaskApi = ReturnType +type Options = { + params?: Record + data?: typeof draft + signal?: AbortSignal +} +const call = (api: TaskApi, method: string, path: string, extra: Options = {}) => + api.request({ + method, + url: `/apps/task_demo/api/${path}`, + ...extra, + }) + +async function listTasks(api: TaskApi, params: Options['params'] = {}) { + const page = await call(api, 'get', 'tasks', { params }) + if (!('items' in page) || page.items === undefined) throw new Error('列表响应缺少 items') + return page +} + +async function taskResult(request: ReturnType) { + const task = await request + if (!('id' in task)) throw new Error('任务响应缺少 id') + return task +} + +test('内存数据支持分页、筛选、完整 CRUD 和响应副本隔离', async () => { + const api = createMockTaskApi({ getDelay: () => 0 }) + const first = await listTasks(api, { page: 1, pageSize: 10 }) + const second = await listTasks(api, { page: 2, pageSize: 10 }) + expect(first.total).toBe(12) + expect(first.items.length).toBe(10) + expect(second.items.length).toBe(2) + expect(new Set([...first.items, ...second.items].map((task) => task.id)).size).toBe(12) + const created = await taskResult(call(api, 'post', 'tasks', { data: draft })) + expect(created.title).toBe(draft.title) + created.title = '修改响应不能污染存储' + expect((await taskResult(call(api, 'get', `tasks/${created.id}`))).title).toBe(draft.title) + const updated = await taskResult( + call(api, 'put', `tasks/${created.id}`, { + data: { ...draft, status: 'done', priority: 'high' }, + }) + ) + expect(updated.createdAt).toBe(created.createdAt) + const done = await listTasks(api, { status: 'done' }) + expect(done.items.every((task) => task.status === 'done')).toBe(true) + expect(done.items.some((task) => task.id === created.id && task.priority === 'high')).toBe(true) + expect(await call(api, 'delete', `tasks/${created.id}`)).toStrictEqual({ + deleted: true, + }) + await expect(call(api, 'get', `tasks/${created.id}`)).rejects.toThrow(/不存在/) +}) + +test('只读权限在请求层拒绝所有写操作并保留数据', async () => { + let writable = true + const api = createMockTaskApi({ + getDelay: () => 0, + getCanWrite: () => writable, + }) + const task = await taskResult(call(api, 'post', 'tasks', { data: draft })) + writable = false + expect(await call(api, 'get', 'info')).toMatchObject({ canWrite: false }) + expect((await listTasks(api)).canWrite).toBe(false) + for (const [method, path] of [ + ['post', 'tasks'], + ['put', `tasks/${task.id}`], + ['delete', `tasks/${task.id}`], + ]) { + await expect(call(api, method, path, { data: draft })).rejects.toThrow(/写入权限/) + } + expect((await listTasks(api)).total).toBe(13) + expect((await taskResult(call(api, 'get', `tasks/${task.id}`))).title).toBe(draft.title) +}) + +test('失败、取消及无效输入不会产生写入副作用', async () => { + let fail = true + const api = createMockTaskApi({ getDelay: () => 10, shouldFail: () => fail }) + await expect(call(api, 'post', 'tasks', { data: draft })).rejects.toThrow(/模拟请求失败/) + fail = false + const controller = new AbortController() + const pending = call(api, 'post', 'tasks', { + data: draft, + signal: controller.signal, + }) + controller.abort() + await expect(pending).rejects.toThrow(/取消/) + for (const data of [ + { ...draft, title: ' ' }, + { ...draft, description: 'x'.repeat(501) }, + { ...draft, status: 'invalid' }, + ]) { + await expect(call(api, 'post', 'tasks', { data })).rejects.toThrow() + } + expect((await listTasks(api)).total).toBe(12) + api.clear() + expect((await listTasks(api)).total).toBe(0) + api.reset() + expect((await listTasks(api)).total).toBe(12) +}) diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tsconfig.test.json b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tsconfig.test.json new file mode 100644 index 000000000..251ba59d8 --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/tsconfig.test.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Bundler", + "lib": ["ES2024", "DOM"], + "allowJs": true, + "strict": true, + "noEmit": true, + "skipLibCheck": true + }, + "include": ["tests/**/*.ts", "dev/mockRequest.js", "vitest.config.ts"] +} diff --git a/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/vitest.config.ts b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/vitest.config.ts new file mode 100644 index 000000000..48eb1deb3 --- /dev/null +++ b/ruoyi-fastapi-backend/plugins/examples/python/task_demo/web/vitest.config.ts @@ -0,0 +1,5 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { include: ['tests/**/*.test.ts'] }, +}) diff --git a/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_react_scaffold.py b/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_react_scaffold.py index 225747082..11713d786 100644 --- a/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_react_scaffold.py +++ b/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_react_scaffold.py @@ -18,7 +18,7 @@ def test_react_scaffold_generates_checkable_files_and_route_test( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, template: str, selection: str ) -> None: - """生成实际插件并通过后端检查,Node 执行生成的路由测试。""" + """生成实际插件并通过后端检查,在已安装 Web 依赖时用 Vitest 执行路由测试。""" backend = tmp_path / 'backend' container = tmp_path / 'ruoyi-fastapi-frontend' frontend = tmp_path / 'host' if selection == 'package' else container / 'react' / 'web' @@ -71,9 +71,10 @@ def test_react_scaffold_generates_checkable_files_and_route_test( assert before == {path: path.read_bytes() for path in frontend.rglob('*') if path.is_file()} node = shutil.which('node') - if node: + vitest = REACT_ROOT / 'node_modules/vitest/vitest.mjs' + if node and vitest.is_file(): result = subprocess.run( - [node, '--test', str(frontend / 'tests/plugins/react_demo/pluginView.test.js')], + [node, str(vitest), 'run', 'tests/plugins/react_demo/pluginView.test.ts'], cwd=frontend, capture_output=True, text=True, diff --git a/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold.py b/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold.py index 388106b1f..4320d0a6f 100644 --- a/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold.py +++ b/ruoyi-fastapi-backend/tests/cli/runtime/plugin/test_runtime_scaffold.py @@ -103,7 +103,7 @@ def test_plugin_runtime_create_plugin_dry_run_does_not_write_files(tmp_path: Pat assert not (backend_root / 'plugins' / 'demo' / 'plugin.yaml').exists() assert not (backend_root / 'tests' / 'plugins' / 'demo' / 'test_ping.py').exists() assert not ( - project_root / 'ruoyi-fastapi-frontend' / 'vue3' / 'web' / 'tests' / 'plugins' / 'demo' / 'pluginView.test.js' + project_root / 'ruoyi-fastapi-frontend' / 'vue3' / 'web' / 'tests' / 'plugins' / 'demo' / 'pluginView.test.ts' ).exists() @@ -133,7 +133,7 @@ def test_plugin_runtime_create_plugin_uses_runtime_frontend_dir(tmp_path: Path) assert payload['ok'] is True assert (backend_root / 'plugins' / 'demo' / 'plugin.yaml').is_file() assert (frontend_root / 'plugins' / 'demo' / 'views' / 'index.vue').is_file() - assert (frontend_root / 'tests' / 'plugins' / 'demo' / 'pluginView.test.js').is_file() + assert (frontend_root / 'tests' / 'plugins' / 'demo' / 'pluginView.test.ts').is_file() def test_plugin_runtime_create_plugin_auto_detects_vue2_frontend(tmp_path: Path) -> None: @@ -147,14 +147,14 @@ def test_plugin_runtime_create_plugin_auto_detects_vue2_frontend(tmp_path: Path) payload = build_runtime(backend_root, frontend_root=frontend_root).create_plugin('demo', template='crud-page') view_content = (frontend_root / 'plugins' / 'demo' / 'views' / 'index.vue').read_text(encoding='utf-8') - test_content = (frontend_root / 'tests' / 'plugins' / 'demo' / 'pluginView.test.js').read_text(encoding='utf-8') + test_content = (frontend_root / 'tests' / 'plugins' / 'demo' / 'pluginView.test.ts').read_text(encoding='utf-8') assert payload['ok'] is True assert payload['frontendFramework'] == 'vue2' assert '` ) - assert.deepEqual(await checkLocaleRegistration(url), [ + expect(await checkLocaleRegistration(url)).toStrictEqual([ { name: 'host', locales: ['zh-CN', 'en-US'] }, { name: 'plugin.example', locales: ['zh-CN'] }, ]) @@ -81,12 +80,14 @@ for (const locale of ['zh-CN', 'en-US']) { 'src/views/tool/build/Example.vue', `` ) - await assert.rejects(checkLocaleRegistration(url), (error) => { - assert.match(error.message, /Invalid translation message shape/) - assert.ok(error.message.includes(`common:invalid resolves to ${shape} in ${locale}`)) - assert.ok(error.message.includes('src/script.js:1')) - assert.ok(error.message.includes('src/views/tool/build/Example.vue:1')) - assert.equal(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN'), false) + await expect(checkLocaleRegistration(url)).rejects.toSatisfy((error) => { + expect(error.message).toMatch(/Invalid translation message shape/) + expect( + error.message.includes(`common:invalid resolves to ${shape} in ${locale}`) + ).toBeTruthy() + expect(error.message.includes('src/script.js:1')).toBeTruthy() + expect(error.message.includes('src/views/tool/build/Example.vue:1')).toBeTruthy() + expect(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN')).toBe(false) return true }) } finally { diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.ts similarity index 60% rename from ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.ts index f6763d17e..b60057c47 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/plugin.test.ts @@ -1,10 +1,10 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' import { createPluginLocaleRuntime } from '../../src/i18n/plugin.ts' -const entry = (code, fallback = []) => ({ +const entry = (code: string, fallback: string[] = []) => ({ code, + nativeName: code, enabled: true, direction: 'ltr', aliases: [], @@ -21,11 +21,11 @@ function hostRuntime() { resources: Object.fromEntries( hostMeta.locales.map(({ code }) => [code, { common: { hello: code } }]) ), - storage: { get() {}, set() {} }, + storage: { get: () => null, set() {} }, scope: 'plugin-test', }) } -function plugin(host, namespace = 'plugin.demo') { +function plugin(host: ReturnType, namespace = 'plugin.demo') { return createPluginLocaleRuntime({ host, namespace, @@ -46,18 +46,18 @@ test('source plugins resolve the host language using only their own defaults and const host = hostRuntime() const first = plugin(host) const second = plugin(host, 'plugin.other') - assert.equal(first.t('hello'), '你好') + expect(first.t('hello')).toBe('你好') await host.setPreference('en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('hello')).toBe('Hello') + expect(first.t('sourceOnly')).toBe('源语言') await host.setPreference('ja-JP') - assert.equal(host.locale, 'ja-JP') - assert.equal(host.headers['Accept-Language'], 'ja-JP') - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(host.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.other'), false) - assert.equal(second.t('hello'), 'Hello') + expect(host.locale).toBe('ja-JP') + expect(host.headers['Accept-Language']).toBe('ja-JP') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') + expect(host.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(first.engine.hasResourceBundle('en-US', 'plugin.other')).toBe(false) + expect(second.t('hello')).toBe('Hello') }) test('unregistering and registering a plugin changes only its instance and preserves its catalogs', async () => { @@ -66,15 +66,15 @@ test('unregistering and registering a plugin changes only its instance and prese const second = plugin(host, 'plugin.other') first.removePluginLocales() await host.setPreference('en-US') - assert.equal(first.locale, 'zh-CN') - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(second.t('hello'), 'Hello') - assert.equal(host.t('common:hello'), 'en-US') + expect(first.locale).toBe('zh-CN') + expect(first.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(second.t('hello')).toBe('Hello') + expect(host.t('common:hello')).toBe('en-US') first.registerPluginLocales() first.registerPluginLocales() - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') first.removePluginLocales() first.registerPluginLocales() - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('sourceOnly')).toBe('源语言') }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.ts similarity index 81% rename from ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.ts index 5a8c85aee..ec545ff6d 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/project-tooling.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, mkdir, writeFile, readFile, access, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -12,11 +12,12 @@ const plugin = new URL('../../scripts/x18n-project.mjs', import.meta.url).href test('the CLI creates isolated plugin catalogs and scans the form designer source directory', async () => { const root = await mkdtemp(join(tmpdir(), 'react-x18n-project-')) - const run = (...args) => { + const run = (...args: string[]) => { const result = spawnSync(process.execPath, [cli, '--root', root, ...args, '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -50,27 +51,26 @@ export default { }) ) const applied = run('apply', payload) - assert.equal(applied.status, 0, JSON.stringify(applied.report.errors)) - assert.deepEqual( - JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')), - { reply: 'Reply' } - ) - await assert.rejects(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))) + expect(applied.status, JSON.stringify(applied.report.errors)).toBe(0) + expect( + JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')) + ).toStrictEqual({ reply: 'Reply' }) + await expect(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))).rejects.toThrow() const checked = run('check') - assert.equal(checked.status, 1) - assert.ok( + expect(checked.status).toBe(1) + expect( checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'common:designerMissing' && item.file === 'src/views/tool/build/Example.jsx' ) - ) - assert.ok( + ).toBeTruthy() + expect( !checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'plugin.ai:reply' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.mjs deleted file mode 100644 index 55e80954e..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readFileSync } from 'node:fs' -import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' - -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) -const resources = { - 'zh-CN': { common: { sample: '中文' } }, - 'en-US': { common: { sample: 'English' } }, -} -function setup(storage = { get: () => null, set: () => {} }, extra = {}) { - return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra }) -} -const key = 'contract:api:locale:v2:user:7' - -test('declared language families preserve exact variants', () => { - const registry = createLocaleRegistry(meta, resources) - assert.equal(registry.resolve('auto', ['en-GB']), 'en-US') - assert.equal(registry.resolve('auto', ['en-AU']), 'en-US') - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }], - } - const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) - assert.equal(precise.resolve('en-GB'), 'en-GB') - assert.equal(precise.resolve('zh-TW'), 'en-US') - assert.throws( - () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources), - /Invalid language fallback/ - ) -}) - -test('source language supplies missing text independently of the negotiation default', async () => { - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - assert.equal(runtime.registry.resolve('unknown'), 'en-US') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), '中文') - assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称') -}) - -test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { - const data = new Map() - const events = [] - const storage = { - get: (k) => data.get(k), - set: (k, v) => { - data.set(k, v) - events.push([k, v]) - }, - } - const a = setup(storage), - b = setup(storage) - a.setAccount(7, 'zh-CN', '0') - b.setAccount(7, 'zh-CN', '0') - let release - let server = { locale: 'zh-CN', revision: '0' } - const delayed = a.setPreference('en-US', { - save: async () => { - server = { locale: 'en-US', revision: '1' } - const response = { ...server } - await new Promise((resolve) => { - release = resolve - }) - return response - }, - }) - await Promise.resolve() - await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) - a.acceptStorageEvent(key, data.get(key)) - const writes = events.length - release() - await delayed - assert.deepEqual(server, { locale: 'auto', revision: '2' }) - assert.equal(a.preference, 'auto') - assert.equal(b.preference, 'auto') - assert.equal(events.length, writes) - assert.deepEqual(JSON.parse(data.get(key)), server) -}) - -test('out-of-order storage and profile reads preserve the latest decimal revision', () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '9007199254740993') - const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) - data.set(key, old) - runtime.acceptStorageEvent(key, old) - runtime.setAccount(7, 'zh-CN', '9007199254740992') - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '9007199254740993') - assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '9007199254740993') -}) - -test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'en-US', revision: '2' }), - }) - assert.equal(runtime.preferenceRevision, '2') - await assert.rejects( - runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }), - /Invalid locale snapshot/ - ) - assert.equal(runtime.preference, 'en-US') -}) - -test('offline account snapshots and API instances are isolated', async () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '1') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '1') - restored.setAccount(8, 'zh-CN', '0') - restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) - assert.equal(restored.preference, 'zh-CN') - restored.setAccount(null) - assert.equal(restored.preference, 'zh-CN') - assert.equal(restored.loginPreference, null) - const other = setup(storage, { scope: 'other:api' }) - other.initialize(true) - assert.equal(other.accountId, null) - assert.equal(other.preference, 'zh-CN') -}) - -test('refreshing the same account does not cancel a pending save', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '0') - let finish - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - finish = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(7, 'zh-CN', '0') - finish({ locale: 'en-US', revision: '1' }) - await pending - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '1') -}) - -test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'auto', revision: '3' }), - }), - /timeout/ - ) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.preferenceRevision, '3') -}) - -test('invalid profile snapshots leave the current account and its revision intact', () => { - const runtime = setup() - runtime.setAccount(7, 'en-US', '4') - assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/) - assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/) - assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/) - assert.equal(runtime.accountId, '7') - assert.equal(runtime.preferenceRevision, '4') - assert.equal(runtime.preference, 'en-US') -}) - -test('dynamic names keep the database source when an application uses English source catalogs', async () => { - const expanded = { - ...meta, - sourceLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - const translations = { 'en-US': 'Users' } - await runtime.setPreference('en-US') - assert.equal(runtime.resolveText('用户管理', translations), 'Users') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), 'English') - assert.equal(runtime.resolveText('用户管理', translations), '用户管理') -}) - -test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => { - const warn = ctx.mock.method(console, 'warn', () => {}) - const runtime = setup(undefined, { - appVersion: '2.0.0', - resources: { - ...resources, - 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, - }, - }) - const t = runtime.engine.getFixedT('en-US', 'layout') - const options = { name: 'Private name' } - assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name') - assert.equal(t('missing', options), 'Text unavailable') - assert.equal(warn.mock.callCount(), 1) - assert.deepEqual(warn.mock.calls[0].arguments, [ - 'Missing translation', - { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, - ]) -}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.ts b/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.ts new file mode 100644 index 000000000..2cd05aced --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/protocol.test.ts @@ -0,0 +1,264 @@ +import { expect, test, vi } from 'vitest' +import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' + +import localeMetadata from '../../src/i18n/locale-meta.json' +const resources = { + 'zh-CN': { common: { sample: '中文' } }, + 'en-US': { common: { sample: 'English' } }, +} +function setup( + storage: Parameters[0]['storage'] = { + get: () => null, + set: () => {}, + }, + extra: Partial[0]> = {} +) { + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'contract:api', + storage, + ...extra, + }) +} +const key = 'contract:api:locale:v2:user:7' + +test('declared language families preserve exact variants', () => { + const registry = createLocaleRegistry(localeMetadata, resources) + expect(registry.resolve('auto', ['en-GB'])).toBe('en-US') + expect(registry.resolve('auto', ['en-AU'])).toBe('en-US') + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'en-GB', + nativeName: 'British English', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: ['en-US'], + }, + ], + } + const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) + expect(precise.resolve('en-GB')).toBe('en-GB') + expect(precise.resolve('zh-TW')).toBe('en-US') + expect(() => + createLocaleRegistry({ ...localeMetadata, languageFallbacks: { en: 'missing' } }, resources) + ).toThrow(/Invalid language fallback/) +}) + +test('source language supplies missing text independently of the negotiation default', async () => { + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: [], + }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + expect(runtime.registry.resolve('unknown')).toBe('en-US') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('中文') + expect(runtime.resolveText('原始名称', { 'en-US': 'English name' })).toBe('原始名称') +}) + +test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { + const data = new Map() + const events: [string, string][] = [] + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => { + data.set(k, v) + events.push([k, v]) + }, + } + const a = setup(storage), + b = setup(storage) + a.setAccount(7, 'zh-CN', '0') + b.setAccount(7, 'zh-CN', '0') + const gate = Promise.withResolvers() + let server = { locale: 'zh-CN', revision: '0' } + const delayed = a.setPreference('en-US', { + save: async () => { + server = { locale: 'en-US', revision: '1' } + const response = { ...server } + await gate.promise + return response + }, + }) + await Promise.resolve() + await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) + a.acceptStorageEvent(key, data.get(key) ?? null) + const writes = events.length + gate.resolve() + await delayed + expect(server).toStrictEqual({ locale: 'auto', revision: '2' }) + expect(a.preference).toBe('auto') + expect(b.preference).toBe('auto') + expect(events.length).toBe(writes) + expect(JSON.parse(data.get(key) ?? '')).toStrictEqual(server) +}) + +test('out-of-order storage and profile reads preserve the latest decimal revision', () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '9007199254740993') + const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) + data.set(key, old) + runtime.acceptStorageEvent(key, old) + runtime.setAccount(7, 'zh-CN', '9007199254740992') + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('9007199254740993') + expect(JSON.parse(data.get(key) ?? 'null')?.revision).toBe('9007199254740993') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('9007199254740993') +}) + +test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'en-US', revision: '2' }), + }) + expect(runtime.preferenceRevision).toBe('2') + await expect( + runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }) + ).rejects.toThrow(/Invalid locale snapshot/) + expect(runtime.preference).toBe('en-US') +}) + +test('offline account snapshots and API instances are isolated', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '1') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('1') + restored.setAccount(8, 'zh-CN', '0') + restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) + expect(restored.preference).toBe('zh-CN') + restored.setAccount(null) + expect(restored.preference).toBe('zh-CN') + expect(restored.loginPreference).toBe(null) + const other = setup(storage, { scope: 'other:api' }) + other.initialize(true) + expect(other.accountId).toBe(null) + expect(other.preference).toBe('zh-CN') +}) + +test('refreshing the same account does not cancel a pending save', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '0') + const saved = Promise.withResolvers<{ locale: string; revision: string }>() + const pending = runtime.setPreference('en-US', { + save: () => saved.promise, + }) + await Promise.resolve() + runtime.setAccount(7, 'zh-CN', '0') + saved.resolve({ locale: 'en-US', revision: '1' }) + await pending + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('1') +}) + +test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'auto', revision: '3' }), + }) + ).rejects.toThrow(/timeout/) + expect(runtime.preference).toBe('auto') + expect(runtime.preferenceRevision).toBe('3') +}) + +test('invalid profile snapshots leave the current account and its revision intact', () => { + const runtime = setup() + runtime.setAccount(7, 'en-US', '4') + expect(() => Reflect.apply(runtime.setAccount, runtime, [undefined, 'zh-CN', '4'])).toThrow( + /Missing locale account/ + ) + expect(() => Reflect.apply(runtime.setAccount, runtime, [8, 'zh-CN', 4])).toThrow( + /Invalid locale snapshot/ + ) + expect(() => runtime.setAccount(8, 'zh-CN')).toThrow(/Invalid locale snapshot/) + expect(runtime.accountId).toBe('7') + expect(runtime.preferenceRevision).toBe('4') + expect(runtime.preference).toBe('en-US') +}) + +test('dynamic names keep the database source when an application uses English source catalogs', async () => { + const expanded = { + ...localeMetadata, + sourceLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { code: 'ja-JP', nativeName: '日本語', direction: 'ltr', enabled: true, fallback: [] }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + const translations = { 'en-US': 'Users' } + await runtime.setPreference('en-US') + expect(runtime.resolveText('用户管理', translations)).toBe('Users') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('English') + expect(runtime.resolveText('用户管理', translations)).toBe('用户管理') +}) + +test('a missing key keeps explicit fallback text or uses a safe label and reports only once', ({ + onTestFinished, +}) => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) + onTestFinished(() => warn.mockRestore()) + const runtime = setup(undefined, { + appVersion: '2.0.0', + resources: { + ...resources, + 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, + }, + }) + const t = runtime.engine.getFixedT('en-US', 'layout') + const options = { name: 'Private name' } + expect(t('missing', { ...options, defaultValue: 'Hello {{name}}' })).toBe('Hello Private name') + expect(t('missing', options)).toBe('Text unavailable') + expect(warn.mock.calls.length).toBe(1) + expect(warn.mock.calls[0]).toStrictEqual([ + 'Missing translation', + { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, + ]) +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.ts similarity index 58% rename from ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.ts index bb7233272..3dfda7e23 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/runtime.test.ts @@ -1,6 +1,6 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { readdirSync, readFileSync } from 'node:fs' +import type { LocaleResources } from '../../src/i18n/runtime.ts' import { meta, resources } from '../../src/i18n/registry.ts' import { createLocaleRuntime, @@ -20,27 +20,28 @@ test('the registry loads every host catalog in each enabled language', () => { JSON.parse(readFileSync(new URL(file, directory), 'utf8')), ]) ) - assert.deepEqual(resources[code], catalogs) + const catalogsByLocale: LocaleResources = resources + expect(catalogsByLocale[code]).toStrictEqual(catalogs) } }) -function setup(extra = {}) { - const data = new Map() +function setup(extra: Partial[0]> = {}) { + const data = new Map() return createLocaleRuntime({ meta, resources, scope: 'test:api', - storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }, + storage: { get: (k) => data.get(k) ?? null, set: (k, v) => data.set(k, v) }, ...extra, }) } test('canonical locales, explicit aliases, and precise region fallback', () => { const runtime = setup() - assert.equal(normalizeLocale('en_us'), 'en-US') - assert.equal(normalizeLocale('../en'), null) - assert.equal(normalizeLocale('x-acme'), 'x-acme') - assert.equal(runtime.registry.resolve('en'), 'en-US') - assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN') - assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US') + expect(normalizeLocale('en_us')).toBe('en-US') + expect(normalizeLocale('../en')).toBe(null) + expect(normalizeLocale('x-acme')).toBe('x-acme') + expect(runtime.registry.resolve('en')).toBe('en-US') + expect(runtime.registry.resolve('zh-TW')).toBe('zh-CN') + expect(runtime.registry.resolve('auto', ['ja-JP', 'en-US'])).toBe('en-US') }) test('third language is configured, not a two-language branch', async () => { const expanded = { @@ -62,76 +63,76 @@ test('third language is configured, not a two-language branch', async () => { resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, }) await runtime.setPreference('ja-JP') - assert.equal(runtime.locale, 'ja-JP') - assert.equal(runtime.t('common:language'), '言語') - assert.equal(runtime.headers['Accept-Language'], 'ja-JP') - assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name') + expect(runtime.locale).toBe('ja-JP') + expect(runtime.t('common:language')).toBe('言語') + expect(runtime.headers['Accept-Language']).toBe('ja-JP') + expect(runtime.resolveText('原名', { 'en-US': 'Fallback name' })).toBe('Fallback name') }) test('save failure leaves active language and preference intact', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - await assert.rejects( + await expect( runtime.setPreference('en-US', { save: async () => { throw Error('network') }, }) - ) - assert.equal(runtime.locale, 'zh-CN') - assert.equal(runtime.preference, 'zh-CN') + ).rejects.toThrow() + expect(runtime.locale).toBe('zh-CN') + expect(runtime.preference).toBe('zh-CN') }) test('an old save cannot overwrite a new account', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - let done + const saved = Promise.withResolvers() const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - done = resolve - }), + save: () => saved.promise, }) await Promise.resolve() runtime.setAccount(2, 'zh-CN', '0') - done() - await assert.rejects(pending) - assert.equal(runtime.accountId, '2') - assert.equal(runtime.locale, 'zh-CN') + saved.resolve() + await expect(pending).rejects.toThrow() + expect(runtime.accountId).toBe('2') + expect(runtime.locale).toBe('zh-CN') }) test('an explicit login choice survives reload and is consumed only by a matching login', async () => { - const data = new Map() - const storage = { get: (key) => data.get(key), set: (key, value) => data.set(key, value) } + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (key) => data.get(key) ?? null, + set: (key, value) => data.set(key, value), + } const runtime = setup({ storage }) await runtime.setPreference('en-US') const submitted = runtime.loginPreference await runtime.setPreference('auto') runtime.confirmLoginPreference(submitted) - assert.equal(runtime.loginPreference, 'auto') + expect(runtime.loginPreference).toBe('auto') const reloaded = setup({ storage }) reloaded.initialize(false) - assert.equal(reloaded.preference, 'auto') - assert.equal(reloaded.loginPreference, 'auto') + expect(reloaded.preference).toBe('auto') + expect(reloaded.loginPreference).toBe('auto') reloaded.confirmLoginPreference('auto') reloaded.setAccount(1, 'auto', '1') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.loginPreference).toBe(null) await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) reloaded.setAccount(null) - assert.equal(reloaded.preference, 'en-US') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.preference).toBe('en-US') + expect(reloaded.loginPreference).toBe(null) const next = setup({ storage }) next.initialize(false) - assert.equal(next.preference, 'en-US') - assert.equal(next.loginPreference, null) + expect(next.preference).toBe('en-US') + expect(next.loginPreference).toBe(null) next.setAccount(2, 'fr-CA', '0') - assert.equal(next.preference, 'fr-CA') - assert.equal(next.locale, 'zh-CN') + expect(next.preference).toBe('fr-CA') + expect(next.locale).toBe('zh-CN') }) test('auto follows changed device locale without changing the preference', async () => { let device = 'en-US' const runtime = setup({ deviceLocales: () => [device] }) - const languages = [] - const preferences = [] + const languages: string[] = [] + const preferences: string[] = [] runtime.engine.on('languageChanged', (code) => languages.push(code)) runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) await runtime.setPreference('auto') @@ -141,17 +142,17 @@ test('auto follows changed device locale without changing the preference', async device = 'zh-CN' runtime.refreshDeviceLocale() runtime.refreshDeviceLocale() - assert.deepEqual(languages, ['en-US', 'zh-CN']) - assert.deepEqual(preferences, ['auto']) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.locale, 'zh-CN') - assert.equal(oldHeaders['Accept-Language'], 'en-US') + expect(languages).toStrictEqual(['en-US', 'zh-CN']) + expect(preferences).toStrictEqual(['auto']) + expect(runtime.preference).toBe('auto') + expect(runtime.locale).toBe('zh-CN') + expect(oldHeaders['Accept-Language']).toBe('en-US') }) test('preference switches are serialized and recover after failed requests', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - const seen = [] - const save = async (value) => { + const seen: string[] = [] + const save = async (value: string) => { seen.push(value) return { locale: value, revision: String(seen.length) } } @@ -159,17 +160,15 @@ test('preference switches are serialized and recover after failed requests', asy runtime.setPreference('en-US', { save }), runtime.setPreference('zh-CN', { save }), ]) - assert.deepEqual(seen, ['en-US', 'zh-CN']) - assert.equal(runtime.locale, 'zh-CN') + expect(seen).toStrictEqual(['en-US', 'zh-CN']) + expect(runtime.locale).toBe('zh-CN') }) test('fallback cycles and missing resources fail at registration', () => { - assert.throws( - () => - createLocaleRegistry( - { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, - resources - ), - /cycle/ - ) - assert.throws(() => createLocaleRegistry(meta, {}), /Missing/) + expect(() => + createLocaleRegistry( + { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, + resources + ) + ).toThrow(/cycle/) + expect(() => createLocaleRegistry(meta, {})).toThrow(/Missing/) }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.ts similarity index 79% rename from ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.ts index 9f68ee735..a9739cab1 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/workspace.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, readFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { basename, join, dirname, sep } from 'node:path' @@ -14,12 +14,12 @@ const cli = join(dirname(require.resolve('@x18n/cli/package.json')), 'bin.mjs') test('host and plugin checks use independent declared language sets', async () => { const root = await mkdtemp(join(tmpdir(), 'ruoyi-plugin-locales-')) const rootUrl = pathToFileURL(root + sep) - const write = async (file, text) => { + const write = async (file: string, text: string) => { const path = join(root, file) await mkdir(dirname(path), { recursive: true }) await writeFile(path, text) } - const metadata = (codes) => ({ + const metadata = (codes: string[]) => ({ sourceLocale: 'zh-CN', defaultLocale: 'zh-CN', locales: codes.map((code) => ({ @@ -52,38 +52,35 @@ test('host and plugin checks use independent declared language sets', async () = await write('src/example.js', "t('common:greeting')") await write('plugins/ai/views/example.js', "t('plugin.ai:greeting')") const projects = await checkLocaleRegistration(rootUrl) - assert.deepEqual( - projects.map((project) => project.locales.length), - [3, 2] - ) + expect(projects.map((project) => project.locales.length)).toStrictEqual([3, 2]) const check = () => { const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } const valid = check() - assert.equal(valid.status, 0, JSON.stringify(valid.report)) - assert.deepEqual( - valid.report.data.projects.map((project) => [project.name, project.coverage.length]), - [ - ['plugins/ai', 2], - [basename(root), 3], - ] - ) + expect(valid.status, JSON.stringify(valid.report)).toBe(0) + expect( + valid.report.data.projects.map((project) => [project.name, project.coverage.length]) + ).toStrictEqual([ + ['plugins/ai', 2], + [basename(root), 3], + ]) await write( 'plugins/ai/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US', 'ja-JP'])) ) - await assert.rejects(checkLocaleRegistration(rootUrl), /ja-JP/) + await expect(checkLocaleRegistration(rootUrl)).rejects.toThrow(/ja-JP/) await write('plugins/ai/locales/ja-JP.json', JSON.stringify({ greeting: '' })) const missing = check() - assert.equal(missing.status, 1) - assert.ok( + expect(missing.status).toBe(1) + expect( missing.report.diagnostics.some( (item) => item.code === 'empty-translation' && item.locale === 'ja-JP' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.ts similarity index 71% rename from ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.ts index 3f239b9b1..309d58ffc 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/i18n/x18n.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -15,7 +15,7 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a items_one: '{{count}} item', items_other: '{{count}} items', } - async function catalog(code, values) { + async function catalog(code: string, values: Record) { const dir = join(root, 'locales', code) await mkdir(dir, { recursive: true }) await writeFile(join(dir, 'common.json'), JSON.stringify(values)) @@ -24,7 +24,8 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -47,23 +48,27 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a await catalog('en-US', english) await catalog('ja-JP', { greeting: 'こんにちは、{{name}}', items_other: '{{count}} 件' }) let result = check() - assert.equal(result.status, 0, JSON.stringify(result.report.errors)) - assert.equal(result.report.data.projects[0].coverage.length, 3) - assert.ok( + expect(result.status, JSON.stringify(result.report.errors)).toBe(0) + expect(result.report.data.projects[0].coverage.length).toBe(3) + expect( result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0) - ) - assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key')) + ).toBeTruthy() + expect(!result.report.diagnostics.some((item) => item.code === 'unused-key')).toBeTruthy() await catalog('en-US', { items_one: english.items_one, items_other: english.items_other }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'missing-translation') + ).toBeTruthy() await catalog('en-US', { ...english, greeting: 'Hello' }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch') + ).toBeTruthy() await writeFile(join(root, 'src/missing.js'), "t('common:missing')") result = check() - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key')) + expect(result.report.diagnostics.some((item) => item.code === 'missing-key')).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.ts similarity index 50% rename from ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.ts index 84435f0d7..7e98bdffa 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import test from 'node:test' +import { expect, test } from 'vitest' import { buildJobPayload, parseJobParameter } from '../../src/utils/job.ts' test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为数组和对象', () => { @@ -13,16 +12,16 @@ test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为 jobStore: 'redis', } const payload = buildJobPayload(form) - assert.deepEqual(payload.jobArgs, ['tenant,a', 3, true, { nested: [null, 2] }]) - assert.deepEqual(payload.jobKwargs, { enabled: false, limit: 30 }) - assert.equal(payload.misfireGraceTime, null) - assert.equal(payload.jobGroup, '报表') - assert.equal(payload.jobStore, 'redis') - assert.equal(typeof form.jobArgs, 'string') + expect(payload.jobArgs).toStrictEqual(['tenant,a', 3, true, { nested: [null, 2] }]) + expect(payload.jobKwargs).toStrictEqual({ enabled: false, limit: 30 }) + expect(payload.misfireGraceTime).toBe(null) + expect(payload.jobGroup).toBe('报表') + expect(payload.jobStore).toBe('redis') + expect(typeof form.jobArgs).toBe('string') }) test('无参数使用空数组和空对象', () => { - assert.deepEqual(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' }), { + expect(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' })).toStrictEqual({ jobArgs: [], jobKwargs: {}, }) @@ -30,10 +29,10 @@ test('无参数使用空数组和空对象', () => { test('错误的JSON格式和参数结构返回对应字段提示', () => { for (const value of ['', 'a,b', '{broken', '{}', 'true', 'null']) { - assert.throws(() => parseJobParameter(value, 'jobArgs'), /位置参数必须是JSON数组/) + expect(() => parseJobParameter(value, 'jobArgs')).toThrow(/位置参数必须是JSON数组/) } for (const value of ['', '[1]', 'true', 'null', '{broken']) { - assert.throws(() => parseJobParameter(value, 'jobKwargs'), /关键字参数必须是JSON对象/) + expect(() => parseJobParameter(value, 'jobKwargs')).toThrow(/关键字参数必须是JSON对象/) } - assert.throws(() => parseJobParameter('[1e999]', 'jobArgs'), /数字超出可表示范围/) + expect(() => parseJobParameter('[1e999]', 'jobArgs')).toThrow(/数字超出可表示范围/) }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.ts similarity index 62% rename from ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.js rename to ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.ts index c20e5e31c..6a23da2fb 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.js +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.ts @@ -1,11 +1,22 @@ -import assert from 'node:assert/strict' +import type { BridgeMessage } from './messageWindows' +import { expect } from 'vitest' // 最小 bridge v1 JSON 宿主协议夹具,不是历史宿主实现的源码快照。 // 固定旧消息形状;可传入未知能力版本,验证新客户端不会据此发起未协商请求。 -export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabilities }) { +export function createJsonOnlyHost({ + hostWindow, + childWindow, + origin, + capabilities, +}: { + hostWindow: Window + childWindow: Window + origin: string + capabilities?: unknown +}) { const instance = 'json-host-protocol-v1' - const calls = [] - const send = (type, payload, id) => { + const calls: BridgeMessage[] = [] + const send = (type: string, payload: unknown, id?: string) => { childWindow.postMessage( { namespace: 'ruoyi.plugin', @@ -19,21 +30,21 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti origin ) } - const listener = (event) => { - assert.equal(event.origin, origin) - assert.equal(event.source, childWindow) + const listener = (event: MessageEvent) => { + expect(event.origin).toBe(origin) + expect(event.source).toBe(childWindow) const message = event.data - assert.equal(message.namespace, 'ruoyi.plugin') - assert.equal(message.version, 1) - assert.equal(message.pluginId, 'demo') - assert.ok( + expect(message.namespace).toBe('ruoyi.plugin') + expect(message.version).toBe(1) + expect(message.pluginId).toBe('demo') + expect( Object.keys(message).every((key) => ['namespace', 'version', 'pluginId', 'type', 'instance', 'payload', 'id'].includes(key) ) - ) + ).toBe(true) if (message.type === 'ready') { - assert.equal(message.instance, '') - assert.deepEqual(Object.keys(message.payload), ['clientId']) + expect(message.instance).toBe('') + expect(Object.keys(message.payload)).toStrictEqual(['clientId']) send('initialize', { clientId: message.payload.clientId, uiBase: '/apps/demo/ui/', @@ -42,7 +53,7 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti }) return } - assert.equal(message.instance, instance) + expect(message.instance).toBe(instance) if (message.type === 'cancel') return calls.push(message) send( diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/messageWindows.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/messageWindows.ts new file mode 100644 index 000000000..c05260bbd --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/messageWindows.ts @@ -0,0 +1,57 @@ +import { expect } from 'vitest' + +export interface BridgeMessage { + namespace: string + pluginId: string + version: number + sdkVersion?: string + id?: string + type: string + instance: string + payload: Record +} + +interface MessageEventFixture { + data: unknown + source: unknown + origin: string +} + +function createWindow() { + const listeners = new Set<(event: MessageEventFixture) => void>() + const mock = { + listeners, + messages: [] as BridgeMessage[], + addEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.add(listener) + }, + removeEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.delete(listener) + }, + dispatch(event: MessageEventFixture) { + for (const listener of [...listeners]) listener(event) + }, + } + // The SDK requires a Window and only uses its messaging methods. + return mock as typeof mock & Window +} + +export function createMessageWindows(origin: string) { + const hostWindow = createWindow() + const childWindow = createWindow() + for (const [target, source] of [ + [hostWindow, childWindow], + [childWindow, hostWindow], + ]) { + target.postMessage = ( + message: BridgeMessage, + targetOrigin?: string | WindowPostMessageOptions + ) => { + expect(targetOrigin, 'all messages must name an exact origin').toBe(origin) + const data = structuredClone(message) + target.messages.push(data) + queueMicrotask(() => target.dispatch({ data, source, origin })) + } + } + return { hostWindow, childWindow } +} diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.js deleted file mode 100644 index 3fd999c93..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.js +++ /dev/null @@ -1,950 +0,0 @@ -import assert from 'node:assert/strict' -import { - createPluginClient, - createPluginHostBridge, - normalizePluginBase, - PLUGIN_BRIDGE_MAX_BYTES, - PLUGIN_BRIDGE_MAX_FILE_BYTES, - validatePluginApiPath, - validatePluginRoute, - validatePluginSession, -} from '../../src/utils/pluginBridge.js' -import { normalizeTransportPath } from '../../src/utils/transportPath.ts' - -// 文件通过真实结构化克隆进入宿主,表单由宿主重建且仍使用受限会话。 -async function checkFileTransfers() { - const requests = [] - const events = [] - const pair = await setup({ - request: async (config) => { - requests.push(config) - if (config.responseType === 'blob') { - config.onDownloadProgress({ loaded: 6, total: 6 }) - return new Blob(['报告'], { type: 'text/plain' }) - } - assert.equal(config.data.get('category'), 'test') - const file = config.data.get('attachment') - assert.equal(file.name, '报告.txt') - assert.equal(await file.text(), '报告') - config.onUploadProgress({ loaded: 3, total: 6 }) - config.onUploadProgress({ loaded: 6, total: 6 }) - return { received: file.size } - }, - }) - try { - const result = await pair.child.upload( - { - path: 'files/upload', - file: new Blob(['报告']), - filename: '报告.txt', - fieldName: 'attachment', - fields: { category: 'test' }, - }, - { - onProgress: (event) => { - events.push(event) - throw new Error('插件回调错误') - }, - } - ) - assert.deepEqual(result, { received: 6 }) - assert.deepEqual(events.at(-1), { phase: 'upload', loaded: 6, total: 6 }) - const blob = await pair.child.download( - { path: 'files/report', params: { month: '10' } }, - { onProgress: (event) => events.push(event) } - ) - assert.equal(await blob.text(), '报告') - assert.equal(blob.type, 'text/plain') - assert.deepEqual(events.at(-1), { phase: 'download', loaded: 6, total: 6 }) - for (const config of requests) { - assert.equal(config.headers.isToken, false) - assert.equal(config.headers['X-Plugin-CSRF'], sessionData.csrfToken) - assert.equal(config.headers.Authorization, undefined) - assert.equal(config.headers.encrypt, false) - assert.equal(config.timeout, 120000) - assert.equal(config.pluginBridge, true) - } - assert.equal(requests[0].headers['Content-Type'], undefined) - assert.equal(requests[0].url, '/apps/demo/api/files/upload') - assert.equal(pair.child.context.capabilities.files.maxBytes, PLUGIN_BRIDGE_MAX_FILE_BYTES) - } finally { - pair.destroy() - } -} - -const ORIGIN = 'https://example.test' -const sessionData = { - pluginId: 'demo', - bridgeVersion: 1, - uiBase: '/apps/demo/ui/', - apiBase: '/apps/demo/api/', - csrfToken: 'csrf-token-for-tests-only', - expiresIn: 300, -} -const deferred = () => { - let resolve - let reject - const promise = new Promise((a, b) => { - resolve = a - reject = b - }) - return { promise, resolve, reject } -} -const flush = () => new Promise((resolve) => setImmediate(resolve)) - -function windowPair() { - const makeWindow = () => { - const listeners = new Set() - return { - messages: [], - listeners, - addEventListener(type, listener) { - if (type === 'message') listeners.add(listener) - }, - removeEventListener(type, listener) { - if (type === 'message') listeners.delete(listener) - }, - dispatch(event) { - for (const listener of [...listeners]) listener(event) - }, - } - } - const hostWindow = makeWindow() - const childWindow = makeWindow() - for (const [target, source] of [ - [hostWindow, childWindow], - [childWindow, hostWindow], - ]) { - target.postMessage = (data, targetOrigin) => { - assert.equal(targetOrigin, ORIGIN, 'all messages must name an exact origin') - data = structuredClone(data) - target.messages.push(data) - queueMicrotask(() => target.dispatch({ data, source, origin: ORIGIN })) - } - } - return { hostWindow, childWindow } -} - -async function setup({ - request = async () => ({ code: 200, data: 'ok' }), - now = Date.now, - timeoutMs = 15000, - transferTimeoutMs = 120000, - stream, - streamTimeoutMs = 300000, -} = {}) { - const { hostWindow, childWindow } = windowPair() - let target = childWindow - let theme = 'light' - const routes = [] - const host = createPluginHostBridge({ - pluginId: 'demo', - session: validatePluginSession(sessionData, 'demo', '', now()), - getTarget: () => target, - request, - stream, - getContext: () => ({ - theme: { mode: theme }, - language: 'zh-CN', - timeZone: 'Asia/Shanghai', - route: '/', - }), - onRoute: (route) => routes.push(route), - eventTarget: hostWindow, - origin: ORIGIN, - now, - timeoutMs, - transferTimeoutMs, - streamTimeoutMs, - }) - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: childWindow, - parentWindow: hostWindow, - origin: ORIGIN, - transferTimeoutMs, - streamTimeoutMs, - }) - await child.ready - return { - hostWindow, - childWindow, - host, - child, - routes, - replaceTarget: () => { - target = {} - }, - changeTheme: () => { - theme = 'dark' - host.updatePreferences() - }, - destroy: () => { - host.destroy() - child.destroy() - }, - } -} - -assert.equal(normalizePluginBase('/deployment/'), '/deployment') -for (const base of ['//evil.test', 'https://evil.test', '/a/../b', '/%2e', '/x\\y', '/x//y']) { - assert.throws(() => normalizePluginBase(base)) -} -assert.equal(validatePluginSession(sessionData, 'demo', '', 100).expiresAt, 300100) -assert.equal( - validatePluginSession( - { ...sessionData, uiBase: '/prefix/apps/demo/ui/', apiBase: '/prefix/apps/demo/api/' }, - 'demo', - '/prefix' - ).apiBase, - '/prefix/apps/demo/api/' -) -for (const changes of [ - { uiBase: '//evil.test/apps/demo/ui/' }, - { uiBase: 'https://example.test/apps/demo/ui/' }, - { apiBase: '/apps/other/api/' }, - { apiBase: '/prefix/apps/demo/api/' }, - { apiBase: '/apps/demo/api/../' }, - { pluginId: 'other' }, - { expiresIn: 0 }, - { expiresIn: 5000 }, - { bridgeVersion: 2 }, - { csrfToken: 'bad\nheader' }, -]) - assert.throws(() => validatePluginSession({ ...sessionData, ...changes }, 'demo')) -for (const path of ['', 'status', 'model/v1.2', 'reports/2026-10/']) - assert.equal(validatePluginApiPath(path), path) -for (const path of [ - '/status', - '//evil.test', - 'https://evil.test', - '..', - 'a/../b', - 'a/./b', - 'a//b', - 'a\\b', - '%2e%2e/admin', - '%252e%252e', - 'a%2fb', - 'a?x=1', - 'a#hash', - 'a\n', -]) { - assert.throws(() => validatePluginApiPath(path), path) -} -assert.equal(validatePluginRoute('/reports/today'), '/reports/today') -assert.throws(() => validatePluginRoute('//outside')) -assert.throws(() => validatePluginRoute('/../admin')) -assert.equal( - normalizeTransportPath('/root/apps/demo/api/status', '/dev-api', '/root'), - '/apps/demo/api/status' -) -assert.equal( - normalizeTransportPath('/root/plugin/runtime/demo/session', '/dev-api', '/root'), - '/plugin/runtime/demo/session' -) -assert.equal(normalizeTransportPath('/dev-api/system/user', '/dev-api'), '/system/user') -assert.equal(normalizeTransportPath('/dev-api-other/user', '/dev-api'), '/dev-api-other/user') -assert.equal( - normalizeTransportPath('/rooted/apps/demo/api/status', '/dev-api', '/root'), - '/rooted/apps/demo/api/status' -) - -// 验证握手、接口请求和上下文同步,不向子页面传递宿主令牌或 CSRF 令牌。 -{ - const requests = [] - const pair = await setup({ - request: async (config) => { - requests.push(config) - return { code: 200, data: [1, 2] } - }, - }) - assert.equal(pair.child.context.apiBase, '/apps/demo/api/') - assert.equal(pair.child.context.csrfToken, undefined) - const result = await pair.child.request({ - method: 'POST', - path: 'status', - data: { value: 3 }, - params: { page: 1 }, - }) - assert.deepEqual(result, { code: 200, data: [1, 2] }) - assert.equal(requests[0].url, '/apps/demo/api/status') - assert.equal(requests[0].baseURL, '') - assert.deepEqual(requests[0].headers, { - isToken: false, - 'X-Plugin-CSRF': sessionData.csrfToken, - repeatSubmit: false, - }) - assert.equal(requests[0].headers.Authorization, undefined) - assert.equal(requests[0].pluginBridge, true) - pair.changeTheme() - await flush() - assert.equal(pair.child.context.theme.mode, 'dark') - pair.child.navigate('/details') - await flush() - assert.deepEqual(pair.routes, ['/details']) - pair.host.updateRoute('/back') - await flush() - assert.equal(pair.child.context.route, '/back') - const events = [] - pair.child.subscribe((event) => events.push(event.type)) - pair.host.refresh() - await flush() - assert.deepEqual(events, ['refresh']) - pair.destroy() - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 拒绝伪造来源、旧页面随机标识、无效字段和接口路径越界。 -{ - let calls = 0 - const pair = await setup({ - request: async () => { - calls += 1 - return {} - }, - }) - const initialization = pair.childWindow.messages.find((message) => message.type === 'initialize') - const message = { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - type: 'request', - instance: initialization.instance, - id: 'test', - payload: { method: 'GET', path: 'status' }, - } - const emit = (data, origin = ORIGIN, source = pair.childWindow) => - pair.hostWindow.dispatch({ data, origin, source }) - emit(message, 'https://evil.test') - emit(message, ORIGIN, {}) - emit({ ...message, instance: 'previous-frame' }) - emit({ ...message, version: 2 }) - emit({ ...message, pluginId: 'other' }) - emit({ ...message, headers: { Authorization: 'bad' } }) - await flush() - assert.equal(calls, 0) - for (const payload of [ - { method: 'GET', path: '/admin' }, - { method: 'GET', path: 'status', headers: { Authorization: 'bad' } }, - { method: 'GET', path: 'status', baseURL: 'https://evil.test' }, - { method: 'GET', path: 'status', data: {} }, - { method: 'TRACE', path: 'status' }, - { method: 'POST', path: 'status', data: 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES + 1) }, - { method: 'POST', path: 'status', data: JSON.parse('{"__proto__":{"bad":true}}') }, - ]) { - emit({ ...message, payload }) - await flush() - assert.equal(pair.childWindow.messages.at(-1).payload.ok, false) - } - assert.equal(calls, 0) - pair.replaceTarget() - emit(message) - await flush() - assert.equal(calls, 0) - pair.destroy() -} - -// 页面超时、销毁或会话过期后,不再返回旧请求的结果。 -{ - let now = 0 - const pending = deferred() - let captured - const pair = await setup({ - now: () => now, - request: (config) => { - captured = config - return pending.promise - }, - }) - const promise = pair.child.request({ method: 'GET', path: 'slow' }) - const rejected = assert.rejects(promise, /失效/) - await flush() - pair.host.destroy({ logout: true }) - await rejected - assert.equal(captured.signal.aborted, true) - pending.resolve({ secret: 'late-result' }) - await flush() - assert.equal( - pair.childWindow.messages.some((message) => message.type === 'result'), - false - ) - assert.equal(pair.childWindow.listeners.size, 0) - pair.destroy() -} -{ - const pending = deferred() - let captured - const pair = await setup({ - request: (config) => { - captured = config - return pending.promise - }, - timeoutMs: 10, - }) - await assert.rejects(pair.child.request({ method: 'GET', path: 'slow' }), /超时/) - assert.equal(captured.signal.aborted, true) - pending.resolve({ late: true }) - await flush() - assert.equal(pair.childWindow.messages.filter((message) => message.type === 'result').length, 1) - pair.destroy() -} -{ - let now = 0 - let calls = 0 - const pair = await setup({ - now: () => now, - request: async () => { - calls += 1 - return {} - }, - }) - now = 301000 - const controller = new AbortController() - const promise = pair.child.request( - { method: 'GET', path: 'status' }, - { signal: controller.signal } - ) - const rejected = assert.rejects(promise, /取消/) - await flush() - assert.equal(calls, 0) - controller.abort() - await rejected - pair.destroy() -} - -// 会话续期只更新宿主侧会话和 CSRF 令牌,不重新启动子页面 SDK。 -{ - let captured - const pair = await setup({ - request: async (config) => { - captured = config - return {} - }, - }) - pair.host.setSession( - validatePluginSession({ ...sessionData, csrfToken: 'renewed-csrf-token-test' }, 'demo') - ) - await pair.child.request({ method: 'GET', path: 'status' }) - assert.equal(captured.headers['X-Plugin-CSRF'], 'renewed-csrf-token-test') - assert.equal( - pair.childWindow.messages.filter((message) => message.type === 'initialize').length, - 1 - ) - assert.throws(() => pair.host.setSession({ ...sessionData, apiBase: '/apps/other/api/' })) - pair.destroy() -} - -// iframe 重载会保留 WindowProxy,但必须更换文档随机标识并取消旧请求。 -// 旧文档迟到的 ready 消息不能恢复旧连接。 -{ - const pending = deferred() - const captured = [] - const pair = await setup({ - request: (config) => { - captured.push(config) - return config.url.endsWith('/slow') ? pending.promise : Promise.resolve({ code: 200 }) - }, - }) - const oldReady = pair.hostWindow.messages.find((message) => message.type === 'ready') - const oldInit = pair.childWindow.messages.find((message) => message.type === 'initialize') - const oldPromise = pair.child.request({ method: 'GET', path: 'slow' }) - const oldRejected = assert.rejects(oldPromise, /关闭/) - await flush() - // 在同一个子窗口 WindowProxy 上模拟新文档的 SDK。 - const fresh = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - await fresh.ready - assert.equal(captured[0].signal.aborted, true) - const newInit = pair.childWindow.messages - .filter((message) => message.type === 'initialize') - .at(-1) - assert.notEqual(newInit.instance, oldInit.instance) - pair.hostWindow.dispatch({ data: oldReady, origin: ORIGIN, source: pair.childWindow }) - pending.resolve({ data: 'from-old-page' }) - await flush() - assert.equal( - pair.childWindow.messages.filter((message) => message.type === 'initialize').length, - 2 - ) - assert.equal( - pair.childWindow.messages.some((message) => message.type === 'result'), - false - ) - pair.child.destroy() - await oldRejected - assert.deepEqual(await fresh.request({ method: 'GET', path: 'status' }), { code: 200 }) - fresh.destroy() - pair.destroy() -} - -// 验证并发上限和取消行为,服务端异常只返回可展示的错误文本。 -{ - const requests = [] - const pair = await setup({ - request: (config) => { - requests.push(config) - return new Promise(() => {}) - }, - }) - const promises = Array.from({ length: 8 }, () => - pair.child.request({ method: 'GET', path: 'wait' }) - ) - const rejected = promises.map((promise) => assert.rejects(promise, /关闭/)) - await flush() - await assert.rejects(pair.child.request({ method: 'GET', path: 'extra' }), /过多/) - pair.child.destroy() - await Promise.all(rejected) - await flush() - assert.equal(requests.length, 8) - assert.equal( - requests.every((config) => config.signal.aborted), - true - ) - pair.host.destroy() -} -{ - const pair = await setup({ - request: async () => { - throw new Error('secret master token stack trace') - }, - }) - await assert.rejects( - pair.child.request({ method: 'GET', path: 'failure' }), - /^Error: 插件请求失败,请重试$/ - ) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret master'), false) - pair.destroy() -} - -// 宿主无响应时,SDK 应在握手超时后移除监听。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - timeoutMs: 10, - }) - await assert.rejects(child.ready, /初始化超时/) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 首次握手期间支持取消请求,握手前后的排队请求使用相同并发上限。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const controller = new AbortController() - const promise = child.request({ method: 'GET', path: 'status' }, { signal: controller.signal }) - const cancelled = assert.rejects(promise, /已取消/) - controller.abort() - await cancelled - assert.equal( - pair.hostWindow.messages.some((message) => message.type === 'request'), - false - ) - - const pending = Array.from({ length: 8 }, () => child.request({ method: 'GET', path: 'status' })) - const rejected = pending.map((entry) => assert.rejects(entry, /关闭/)) - await assert.rejects(child.request({ method: 'GET', path: 'overflow' }), /过多/) - child.destroy() - await Promise.all(rejected) - assert.equal(pair.childWindow.listeners.size, 0) -} - -await checkFileTransfers() - -// 无效文件在子页面和宿主两侧分别拒绝,下载也不能返回错误信封或过大响应。 -{ - let calls = 0 - const pair = await setup({ - request: async () => { - calls += 1 - return {} - }, - }) - const valid = { path: 'upload', file: new Blob(['test']) } - for (const changes of [ - { file: 'not a file' }, - { file: new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]) }, - { filename: '../secret' }, - { filename: 'bad\nname' }, - { fieldName: 'a\r\nb' }, - { fields: { file: 'duplicate' } }, - { fields: { number: 1 } }, - { params: null }, - { path: '//outside.test' }, - { method: 'GET' }, - { headers: { Authorization: 'forged' } }, - ]) - await assert.rejects(pair.child.upload({ ...valid, ...changes })) - await assert.rejects(pair.child.download({ path: '../outside' })) - await assert.rejects(pair.child.download({ path: 'ok' }, { onProgress: true })) - const init = pair.childWindow.messages.find((message) => message.type === 'initialize') - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: init.instance, - type: 'upload', - id: 'forged-file', - payload: { - method: 'POST', - path: 'upload', - file: 'bad', - fieldName: 'file', - filename: 'x', - fields: {}, - }, - }, - }) - await flush() - assert.equal(calls, 0) - assert.equal( - pair.childWindow.messages.find((message) => message.id === 'forged-file').payload.ok, - false - ) - pair.destroy() -} -for (const body of [ - new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]), - new Blob(['{"code":401,"msg":"secret token"}'], { type: 'application/json' }), - { headers: { authorization: 'secret' } }, -]) { - const pair = await setup({ request: async () => body }) - await assert.rejects(pair.child.download({ path: 'report' }), /插件请求失败/) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret'), false) - pair.destroy() -} -{ - const pair = await setup({ - request: async () => new Blob(['{"report":true}'], { type: 'application/json' }), - }) - assert.equal(await (await pair.child.download({ path: 'report' })).text(), '{"report":true}') - pair.destroy() -} - -// 超限进度立即取消传输;取消和超时之后,迟到进度及响应均被丢弃。 -for (const mode of ['oversize', 'cancel', 'timeout', 'reload']) { - const delayed = deferred() - let config - const events = [] - const pair = await setup({ - transferTimeoutMs: mode === 'timeout' ? 10 : 120000, - request: (value) => { - config = value - return delayed.promise - }, - }) - const controller = new AbortController() - const promise = pair.child.download( - { path: 'report' }, - { signal: controller.signal, onProgress: (event) => events.push(event) } - ) - const rejected = assert.rejects(promise) - await flush() - if (mode === 'oversize') config.onDownloadProgress({ loaded: PLUGIN_BRIDGE_MAX_FILE_BYTES + 1 }) - if (mode === 'cancel') controller.abort() - if (mode === 'reload') { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: '', - type: 'ready', - payload: { clientId: 'new-file-document' }, - }, - }) - pair.child.destroy() - } - await rejected - await flush() - assert.equal(config.signal.aborted, true) - config.onDownloadProgress({ loaded: 3, total: 3 }) - delayed.resolve(new Blob(['old'])) - await flush() - assert.equal(events.length, 0) - pair.destroy() -} - -// 未公布文件能力的旧宿主立即报兼容错误;握手前调用仍可正常排队。 -for (const filesSupported of [false, true]) { - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const pending = child.download({ path: 'report' }) - const clientId = pair.hostWindow.messages[0].payload.clientId - pair.childWindow.dispatch({ - origin: ORIGIN, - source: pair.hostWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - type: 'initialize', - instance: 'host-instance', - payload: { clientId, ...(filesSupported ? { capabilities: { files: { version: 1 } } } : {}) }, - }, - }) - if (filesSupported) { - await flush() - const request = pair.hostWindow.messages.find((message) => message.type === 'download') - assert.ok(request) - const rejected = assert.rejects(pending, /关闭/) - child.destroy() - await rejected - } else { - await assert.rejects(pending, /不支持文件传输/) - child.destroy() - } -} - -// 实时事件按回调 Promise 确认逐条传递,查询、游标与会话信息只交给宿主适配器。 -{ - const gate = deferred() - const events = [] - let produced = 0 - let config - const pair = await setup({ - stream: async function* (value) { - config = value - for (let i = 1; i <= 3; i++) { - produced++ - yield { event: 'tick', data: String(i), id: String(i) } - } - }, - }) - const result = pair.child.stream( - { path: 'events', params: { count: 3 }, lastEventId: '0' }, - { - onEvent: async (event) => { - events.push(event) - if (event.id === '1') await gate.promise - }, - } - ) - await flush() - assert.equal(produced, 1) - assert.equal(events.length, 1) - assert.equal(config.url, '/apps/demo/api/events') - assert.deepEqual(config.params, { count: 3 }) - assert.equal(config.lastEventId, '0') - assert.equal(config.csrfToken, sessionData.csrfToken) - assert.equal(pair.child.context.capabilities.streams.maxConcurrent, 2) - const streamMessage = pair.hostWindow.messages.find((message) => message.type === 'stream') - for (const payload of [{ sequence: 2 }, { sequence: 1, extra: true }]) { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { ...streamMessage, type: 'stream-ack', payload }, - }) - } - await flush() - assert.equal(produced, 1, '无效确认不能提前读取下一条事件') - gate.resolve() - assert.equal(await result, undefined) - await flush() - assert.deepEqual( - events.map((event) => event.id), - ['1', '2', '3'] - ) - assert.equal(config.signal.aborted, true) - pair.destroy() -} - -// 绕过 SDK 直接发送消息仍受宿主路径、字段和连接数校验。 -{ - let opened = 0 - const pair = await setup({ - stream: async function* ({ signal }) { - opened++ - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - }, - }) - const initialize = pair.childWindow.messages.find((message) => message.type === 'initialize') - const sendStream = (id, payload) => - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { ...initialize, type: 'stream', id, payload }, - }) - sendStream('malformed-stream', { path: 'events', headers: { Authorization: 'forbidden' } }) - await flush() - assert.equal(opened, 0) - assert.equal(pair.childWindow.messages.at(-1).payload.ok, false) - for (const id of ['stream-one', 'stream-two', 'stream-three']) sendStream(id, { path: 'events' }) - await flush() - assert.equal(opened, 2) - assert.match( - pair.childWindow.messages.find((message) => message.id === 'stream-three').payload.message, - /连接过多/ - ) - pair.destroy() -} - -// 初始化尚未完成时也计入实时连接数;取消排队请求后可重新排队。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const controller = new AbortController() - const first = child.stream({ path: 'events' }, { onEvent() {}, signal: controller.signal }) - const second = child.stream({ path: 'events' }, { onEvent() {} }) - const firstRejected = assert.rejects(first, /取消/) - const secondRejected = assert.rejects(second, /关闭/) - await assert.rejects(child.stream({ path: 'events' }, { onEvent() {} }), /连接过多/) - controller.abort() - await firstRejected - const replacement = assert.rejects(child.stream({ path: 'events' }, { onEvent() {} }), /关闭/) - child.destroy() - await Promise.all([secondRejected, replacement]) -} - -// 宿主主动关闭使用固定提示,不泄露鉴权异常,也不交付保留的控制消息。 -{ - const pair = await setup({ - stream: async function* () { - yield { id: '1', event: 'tick', data: 'first' } - const error = new Error('secret authentication details') - error.name = 'PluginStreamClosedError' - throw error - }, - }) - const events = [] - await assert.rejects( - pair.child.stream({ path: 'events' }, { onEvent: (event) => events.push(event) }), - /宿主关闭/ - ) - assert.equal(events.length, 1) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret'), false) - pair.destroy() -} - -// 无能力协商的旧宿主不接收流请求;接口路径、任意请求头与游标注入均被拒绝。 -{ - const pair = await setup() - await assert.rejects(pair.child.stream({ path: 'events' }, { onEvent() {} }), /不支持实时/) - for (const payload of [ - { path: '../other' }, - { path: 'events', headers: {} }, - { path: 'events', method: 'POST' }, - { path: 'events', lastEventId: 'bad\nvalue' }, - ]) - await assert.rejects(pair.child.stream(payload, { onEvent() {} })) - await assert.rejects(pair.child.stream({ path: 'events' }), /回调/) - pair.destroy() -} - -// 第三个实时连接被拒绝,普通 JSON 请求仍可进行;取消会关闭底层迭代器。 -{ - const controllers = [new AbortController(), new AbortController()] - let closed = 0 - const pair = await setup({ - stream: async function* ({ signal }) { - try { - yield { event: 'tick', data: 'one', id: '1' } - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - } finally { - closed++ - } - }, - }) - const requests = controllers.map((controller) => - pair.child.stream({ path: 'events' }, { signal: controller.signal, onEvent() {} }) - ) - const rejected = requests.map((promise) => assert.rejects(promise, /取消/)) - await flush() - await assert.rejects(pair.child.stream({ path: 'events' }, { onEvent() {} }), /实时连接过多/) - assert.deepEqual(await pair.child.request({ method: 'GET', path: 'ok' }), { - code: 200, - data: 'ok', - }) - for (const controller of controllers) controller.abort() - await Promise.all(rejected) - await flush() - assert.equal(closed, 2) - pair.destroy() -} - -// 处理失败、超时、页面重载和退出均取消旧流,迟到事件不能更新当前页面。 -for (const mode of ['callback', 'timeout', 'reload', 'logout', 'oversize']) { - const delivered = [] - let signal - let closed = false - const pair = await setup({ - streamTimeoutMs: mode === 'timeout' ? 20 : 300000, - stream: async function* (config) { - signal = config.signal - try { - yield { - event: 'tick', - id: '1', - data: mode === 'oversize' ? 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES) : 'one', - } - if (!signal.aborted) - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - yield { event: 'tick', id: '2', data: 'late' } - } finally { - closed = true - } - }, - }) - const request = pair.child.stream( - { path: 'events' }, - { - onEvent: (event) => { - delivered.push(event.id) - if (mode === 'callback') return Promise.reject(new Error('plugin callback failed')) - }, - } - ) - const rejected = assert.rejects(request) - await flush() - if (mode === 'logout') pair.host.destroy({ logout: true }) - if (mode === 'reload') { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: '', - type: 'ready', - payload: { clientId: 'new-stream-document' }, - }, - }) - pair.child.destroy() - } - await rejected - await flush() - assert.equal(signal.aborted, true) - assert.equal(closed, true) - assert.deepEqual(delivered, mode === 'oversize' ? [] : ['1']) - pair.destroy() -} diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.ts new file mode 100644 index 000000000..9d4ba0d68 --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridge.test.ts @@ -0,0 +1,933 @@ +import { createMessageWindows } from './fixtures/messageWindows' +import { expect, test } from 'vitest' +import { + createPluginClient, + createPluginHostBridge, + normalizePluginBase, + PLUGIN_BRIDGE_MAX_BYTES, + PLUGIN_BRIDGE_MAX_FILE_BYTES, + validatePluginApiPath, + validatePluginRoute, + validatePluginSession, +} from '../../src/utils/pluginBridge.js' +import type { PluginProgress, PluginStreamEvent } from '../../src/utils/pluginBridge.js' +import { normalizeTransportPath } from '../../src/utils/transportPath.ts' + +// 文件通过真实结构化克隆进入宿主,表单由宿主重建且仍使用受限会话。 +async function checkFileTransfers() { + const requests: RequestConfig[] = [] + const events: PluginProgress[] = [] + const pair = await setup({ + request: async (config) => { + requests.push(config) + if (config.responseType === 'blob') { + config.onDownloadProgress({ loaded: 6, total: 6 }) + return new Blob(['报告'], { type: 'text/plain' }) + } + if (!config.data) throw new Error('Expected upload body') + expect(config.data.get('category')).toBe('test') + const file = config.data.get('attachment') + if (!(file instanceof File)) throw new Error('Expected attachment file') + expect(file.name).toBe('报告.txt') + expect(await file.text()).toBe('报告') + config.onUploadProgress({ loaded: 3, total: 6 }) + config.onUploadProgress({ loaded: 6, total: 6 }) + return { received: file.size } + }, + }) + try { + const result = await pair.child.upload( + { + path: 'files/upload', + file: new Blob(['报告']), + filename: '报告.txt', + fieldName: 'attachment', + fields: { category: 'test' }, + }, + { + onProgress: (event) => { + events.push(event) + throw new Error('插件回调错误') + }, + } + ) + expect(result).toStrictEqual({ received: 6 }) + expect(events.at(-1)).toStrictEqual({ phase: 'upload', loaded: 6, total: 6 }) + const blob = await pair.child.download( + { path: 'files/report', params: { month: '10' } }, + { onProgress: (event) => events.push(event) } + ) + expect(await blob.text()).toBe('报告') + expect(blob.type).toBe('text/plain') + expect(events.at(-1)).toStrictEqual({ phase: 'download', loaded: 6, total: 6 }) + for (const config of requests) { + expect(config.headers.isToken).toBe(false) + expect(config.headers['X-Plugin-CSRF']).toBe(sessionData.csrfToken) + expect(config.headers.Authorization).toBe(undefined) + expect(config.headers.encrypt).toBe(false) + expect(config.timeout).toBe(120000) + expect(config.pluginBridge).toBe(true) + } + expect(requests[0].headers['Content-Type']).toBe(undefined) + expect(requests[0].url).toBe('/apps/demo/api/files/upload') + expect(pair.child.context?.capabilities?.files?.maxBytes).toBe(PLUGIN_BRIDGE_MAX_FILE_BYTES) + } finally { + pair.destroy() + } +} + +const ORIGIN = 'https://example.test' +const sessionData = { + pluginId: 'demo', + bridgeVersion: 1, + uiBase: '/apps/demo/ui/', + apiBase: '/apps/demo/api/', + csrfToken: 'csrf-token-for-tests-only', + expiresIn: 300, +} +const flush = () => new Promise((resolve) => setImmediate(resolve)) + +type HostOptions = Parameters[0] +type RequestConfig = { + url: string + headers: Record + baseURL: string + timeout: number + pluginBridge: boolean + responseType?: string + data?: FormData + signal: AbortSignal + onDownloadProgress(event: { loaded: number; total?: number }): void + onUploadProgress(event: { loaded: number; total?: number }): void +} + +async function setup({ + request = async () => ({ code: 200, data: 'ok' }), + now = Date.now, + timeoutMs = 15000, + transferTimeoutMs = 120000, + stream, + streamTimeoutMs = 300000, +}: Pick & { + request?: (config: RequestConfig) => Promise +} = {}) { + const { hostWindow, childWindow } = createMessageWindows(ORIGIN) + let target = childWindow + let theme = 'light' + const routes: string[] = [] + const host = createPluginHostBridge({ + pluginId: 'demo', + session: validatePluginSession(sessionData, 'demo', '', now()), + getTarget: () => target, + request: (config) => request(config as RequestConfig), + stream, + getContext: () => ({ + theme: { mode: theme }, + language: 'zh-CN', + timeZone: 'Asia/Shanghai', + route: '/', + }), + onRoute: (route) => routes.push(route), + eventTarget: hostWindow, + origin: ORIGIN, + now, + timeoutMs, + transferTimeoutMs, + streamTimeoutMs, + }) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: childWindow, + parentWindow: hostWindow, + origin: ORIGIN, + transferTimeoutMs, + streamTimeoutMs, + }) + await child.ready + return { + hostWindow, + childWindow, + host, + child, + routes, + replaceTarget: () => { + target = createMessageWindows(ORIGIN).childWindow + }, + changeTheme: () => { + theme = 'dark' + host.updatePreferences() + }, + destroy: () => { + host.destroy() + child.destroy() + }, + } +} + +test('validates plugin routes, session data and request paths', () => { + expect(normalizePluginBase('/deployment/')).toBe('/deployment') + for (const base of ['//evil.test', 'https://evil.test', '/a/../b', '/%2e', '/x\\y', '/x//y']) { + expect(() => normalizePluginBase(base)).toThrow() + } + expect(validatePluginSession(sessionData, 'demo', '', 100).expiresAt).toBe(300100) + expect( + validatePluginSession( + { ...sessionData, uiBase: '/prefix/apps/demo/ui/', apiBase: '/prefix/apps/demo/api/' }, + 'demo', + '/prefix' + ).apiBase + ).toBe('/prefix/apps/demo/api/') + for (const changes of [ + { uiBase: '//evil.test/apps/demo/ui/' }, + { uiBase: 'https://example.test/apps/demo/ui/' }, + { apiBase: '/apps/other/api/' }, + { apiBase: '/prefix/apps/demo/api/' }, + { apiBase: '/apps/demo/api/../' }, + { pluginId: 'other' }, + { expiresIn: 0 }, + { expiresIn: 5000 }, + { bridgeVersion: 2 }, + { csrfToken: 'bad\nheader' }, + ]) + expect(() => validatePluginSession({ ...sessionData, ...changes }, 'demo')).toThrow() + for (const path of ['', 'status', 'model/v1.2', 'reports/2026-10/']) + expect(validatePluginApiPath(path)).toBe(path) + for (const path of [ + '/status', + '//evil.test', + 'https://evil.test', + '..', + 'a/../b', + 'a/./b', + 'a//b', + 'a\\b', + '%2e%2e/admin', + '%252e%252e', + 'a%2fb', + 'a?x=1', + 'a#hash', + 'a\n', + ]) { + expect(() => validatePluginApiPath(path), path).toThrow() + } + expect(validatePluginRoute('/reports/today')).toBe('/reports/today') + expect(() => validatePluginRoute('//outside')).toThrow() + expect(() => validatePluginRoute('/../admin')).toThrow() + expect(normalizeTransportPath('/root/apps/demo/api/status', '/dev-api', '/root')).toBe( + '/apps/demo/api/status' + ) + expect(normalizeTransportPath('/root/plugin/runtime/demo/session', '/dev-api', '/root')).toBe( + '/plugin/runtime/demo/session' + ) + expect(normalizeTransportPath('/dev-api/system/user', '/dev-api')).toBe('/system/user') + expect(normalizeTransportPath('/dev-api-other/user', '/dev-api')).toBe('/dev-api-other/user') + expect(normalizeTransportPath('/rooted/apps/demo/api/status', '/dev-api', '/root')).toBe( + '/rooted/apps/demo/api/status' + ) +}) + +test('验证握手、接口请求和上下文同步,不向子页面传递宿主令牌或 CSRF 令牌', async () => { + const requests: RequestConfig[] = [] + const pair = await setup({ + request: async (config) => { + requests.push(config) + return { code: 200, data: [1, 2] } + }, + }) + expect(pair.child.context?.apiBase).toBe('/apps/demo/api/') + expect(pair.child.context).not.toHaveProperty('csrfToken') + const result = await pair.child.request({ + method: 'POST', + path: 'status', + data: { value: 3 }, + params: { page: 1 }, + }) + expect(result).toStrictEqual({ code: 200, data: [1, 2] }) + expect(requests[0].url).toBe('/apps/demo/api/status') + expect(requests[0].baseURL).toBe('') + expect(requests[0].headers).toStrictEqual({ + isToken: false, + 'X-Plugin-CSRF': sessionData.csrfToken, + repeatSubmit: false, + }) + expect(requests[0].headers.Authorization).toBe(undefined) + expect(requests[0].pluginBridge).toBe(true) + pair.changeTheme() + await flush() + expect(pair.child.context?.theme?.mode).toBe('dark') + pair.child.navigate('/details') + await flush() + expect(pair.routes).toStrictEqual(['/details']) + pair.host.updateRoute('/back') + await flush() + expect(pair.child.context?.route).toBe('/back') + const events: string[] = [] + pair.child.subscribe((event) => events.push(event.type)) + pair.host.refresh() + await flush() + expect(events).toStrictEqual(['refresh']) + pair.destroy() + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('拒绝伪造来源、旧页面随机标识、无效字段和接口路径越界', async () => { + let calls = 0 + const pair = await setup({ + request: async () => { + calls += 1 + return {} + }, + }) + const initialization = pair.childWindow.messages.find((message) => message.type === 'initialize') + const message = { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + type: 'request', + instance: initialization?.instance, + id: 'test', + payload: { method: 'GET', path: 'status' }, + } + const emit = (data: unknown, origin = ORIGIN, source: unknown = pair.childWindow) => + pair.hostWindow.dispatch({ data, origin, source }) + emit(message, 'https://evil.test') + emit(message, ORIGIN, {}) + emit({ ...message, instance: 'previous-frame' }) + emit({ ...message, version: 2 }) + emit({ ...message, pluginId: 'other' }) + emit({ ...message, headers: { Authorization: 'bad' } }) + await flush() + expect(calls).toBe(0) + for (const payload of [ + { method: 'GET', path: '/admin' }, + { method: 'GET', path: 'status', headers: { Authorization: 'bad' } }, + { method: 'GET', path: 'status', baseURL: 'https://evil.test' }, + { method: 'GET', path: 'status', data: {} }, + { method: 'TRACE', path: 'status' }, + { method: 'POST', path: 'status', data: 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES + 1) }, + { method: 'POST', path: 'status', data: JSON.parse('{"__proto__":{"bad":true}}') }, + ]) { + emit({ ...message, payload }) + await flush() + expect(pair.childWindow.messages.at(-1)?.payload.ok).toBe(false) + } + expect(calls).toBe(0) + pair.replaceTarget() + emit(message) + await flush() + expect(calls).toBe(0) + pair.destroy() +}) + +test('页面超时、销毁或会话过期后,不再返回旧请求的结果', async () => { + { + let now = 0 + const pending = Promise.withResolvers() + const calls: RequestConfig[] = [] + const pair = await setup({ + now: () => now, + request: (config) => { + calls.push(config) + return pending.promise + }, + }) + const promise = pair.child.request({ method: 'GET', path: 'slow' }) + const rejected = expect(promise).rejects.toThrow(/失效/) + await flush() + pair.host.destroy({ logout: true }) + await rejected + expect(calls[0].signal.aborted).toBe(true) + pending.resolve({ secret: 'late-result' }) + await flush() + expect(pair.childWindow.messages.some((message) => message.type === 'result')).toBe(false) + expect(pair.childWindow.listeners.size).toBe(0) + pair.destroy() + } + { + const pending = Promise.withResolvers() + const calls: RequestConfig[] = [] + const pair = await setup({ + request: (config) => { + calls.push(config) + return pending.promise + }, + timeoutMs: 10, + }) + await expect(pair.child.request({ method: 'GET', path: 'slow' })).rejects.toThrow(/超时/) + expect(calls[0].signal.aborted).toBe(true) + pending.resolve({ late: true }) + await flush() + expect(pair.childWindow.messages.filter((message) => message.type === 'result').length).toBe(1) + pair.destroy() + } + { + let now = 0 + let calls = 0 + const pair = await setup({ + now: () => now, + request: async () => { + calls += 1 + return {} + }, + }) + now = 301000 + const controller = new AbortController() + const promise = pair.child.request( + { method: 'GET', path: 'status' }, + { signal: controller.signal } + ) + const rejected = expect(promise).rejects.toThrow(/取消/) + await flush() + expect(calls).toBe(0) + controller.abort() + await rejected + pair.destroy() + } +}) + +test('会话续期只更新宿主侧会话和 CSRF 令牌,不重新启动子页面 SDK', async () => { + const calls: RequestConfig[] = [] + const pair = await setup({ + request: async (config) => { + calls.push(config) + return {} + }, + }) + pair.host.setSession( + validatePluginSession({ ...sessionData, csrfToken: 'renewed-csrf-token-test' }, 'demo') + ) + await pair.child.request({ method: 'GET', path: 'status' }) + expect(calls[0].headers['X-Plugin-CSRF']).toBe('renewed-csrf-token-test') + expect(pair.childWindow.messages.filter((message) => message.type === 'initialize').length).toBe( + 1 + ) + expect(() => + Reflect.apply(pair.host.setSession, pair.host, [ + { ...sessionData, apiBase: '/apps/other/api/' }, + ]) + ).toThrow() + pair.destroy() +}) + +test('iframe 重载会保留 WindowProxy,但必须更换文档随机标识并取消旧请求', async () => { + // 旧文档迟到的 ready 消息不能恢复旧连接。 + { + const pending = Promise.withResolvers() + const captured: RequestConfig[] = [] + const pair = await setup({ + request: (config) => { + captured.push(config) + return config.url.endsWith('/slow') ? pending.promise : Promise.resolve({ code: 200 }) + }, + }) + const oldReady = pair.hostWindow.messages.find((message) => message.type === 'ready') + const oldInit = pair.childWindow.messages.find((message) => message.type === 'initialize') + const oldPromise = pair.child.request({ method: 'GET', path: 'slow' }) + const oldRejected = expect(oldPromise).rejects.toThrow(/关闭/) + await flush() + // 在同一个子窗口 WindowProxy 上模拟新文档的 SDK。 + const fresh = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + await fresh.ready + expect(captured[0].signal.aborted).toBe(true) + const newInit = pair.childWindow.messages + .filter((message) => message.type === 'initialize') + .at(-1) + if (!newInit || !oldInit) throw new Error('Missing initialization message') + expect(newInit.instance).not.toBe(oldInit.instance) + pair.hostWindow.dispatch({ data: oldReady, origin: ORIGIN, source: pair.childWindow }) + pending.resolve({ data: 'from-old-page' }) + await flush() + expect( + pair.childWindow.messages.filter((message) => message.type === 'initialize').length + ).toBe(2) + expect(pair.childWindow.messages.some((message) => message.type === 'result')).toBe(false) + pair.child.destroy() + await oldRejected + expect(await fresh.request({ method: 'GET', path: 'status' })).toStrictEqual({ code: 200 }) + fresh.destroy() + pair.destroy() + } +}) + +test('验证并发上限和取消行为,服务端异常只返回可展示的错误文本', async () => { + { + const requests: RequestConfig[] = [] + const pair = await setup({ + request: (config) => { + requests.push(config) + return new Promise(() => {}) + }, + }) + const promises = Array.from({ length: 8 }, () => + pair.child.request({ method: 'GET', path: 'wait' }) + ) + const rejected = promises.map((promise) => expect(promise).rejects.toThrow(/关闭/)) + await flush() + await expect(pair.child.request({ method: 'GET', path: 'extra' })).rejects.toThrow(/过多/) + pair.child.destroy() + await Promise.all(rejected) + await flush() + expect(requests.length).toBe(8) + expect(requests.every((config) => config.signal.aborted)).toBe(true) + pair.host.destroy() + } + { + const pair = await setup({ + request: async () => { + throw new Error('secret master token stack trace') + }, + }) + await expect(pair.child.request({ method: 'GET', path: 'failure' })).rejects.toMatchObject({ + name: 'Error', + message: '插件请求失败,请重试', + }) + expect(JSON.stringify(pair.childWindow.messages).includes('secret master')).toBe(false) + pair.destroy() + } +}) + +test('宿主无响应时,SDK 应在握手超时后移除监听', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + timeoutMs: 10, + }) + await expect(child.ready).rejects.toThrow(/初始化超时/) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('首次握手期间支持取消请求,握手前后的排队请求使用相同并发上限', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const controller = new AbortController() + const promise = child.request({ method: 'GET', path: 'status' }, { signal: controller.signal }) + const cancelled = expect(promise).rejects.toThrow(/已取消/) + controller.abort() + await cancelled + expect(pair.hostWindow.messages.some((message) => message.type === 'request')).toBe(false) + + const pending = Array.from({ length: 8 }, () => child.request({ method: 'GET', path: 'status' })) + const rejected = pending.map((entry) => expect(entry).rejects.toThrow(/关闭/)) + await expect(child.request({ method: 'GET', path: 'overflow' })).rejects.toThrow(/过多/) + child.destroy() + await Promise.all(rejected) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('transfers structured file payloads through the host', checkFileTransfers) + +test('无效文件在子页面和宿主两侧分别拒绝,下载也不能返回错误信封或过大响应', async () => { + { + let calls = 0 + const pair = await setup({ + request: async () => { + calls += 1 + return {} + }, + }) + const valid = { path: 'upload', file: new Blob(['test']) } + for (const changes of [ + { file: 'not a file' }, + { file: new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]) }, + { filename: '../secret' }, + { filename: 'bad\nname' }, + { fieldName: 'a\r\nb' }, + { fields: { file: 'duplicate' } }, + { fields: { number: 1 } }, + { params: null }, + { path: '//outside.test' }, + { method: 'GET' }, + { headers: { Authorization: 'forged' } }, + ]) + await expect( + Reflect.apply(pair.child.upload, pair.child, [{ ...valid, ...changes }]) + ).rejects.toThrow() + await expect(pair.child.download({ path: '../outside' })).rejects.toThrow() + await expect( + Reflect.apply(pair.child.download, pair.child, [{ path: 'ok' }, { onProgress: true }]) + ).rejects.toThrow() + const init = pair.childWindow.messages.find((message) => message.type === 'initialize') + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: init?.instance, + type: 'upload', + id: 'forged-file', + payload: { + method: 'POST', + path: 'upload', + file: 'bad', + fieldName: 'file', + filename: 'x', + fields: {}, + }, + }, + }) + await flush() + expect(calls).toBe(0) + expect( + pair.childWindow.messages.find((message) => message.id === 'forged-file')?.payload.ok + ).toBe(false) + pair.destroy() + } + for (const body of [ + new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]), + new Blob(['{"code":401,"msg":"secret token"}'], { type: 'application/json' }), + { headers: { authorization: 'secret' } }, + ]) { + const pair = await setup({ request: async () => body }) + await expect(pair.child.download({ path: 'report' })).rejects.toThrow(/插件请求失败/) + expect(JSON.stringify(pair.childWindow.messages).includes('secret')).toBe(false) + pair.destroy() + } + { + const pair = await setup({ + request: async () => new Blob(['{"report":true}'], { type: 'application/json' }), + }) + expect(await (await pair.child.download({ path: 'report' })).text()).toBe('{"report":true}') + pair.destroy() + } +}) + +test('超限进度立即取消传输;取消和超时之后,迟到进度及响应均被丢弃', async () => { + for (const mode of ['oversize', 'cancel', 'timeout', 'reload']) { + const delayed = Promise.withResolvers() + const transfers: RequestConfig[] = [] + const events: PluginProgress[] = [] + const pair = await setup({ + transferTimeoutMs: mode === 'timeout' ? 10 : 120000, + request: (value) => { + transfers.push(value) + return delayed.promise + }, + }) + const controller = new AbortController() + const promise = pair.child.download( + { path: 'report' }, + { signal: controller.signal, onProgress: (event) => events.push(event) } + ) + const rejected = expect(promise).rejects.toThrow() + await flush() + const config = transfers[0] + if (mode === 'oversize') config.onDownloadProgress({ loaded: PLUGIN_BRIDGE_MAX_FILE_BYTES + 1 }) + if (mode === 'cancel') controller.abort() + if (mode === 'reload') { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: '', + type: 'ready', + payload: { clientId: 'new-file-document' }, + }, + }) + pair.child.destroy() + } + await rejected + await flush() + expect(config.signal.aborted).toBe(true) + config.onDownloadProgress({ loaded: 3, total: 3 }) + delayed.resolve(new Blob(['old'])) + await flush() + expect(events.length).toBe(0) + pair.destroy() + } +}) + +test('未公布文件能力的旧宿主立即报兼容错误;握手前调用仍可正常排队', async () => { + for (const filesSupported of [false, true]) { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const pending = child.download({ path: 'report' }) + const clientId = pair.hostWindow.messages[0].payload.clientId + pair.childWindow.dispatch({ + origin: ORIGIN, + source: pair.hostWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + type: 'initialize', + instance: 'host-instance', + payload: { + clientId, + ...(filesSupported ? { capabilities: { files: { version: 1 } } } : {}), + }, + }, + }) + if (filesSupported) { + await flush() + const request = pair.hostWindow.messages.find((message) => message.type === 'download') + expect(request).toBeTruthy() + const rejected = expect(pending).rejects.toThrow(/关闭/) + child.destroy() + await rejected + } else { + await expect(pending).rejects.toThrow(/不支持文件传输/) + child.destroy() + } + } +}) + +test('实时事件按回调 Promise 确认逐条传递,查询、游标与会话信息只交给宿主适配器', async () => { + const gate = Promise.withResolvers() + const events: PluginStreamEvent[] = [] + let produced = 0 + const streams: Parameters>[0][] = [] + const pair = await setup({ + stream: async function* (value) { + streams.push(value) + for (let i = 1; i <= 3; i++) { + produced++ + yield { event: 'tick', data: String(i), id: String(i) } + } + }, + }) + const result = pair.child.stream( + { path: 'events', params: { count: 3 }, lastEventId: '0' }, + { + onEvent: async (event) => { + events.push(event) + if (event.id === '1') await gate.promise + }, + } + ) + await flush() + expect(produced).toBe(1) + expect(events.length).toBe(1) + const config = streams[0] + expect(config.url).toBe('/apps/demo/api/events') + expect(config.params).toStrictEqual({ count: 3 }) + expect(config.lastEventId).toBe('0') + expect(config.csrfToken).toBe(sessionData.csrfToken) + expect(pair.child.context?.capabilities?.streams?.maxConcurrent).toBe(2) + const streamMessage = pair.hostWindow.messages.find((message) => message.type === 'stream') + for (const payload of [{ sequence: 2 }, { sequence: 1, extra: true }]) { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { ...streamMessage, type: 'stream-ack', payload }, + }) + } + await flush() + expect(produced, '无效确认不能提前读取下一条事件').toBe(1) + gate.resolve() + expect(await result).toBe(undefined) + await flush() + expect(events.map((event) => event.id)).toStrictEqual(['1', '2', '3']) + expect(config.signal.aborted).toBe(true) + pair.destroy() +}) + +test('绕过 SDK 直接发送消息仍受宿主路径、字段和连接数校验', async () => { + let opened = 0 + const pair = await setup({ + stream: async function* ({ signal }) { + opened++ + await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) + }, + }) + const initialize = pair.childWindow.messages.find((message) => message.type === 'initialize') + const sendStream = (id: string, payload: unknown) => + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { ...initialize, type: 'stream', id, payload }, + }) + sendStream('malformed-stream', { path: 'events', headers: { Authorization: 'forbidden' } }) + await flush() + expect(opened).toBe(0) + expect(pair.childWindow.messages.at(-1)?.payload.ok).toBe(false) + for (const id of ['stream-one', 'stream-two', 'stream-three']) sendStream(id, { path: 'events' }) + await flush() + expect(opened).toBe(2) + expect( + pair.childWindow.messages.find((message) => message.id === 'stream-three')?.payload.message + ).toMatch(/连接过多/) + pair.destroy() +}) + +test('初始化尚未完成时也计入实时连接数;取消排队请求后可重新排队', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const controller = new AbortController() + const first = child.stream({ path: 'events' }, { onEvent() {}, signal: controller.signal }) + const second = child.stream({ path: 'events' }, { onEvent() {} }) + const firstRejected = expect(first).rejects.toThrow(/取消/) + const secondRejected = expect(second).rejects.toThrow(/关闭/) + await expect(child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow(/连接过多/) + controller.abort() + await firstRejected + const replacement = expect(child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /关闭/ + ) + child.destroy() + await Promise.all([secondRejected, replacement]) +}) + +test('宿主主动关闭使用固定提示,不泄露鉴权异常,也不交付保留的控制消息', async () => { + const pair = await setup({ + stream: async function* () { + yield { id: '1', event: 'tick', data: 'first' } + const error = new Error('secret authentication details') + error.name = 'PluginStreamClosedError' + throw error + }, + }) + const events: PluginStreamEvent[] = [] + await expect( + pair.child.stream( + { path: 'events' }, + { + onEvent: (event) => { + events.push(event) + }, + } + ) + ).rejects.toThrow(/宿主关闭/) + expect(events.length).toBe(1) + expect(JSON.stringify(pair.childWindow.messages).includes('secret')).toBe(false) + pair.destroy() +}) + +test('无能力协商的旧宿主不接收流请求;接口路径、任意请求头与游标注入均被拒绝', async () => { + const pair = await setup() + await expect(pair.child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /不支持实时/ + ) + for (const payload of [ + { path: '../other' }, + { path: 'events', headers: {} }, + { path: 'events', method: 'POST' }, + { path: 'events', lastEventId: 'bad\nvalue' }, + ]) + await expect(pair.child.stream(payload, { onEvent() {} })).rejects.toThrow() + await expect(Reflect.apply(pair.child.stream, pair.child, [{ path: 'events' }])).rejects.toThrow( + /回调/ + ) + pair.destroy() +}) + +test('第三个实时连接被拒绝,普通 JSON 请求仍可进行;取消会关闭底层迭代器', async () => { + const controllers = [new AbortController(), new AbortController()] + let closed = 0 + const pair = await setup({ + stream: async function* ({ signal }) { + try { + yield { event: 'tick', data: 'one', id: '1' } + await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) + } finally { + closed++ + } + }, + }) + const requests = controllers.map((controller) => + pair.child.stream({ path: 'events' }, { signal: controller.signal, onEvent() {} }) + ) + const rejected = requests.map((promise) => expect(promise).rejects.toThrow(/取消/)) + await flush() + await expect(pair.child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /实时连接过多/ + ) + expect(await pair.child.request({ method: 'GET', path: 'ok' })).toStrictEqual({ + code: 200, + data: 'ok', + }) + for (const controller of controllers) controller.abort() + await Promise.all(rejected) + await flush() + expect(closed).toBe(2) + pair.destroy() +}) + +test('处理失败、超时、页面重载和退出均取消旧流,迟到事件不能更新当前页面', async () => { + for (const mode of ['callback', 'timeout', 'reload', 'logout', 'oversize']) { + const delivered: string[] = [] + const signals: AbortSignal[] = [] + let closed = false + const pair = await setup({ + streamTimeoutMs: mode === 'timeout' ? 20 : 300000, + stream: async function* (config) { + signals.push(config.signal) + try { + yield { + event: 'tick', + id: '1', + data: mode === 'oversize' ? 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES) : 'one', + } + if (!config.signal.aborted) + await new Promise((resolve) => + config.signal.addEventListener('abort', resolve, { once: true }) + ) + yield { event: 'tick', id: '2', data: 'late' } + } finally { + closed = true + } + }, + }) + const request = pair.child.stream( + { path: 'events' }, + { + onEvent: (event) => { + delivered.push(event.id) + if (mode === 'callback') return Promise.reject(new Error('plugin callback failed')) + }, + } + ) + const rejected = expect(request).rejects.toThrow() + await flush() + if (mode === 'logout') pair.host.destroy({ logout: true }) + if (mode === 'reload') { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: '', + type: 'ready', + payload: { clientId: 'new-stream-document' }, + }, + }) + pair.child.destroy() + } + await rejected + await flush() + expect(signals[0].aborted).toBe(true) + expect(closed).toBe(true) + expect(delivered).toStrictEqual(mode === 'oversize' ? [] : ['1']) + pair.destroy() + } +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.js deleted file mode 100644 index 28365e41c..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.js +++ /dev/null @@ -1,230 +0,0 @@ -import assert from 'node:assert/strict' -import { createHash } from 'node:crypto' -import { readFileSync } from 'node:fs' -import { - createPluginClient, - createPluginHostBridge, - PLUGIN_BRIDGE_SDK_VERSION, - PLUGIN_BRIDGE_VERSION, - validatePluginSession, -} from '../../src/utils/pluginBridge.js' -import * as legacySdk from './fixtures/bridge-b0d16a3e/pluginBridge.js' -import { createJsonOnlyHost } from './fixtures/json-only-host.js' - -const ORIGIN = 'https://compatibility.test' -const metadata = JSON.parse( - readFileSync(new URL('../../src/utils/pluginBridge.sdk.json', import.meta.url)) -) -const declarations = readFileSync( - new URL('../../src/utils/pluginBridge.d.ts', import.meta.url), - 'utf8' -) -const sourceCommit = 'b0d16a3eae1979afabb838245c00e1f816aa59e9' -const legacyRoot = new URL('./fixtures/bridge-b0d16a3e/', import.meta.url) -const provenance = JSON.parse(readFileSync(new URL('provenance.json', legacyRoot))) - -// 完整快照保留提交中的原始字节,由目录内 .gitattributes 禁止自动换行转换。 -assert.equal(provenance.sourceCommit, sourceCommit) -assert.equal(provenance.sourcePath, 'ruoyi-fastapi-frontend/src/utils/pluginBridge.js') -assert.equal(provenance.sdkVersion, null, '该历史快照没有独立 SDK 版本号') -assert.equal(provenance.bridgeVersion, 1) -assert.equal( - createHash('sha256') - .update(readFileSync(new URL('pluginBridge.js', legacyRoot))) - .digest('hex'), - provenance.sha256 -) -assert.equal(Object.hasOwn(legacySdk, 'PLUGIN_BRIDGE_SDK_VERSION'), false) -assert.deepEqual(metadata, { - schemaVersion: 1, - sdkVersion: PLUGIN_BRIDGE_SDK_VERSION, - bridgeVersion: PLUGIN_BRIDGE_VERSION, - capabilities: { files: 1, streams: 1 }, -}) -assert.equal(PLUGIN_BRIDGE_SDK_VERSION, '1.0.0') -assert.equal(PLUGIN_BRIDGE_VERSION, 1, '源码交付版本不能改变 bridge v1 消息协议') -assert.ok( - declarations - .replaceAll('"', "'") - .includes(`export const PLUGIN_BRIDGE_SDK_VERSION: '${metadata.sdkVersion}'`) -) -assert.ok(declarations.includes(`export const PLUGIN_BRIDGE_VERSION: ${metadata.bridgeVersion}`)) - -function windowPair() { - const makeWindow = () => { - const listeners = new Set() - return { - messages: [], - listeners, - addEventListener(type, listener) { - if (type === 'message') listeners.add(listener) - }, - removeEventListener(type, listener) { - if (type === 'message') listeners.delete(listener) - }, - dispatch(event) { - for (const listener of [...listeners]) listener(event) - }, - } - } - const hostWindow = makeWindow() - const childWindow = makeWindow() - for (const [target, source] of [ - [hostWindow, childWindow], - [childWindow, hostWindow], - ]) { - target.postMessage = (value, targetOrigin) => { - assert.equal(targetOrigin, ORIGIN) - const data = structuredClone(value) - target.messages.push(data) - queueMicrotask(() => target.dispatch({ data, source, origin: ORIGIN })) - } - } - return { hostWindow, childWindow } -} - -function clientOptions({ hostWindow, childWindow }) { - return { - pluginId: 'demo', - eventTarget: childWindow, - parentWindow: hostWindow, - origin: ORIGIN, - timeoutMs: 1000, - } -} - -// 历史客户端使用固定源码;宿主使用当前源码,实际交换 JSON、Blob 与逐条 SSE 消息。 -{ - const pair = windowPair() - const requests = [] - const streams = [] - const session = validatePluginSession( - { - pluginId: 'demo', - bridgeVersion: 1, - uiBase: '/apps/demo/ui/', - apiBase: '/apps/demo/api/', - csrfToken: 'compatibility-csrf-only', - expiresIn: 300, - }, - 'demo' - ) - const host = createPluginHostBridge({ - pluginId: 'demo', - session, - getTarget: () => pair.childWindow, - eventTarget: pair.hostWindow, - origin: ORIGIN, - request: async (config) => { - requests.push(config) - if (config.responseType === 'blob') return new Blob(['legacy download']) - if (config.data instanceof FormData) { - assert.equal(await config.data.get('file').text(), 'legacy upload') - assert.equal(config.data.get('category'), 'compatibility') - return { received: config.data.get('file').size } - } - return { code: 200, data: config.data } - }, - stream: async function* (config) { - streams.push(config) - yield { event: 'tick', data: 'first', id: '5' } - yield { event: 'tick', data: 'second', id: '6' } - }, - }) - const client = legacySdk.createPluginClient(clientOptions(pair)) - try { - const context = await client.ready - assert.equal(context.capabilities.files.version, metadata.capabilities.files) - assert.equal(context.capabilities.streams.version, metadata.capabilities.streams) - assert.deepEqual( - await client.request({ method: 'POST', path: 'echo', data: { value: 'legacy' } }), - { - code: 200, - data: { value: 'legacy' }, - } - ) - assert.deepEqual( - await client.upload({ - path: 'files/upload', - file: new Blob(['legacy upload']), - fields: { category: 'compatibility' }, - }), - { received: 13 } - ) - assert.equal(await (await client.download({ path: 'files/report' })).text(), 'legacy download') - const events = [] - await client.stream( - { path: 'events', params: { count: 6 }, lastEventId: '4' }, - { - async onEvent(event) { - await Promise.resolve() - events.push(event) - }, - } - ) - assert.deepEqual(events, [ - { event: 'tick', data: 'first', id: '5' }, - { event: 'tick', data: 'second', id: '6' }, - ]) - assert.deepEqual( - requests.map((config) => config.url), - ['/apps/demo/api/echo', '/apps/demo/api/files/upload', '/apps/demo/api/files/report'] - ) - for (const config of requests) { - assert.equal(config.headers.isToken, false) - assert.equal(config.headers.Authorization, undefined) - assert.equal(config.headers['X-Plugin-CSRF'], session.csrfToken) - } - assert.equal(streams.length, 1) - assert.equal(streams[0].url, '/apps/demo/api/events') - assert.deepEqual(streams[0].params, { count: 6 }) - assert.equal(streams[0].lastEventId, '4') - assert.equal(streams[0].csrfToken, session.csrfToken) - for (const message of [...pair.hostWindow.messages, ...pair.childWindow.messages]) { - assert.equal(message.version, 1) - assert.equal(message.sdkVersion, undefined) - assert.equal(message.payload?.csrfToken, undefined) - } - } finally { - client.destroy() - host.destroy() - } - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 旧 JSON 协议夹具不公布新增能力;未知版本也必须在客户端拒绝,而非先发送再失败。 -for (const capabilities of [ - undefined, - { files: { version: 2 }, streams: { version: 2 } }, - { files: { version: '1' }, streams: { version: '1' } }, -]) { - const pair = windowPair() - const host = createJsonOnlyHost({ ...pair, origin: ORIGIN, capabilities }) - const client = createPluginClient(clientOptions(pair)) - try { - await client.ready - const payload = { method: 'GET', path: 'info', params: { page: 1 } } - assert.deepEqual(await client.request(payload), { accepted: payload }) - await assert.rejects( - client.upload({ path: 'files/upload', file: new Blob(['test']) }), - /不支持文件传输/ - ) - await assert.rejects(client.download({ path: 'files/report' }), /不支持文件传输/) - await assert.rejects(client.stream({ path: 'events' }, { onEvent() {} }), /不支持实时事件流/) - assert.deepEqual(await client.request(payload), { accepted: payload }) - assert.deepEqual( - host.calls.map((message) => message.type), - ['request', 'request'] - ) - assert.deepEqual( - pair.hostWindow.messages.map((message) => message.type), - ['ready', 'request', 'request'] - ) - } finally { - client.destroy() - host.destroy() - } - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.ts new file mode 100644 index 000000000..879d00103 --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginBridgeCompatibility.test.ts @@ -0,0 +1,203 @@ +import { createMessageWindows } from './fixtures/messageWindows' +import { expect, test } from 'vitest' +import { createHash } from 'node:crypto' +import { readFileSync } from 'node:fs' +import { + createPluginClient, + createPluginHostBridge, + PLUGIN_BRIDGE_SDK_VERSION, + PLUGIN_BRIDGE_VERSION, + validatePluginSession, +} from '../../src/utils/pluginBridge.js' +import * as legacySdk from './fixtures/bridge-b0d16a3e/pluginBridge.js' +import { createJsonOnlyHost } from './fixtures/json-only-host' + +const ORIGIN = 'https://compatibility.test' +const metadata = JSON.parse( + readFileSync(new URL('../../src/utils/pluginBridge.sdk.json', import.meta.url), 'utf8') +) +const declarations = readFileSync( + new URL('../../src/utils/pluginBridge.d.ts', import.meta.url), + 'utf8' +) +const sourceCommit = 'b0d16a3eae1979afabb838245c00e1f816aa59e9' +const legacyRoot = new URL('./fixtures/bridge-b0d16a3e/', import.meta.url) +const provenance = JSON.parse(readFileSync(new URL('provenance.json', legacyRoot), 'utf8')) + +test('supports legacy bridge clients and hosts', async () => { + // 完整快照保留提交中的原始字节,由目录内 .gitattributes 禁止自动换行转换。 + expect(provenance.sourceCommit).toBe(sourceCommit) + expect(provenance.sourcePath).toBe('ruoyi-fastapi-frontend/src/utils/pluginBridge.js') + expect(provenance.sdkVersion, '该历史快照没有独立 SDK 版本号').toBe(null) + expect(provenance.bridgeVersion).toBe(1) + expect( + createHash('sha256') + .update(readFileSync(new URL('pluginBridge.js', legacyRoot))) + .digest('hex') + ).toBe(provenance.sha256) + expect(Object.hasOwn(legacySdk, 'PLUGIN_BRIDGE_SDK_VERSION')).toBe(false) + expect(metadata).toStrictEqual({ + schemaVersion: 1, + sdkVersion: PLUGIN_BRIDGE_SDK_VERSION, + bridgeVersion: PLUGIN_BRIDGE_VERSION, + capabilities: { files: 1, streams: 1 }, + }) + expect(PLUGIN_BRIDGE_SDK_VERSION).toBe('1.0.0') + expect(PLUGIN_BRIDGE_VERSION, '源码交付版本不能改变 bridge v1 消息协议').toBe(1) + expect( + declarations + .replaceAll('"', "'") + .includes(`export const PLUGIN_BRIDGE_SDK_VERSION: '${metadata.sdkVersion}'`) + ).toBeTruthy() + expect( + declarations.includes(`export const PLUGIN_BRIDGE_VERSION: ${metadata.bridgeVersion}`) + ).toBeTruthy() + + function clientOptions({ hostWindow, childWindow }: ReturnType) { + return { + pluginId: 'demo', + eventTarget: childWindow, + parentWindow: hostWindow, + origin: ORIGIN, + timeoutMs: 1000, + } + } + + { + const pair = createMessageWindows(ORIGIN) + const requests: Record[] = [] + const streams: Parameters< + NonNullable[0]['stream']> + >[0][] = [] + const session = validatePluginSession( + { + pluginId: 'demo', + bridgeVersion: 1, + uiBase: '/apps/demo/ui/', + apiBase: '/apps/demo/api/', + csrfToken: 'compatibility-csrf-only', + expiresIn: 300, + }, + 'demo' + ) + const host = createPluginHostBridge({ + pluginId: 'demo', + session, + getTarget: () => pair.childWindow, + eventTarget: pair.hostWindow, + origin: ORIGIN, + request: async (config) => { + requests.push(config) + if (config.responseType === 'blob') return new Blob(['legacy download']) + if (config.data instanceof FormData) { + const file = config.data.get('file') + if (!(file instanceof File)) throw new Error('Expected upload file') + expect(await file.text()).toBe('legacy upload') + expect(config.data.get('category')).toBe('compatibility') + return { received: file.size } + } + return { code: 200, data: config.data } + }, + stream: async function* (config) { + streams.push(config) + yield { event: 'tick', data: 'first', id: '5' } + yield { event: 'tick', data: 'second', id: '6' } + }, + }) + const client = legacySdk.createPluginClient(clientOptions(pair)) as Pick< + ReturnType, + 'ready' | 'request' | 'upload' | 'download' | 'stream' | 'destroy' + > + try { + const context = await client.ready + expect(context.capabilities?.files?.version).toBe(metadata.capabilities.files) + expect(context.capabilities?.streams?.version).toBe(metadata.capabilities.streams) + expect( + await client.request({ method: 'POST', path: 'echo', data: { value: 'legacy' } }) + ).toStrictEqual({ + code: 200, + data: { value: 'legacy' }, + }) + expect( + await client.upload({ + path: 'files/upload', + file: new Blob(['legacy upload']), + fields: { category: 'compatibility' }, + }) + ).toStrictEqual({ received: 13 }) + expect(await (await client.download({ path: 'files/report' })).text()).toBe('legacy download') + const events: import('../../src/utils/pluginBridge.js').PluginStreamEvent[] = [] + await client.stream( + { path: 'events', params: { count: 6 }, lastEventId: '4' }, + { + async onEvent(event) { + await Promise.resolve() + events.push(event) + }, + } + ) + expect(events).toStrictEqual([ + { event: 'tick', data: 'first', id: '5' }, + { event: 'tick', data: 'second', id: '6' }, + ]) + expect(requests.map((config) => config.url)).toStrictEqual([ + '/apps/demo/api/echo', + '/apps/demo/api/files/upload', + '/apps/demo/api/files/report', + ]) + for (const config of requests) { + expect(config.headers).toMatchObject({ isToken: false, 'X-Plugin-CSRF': session.csrfToken }) + expect(config.headers).not.toHaveProperty('Authorization') + } + expect(streams.length).toBe(1) + expect(streams[0].url).toBe('/apps/demo/api/events') + expect(streams[0].params).toStrictEqual({ count: 6 }) + expect(streams[0].lastEventId).toBe('4') + expect(streams[0].csrfToken).toBe(session.csrfToken) + for (const message of [...pair.hostWindow.messages, ...pair.childWindow.messages]) { + expect(message.version).toBe(1) + expect(message.sdkVersion).toBe(undefined) + expect(message.payload?.csrfToken).toBe(undefined) + } + } finally { + client.destroy() + host.destroy() + } + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) + } + + for (const capabilities of [ + undefined, + { files: { version: 2 }, streams: { version: 2 } }, + { files: { version: '1' }, streams: { version: '1' } }, + ]) { + const pair = createMessageWindows(ORIGIN) + const host = createJsonOnlyHost({ ...pair, origin: ORIGIN, capabilities }) + const client = createPluginClient(clientOptions(pair)) + try { + await client.ready + const payload = { method: 'GET' as const, path: 'info', params: { page: 1 } } + expect(await client.request(payload)).toStrictEqual({ accepted: payload }) + await expect( + client.upload({ path: 'files/upload', file: new Blob(['test']) }) + ).rejects.toThrow(/不支持文件传输/) + await expect(client.download({ path: 'files/report' })).rejects.toThrow(/不支持文件传输/) + await expect(client.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /不支持实时事件流/ + ) + expect(await client.request(payload)).toStrictEqual({ accepted: payload }) + expect(host.calls.map((message) => message.type)).toStrictEqual(['request', 'request']) + expect(pair.hostWindow.messages.map((message) => message.type)).toStrictEqual([ + 'ready', + 'request', + 'request', + ]) + } finally { + client.destroy() + host.destroy() + } + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) + } +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.js deleted file mode 100644 index 1b96aa388..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.js +++ /dev/null @@ -1,77 +0,0 @@ -import assert from 'node:assert/strict' -import { - createMockPluginRequest, - createMockPluginStream, -} from '../../../../../ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js' - -const request = createMockPluginRequest({ getDelay: () => 0 }) -const config = (path, options = {}) => ({ - url: '/apps/bundle_demo/api/' + path, - method: 'get', - ...options, -}) -assert.equal((await request(config('summary'))).userName, '本地模拟用户') -assert.equal( - (await request(config('echo', { method: 'post', data: { message: 'test' } }))).message, - 'test' -) -const form = new FormData() -form.append('file', new Blob(['test']), 'test.txt') -const events = [] -const file = await request( - config('files/inspect', { - method: 'post', - data: form, - onUploadProgress: (event) => events.push(event), - }) -) -assert.deepEqual(file, { - filename: 'test.txt', - size: 4, - sha256: '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', -}) -assert.deepEqual( - events.map((event) => event.loaded), - [2, 4] -) -const report = await request(config('files/report')) -assert.match(await report.text(), /local-mock/) -await assert.rejects(request(config('unknown')), /未实现/) -await assert.rejects(request({ url: 'https://outside.test', method: 'get' }), /当前插件/) -const fail = createMockPluginRequest({ getDelay: () => 0, shouldFail: () => true }) -await assert.rejects(fail(config('summary')), /模拟接口失败/) -const controller = new AbortController() -const slow = createMockPluginRequest({ getDelay: () => 5000 }) -const pending = slow(config('summary', { signal: controller.signal })) -const rejected = assert.rejects(pending, /取消/) -controller.abort() -await rejected -await assert.rejects(slow(config('summary', { signal: controller.signal })), /取消/) - -const streamController = new AbortController() -const stream = createMockPluginStream({ getDelay: () => 100 }) -const streamConfig = config('events', { - params: { count: 3 }, - lastEventId: '1', - signal: streamController.signal, -}) -const received = [] -for await (const event of stream(streamConfig)) received.push(event) -assert.deepEqual( - received.map((event) => event.id), - ['2', '3'] -) -assert.equal(JSON.parse(received[0].data).index, 2) -for (const invalid of [{ params: { count: 0 } }, { lastEventId: '1.0' }, { lastEventId: '001' }]) { - await assert.rejects(stream({ ...streamConfig, ...invalid }).next(), /参数无效/) -} -const interrupted = stream(streamConfig) -const next = interrupted.next() -const interruptedResult = assert.rejects(next, /取消/) -streamController.abort() -await interruptedResult -const failedStream = createMockPluginStream({ getDelay: () => 100, shouldFail: () => true }) -await assert.rejects( - failedStream({ ...streamConfig, signal: new AbortController().signal }).next(), - /失败/ -) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.ts new file mode 100644 index 000000000..439a997ae --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginDevMock.test.ts @@ -0,0 +1,84 @@ +import { expect, test } from 'vitest' +import { + createMockPluginRequest, + createMockPluginStream, +} from '../../../../../ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js' + +test('development requests handle summaries, uploads and streams', async () => { + const request = createMockPluginRequest({ getDelay: () => 0 }) + type Options = { + method?: string + data?: FormData | { message: string } + onUploadProgress?: (event: { loaded: number; total: number }) => void + signal?: AbortSignal + params?: { count: number } + lastEventId?: string + } + const config = (path: string, options: Options = {}) => ({ + url: '/apps/bundle_demo/api/' + path, + method: 'get', + ...options, + }) + expect(await request(config('summary'))).toHaveProperty('userName', '本地模拟用户') + expect( + await request(config('echo', { method: 'post', data: { message: 'test' } })) + ).toHaveProperty('message', 'test') + const form = new FormData() + form.append('file', new Blob(['test']), 'test.txt') + const events: { loaded: number; total: number }[] = [] + const file = await request( + config('files/inspect', { + method: 'post', + data: form, + onUploadProgress: (event) => events.push(event), + }) + ) + expect(file).toStrictEqual({ + filename: 'test.txt', + size: 4, + sha256: '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + }) + expect(events.map((event) => event.loaded)).toStrictEqual([2, 4]) + const report = await request(config('files/report')) + if (!(report instanceof Blob)) throw new Error('Expected a report blob') + expect(await report.text()).toMatch(/local-mock/) + await expect(request(config('unknown'))).rejects.toThrow(/未实现/) + await expect(request({ url: 'https://outside.test', method: 'get' })).rejects.toThrow(/当前插件/) + const fail = createMockPluginRequest({ getDelay: () => 0, shouldFail: () => true }) + await expect(fail(config('summary'))).rejects.toThrow(/模拟接口失败/) + const controller = new AbortController() + const slow = createMockPluginRequest({ getDelay: () => 5000 }) + const pending = slow(config('summary', { signal: controller.signal })) + const rejected = expect(pending).rejects.toThrow(/取消/) + controller.abort() + await rejected + await expect(slow(config('summary', { signal: controller.signal }))).rejects.toThrow(/取消/) + + const streamController = new AbortController() + const stream = createMockPluginStream({ getDelay: () => 100 }) + const streamConfig = config('events', { + params: { count: 3 }, + lastEventId: '1', + signal: streamController.signal, + }) + const received = [] + for await (const event of stream(streamConfig)) received.push(event) + expect(received.map((event) => event.id)).toStrictEqual(['2', '3']) + expect(JSON.parse(received[0].data).index).toBe(2) + for (const invalid of [ + { params: { count: 0 } }, + { lastEventId: '1.0' }, + { lastEventId: '001' }, + ]) { + await expect(stream({ ...streamConfig, ...invalid }).next()).rejects.toThrow(/参数无效/) + } + const interrupted = stream(streamConfig) + const next = interrupted.next() + const interruptedResult = expect(next).rejects.toThrow(/取消/) + streamController.abort() + await interruptedResult + const failedStream = createMockPluginStream({ getDelay: () => 100, shouldFail: () => true }) + await expect( + failedStream({ ...streamConfig, signal: new AbortController().signal }).next() + ).rejects.toThrow(/失败/) +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.ts similarity index 50% rename from ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.js rename to ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.ts index c450b27a1..81357854f 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.js +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginProxy.test.ts @@ -1,4 +1,4 @@ -import assert from 'node:assert/strict' +import { expect, test } from 'vitest' import { EventEmitter } from 'node:events' import { readFileSync } from 'node:fs' import { dirname, resolve } from 'node:path' @@ -18,7 +18,7 @@ const originalDirectory = process.cwd() * @param {string|undefined} pluginBase 显式前缀;未指定时使用该环境默认值 * @returns {Promise} 实际代理配置与客户端使用的环境值 */ -async function loadConfiguration(mode, pluginBase) { +async function loadConfiguration(mode: string, pluginBase?: string) { const environment = { ...process.env } const directory = process.cwd() try { @@ -33,7 +33,8 @@ async function loadConfiguration(mode, pluginBase) { frontendRoot, 'silent' ) - assert.ok(loaded, '实际 Vite 配置必须成功加载') + expect(loaded, '实际 Vite 配置必须成功加载').toBeTruthy() + if (!loaded?.config.server?.proxy) throw new Error('Missing Vite proxies') return { proxy: loaded.config.server.proxy, pluginBase: env.VITE_APP_PLUGIN_BASE || '', @@ -54,39 +55,41 @@ async function loadConfiguration(mode, pluginBase) { * @param {Object} appProxy 插件应用的实际 Vite 代理配置 * @returns {void} */ -function checkStreamCleanup(appProxy) { +function checkStreamCleanup(appProxy: import('vite').ProxyOptions) { const proxy = new EventEmitter() - appProxy.configure(proxy) + if (!appProxy.configure) throw new Error('Missing proxy listener') + Reflect.apply(appProxy.configure, appProxy, [proxy, appProxy]) const pair = (contentType = 'text/event-stream; charset=utf-8') => { - const upstream = new EventEmitter() - const response = new EventEmitter() - upstream.headers = { 'content-type': contentType } - upstream.complete = false - upstream.destroy = () => { - upstream.destroyed = true - } - response.destroy = () => { - response.destroyed = true + class ProxyStream extends EventEmitter { + destroyed?: boolean + destroy() { + this.destroyed = true + } } + const upstream = Object.assign(new ProxyStream(), { + headers: { 'content-type': contentType }, + complete: false, + }) + const response = new ProxyStream() proxy.emit('proxyRes', upstream, {}, response) return { upstream, response } } for (const event of ['aborted', 'error']) { const { upstream, response } = pair() upstream.emit(event) - assert.equal(response.destroyed, true, `SSE 上游 ${event} 必须结束下游`) + expect(response.destroyed, `SSE 上游 ${event} 必须结束下游`).toBe(true) } const disconnected = pair() disconnected.response.emit('close') - assert.equal(disconnected.upstream.destroyed, true) + expect(disconnected.upstream.destroyed).toBe(true) const complete = pair() complete.upstream.complete = true complete.response.emit('close') - assert.equal(complete.upstream.destroyed, undefined) + expect(complete.upstream.destroyed).toBe(undefined) const json = pair('application/json') - assert.equal(json.upstream.listenerCount('aborted'), 0) - assert.equal(json.upstream.listenerCount('error'), 0) - assert.equal(json.response.listenerCount('close'), 0) + expect(json.upstream.listenerCount('aborted')).toBe(0) + expect(json.upstream.listenerCount('error')).toBe(0) + expect(json.response.listenerCount('close')).toBe(0) } /** @@ -95,27 +98,32 @@ function checkStreamCleanup(appProxy) { * @param {Object} configuration 实际加载的环境配置 * @returns {void} */ -function checkPluginPaths({ proxy, pluginBase, baseApi }) { +function checkPluginPaths({ + proxy, + pluginBase, + baseApi, +}: Awaited>) { const prefix = normalizePluginBase(pluginBase) const appProxy = proxy[`${prefix}/apps/`] const sessionProxy = proxy[`${prefix}/plugin/runtime/`] - assert.ok(appProxy, '插件应用必须走独立代理') - assert.ok(sessionProxy, '插件会话必须走独立代理') - assert.equal(appProxy.changeOrigin, false) - assert.equal(sessionProxy.changeOrigin, false) - assert.equal(appProxy.ws, true) + expect(appProxy, '插件应用必须走独立代理').toBeTruthy() + expect(sessionProxy, '插件会话必须走独立代理').toBeTruthy() + if (typeof appProxy !== 'object' || typeof sessionProxy !== 'object') + throw new Error('Expected dedicated proxies') + expect(appProxy.changeOrigin).toBe(false) + expect(sessionProxy.changeOrigin).toBe(false) + expect(appProxy.ws).toBe(true) for (const [entry, path] of [ [appProxy, '/apps/bundle_demo/ui/index.html?asset=main.js'], [appProxy, '/apps/task_demo/api/events?tag=first&tag=second&next=%2Fdev-api%2F'], [sessionProxy, '/plugin/runtime/bundle_demo/session?mode=preview'], - ]) { - assert.equal(typeof entry.rewrite, 'function') - assert.equal(entry.rewrite(`${prefix}${path}`), path, '只剥离外部前缀并完整保留查询串') - assert.equal( + ] as const) { + expect(typeof entry.rewrite).toBe('function') + expect(entry.rewrite?.(`${prefix}${path}`), '只剥离外部前缀并完整保留查询串').toBe(path) + expect( normalizeTransportPath(`${prefix}${path}`, baseApi, pluginBase), - path.split('?')[0], 'AAD 使用后端接收到的无前缀路径' - ) + ).toBe(path.split('?')[0]) } for (const pluginId of ['bundle_demo', 'task_demo']) { const session = { @@ -126,7 +134,7 @@ function checkPluginPaths({ proxy, pluginBase, baseApi }) { csrfToken: 'test-plugin-csrf-token', expiresIn: 300, } - assert.deepEqual(validatePluginSession(session, pluginId, pluginBase, 100), { + expect(validatePluginSession(session, pluginId, pluginBase, 100)).toStrictEqual({ ...session, expiresAt: 300100, }) @@ -140,12 +148,13 @@ function checkPluginPaths({ proxy, pluginBase, baseApi }) { * @param {string} filename 已有的后端环境文件名 * @returns {string} 后端应用部署前缀 */ -function readBackendRootPath(filename) { +function readBackendRootPath(filename: string) { const match = readFileSync( resolve(frontendRoot, '../../../ruoyi-fastapi-backend', filename), 'utf8' ).match(/^APP_ROOT_PATH\s*=\s*['"]?([^'"\s#]*)['"]?\s*(?:#.*)?$/m) - assert.ok(match, `${filename} 必须显式配置 APP_ROOT_PATH`) + expect(match, `${filename} 必须显式配置 APP_ROOT_PATH`).toBeTruthy() + if (!match) throw new Error('Missing APP_ROOT_PATH in ' + filename) return match[1] } @@ -157,67 +166,75 @@ function readBackendRootPath(filename) { * @param {string} prefix 客户端与后端共有的部署前缀 * @returns {void} */ -function checkDockerNginx(variant, upstream, prefix) { +function checkDockerNginx(variant: string, upstream: string, prefix: string) { const source = readFileSync(resolve(frontendRoot, `bin/nginx.${variant}.conf`), 'utf8') const locations = [...source.matchAll(/^\s*location\s+\^~\s+(\S+)\s*\{([^{}]*)\}/gm)] - const blocks = {} + const blocks: Record = {} for (const route of ['/apps/', '/plugin/runtime/']) { const matches = locations.filter((match) => match[1] === `${prefix}${route}`) - assert.equal(matches.length, 1, `${variant} 必须有唯一的 ${prefix}${route} 专用代理`) + expect(matches.length, `${variant} 必须有唯一的 ${prefix}${route} 专用代理`).toBe(1) const block = matches[0][2] const proxyPass = block.match(/^\s*proxy_pass\s+(\S+)\s*;/m) - assert.equal(proxyPass?.[1], `http://${upstream}:9099${route}`) - assert.match(block, /^\s*proxy_set_header\s+Host\s+\$http_host\s*;/m) - assert.match(block, /^\s*proxy_set_header\s+X-Forwarded-Proto\s+\$scheme\s*;/m) - assert.ok(!locations.some((match) => match[1] === route), '不得遗留无部署前缀的专用代理') + expect(proxyPass?.[1]).toBe(`http://${upstream}:9099${route}`) + expect(block).toMatch(/^\s*proxy_set_header\s+Host\s+\$http_host\s*;/m) + expect(block).toMatch(/^\s*proxy_set_header\s+X-Forwarded-Proto\s+\$scheme\s*;/m) + expect( + !locations.some((match) => match[1] === route), + '不得遗留无部署前缀的专用代理' + ).toBeTruthy() blocks[route] = block } - assert.match(blocks['/apps/'], /^\s*proxy_http_version\s+1\.1\s*;/m) - assert.match(blocks['/apps/'], /^\s*proxy_set_header\s+Upgrade\s+\$http_upgrade\s*;/m) - assert.match( - blocks['/apps/'], + expect(blocks['/apps/']).toMatch(/^\s*proxy_http_version\s+1\.1\s*;/m) + expect(blocks['/apps/']).toMatch(/^\s*proxy_set_header\s+Upgrade\s+\$http_upgrade\s*;/m) + expect(blocks['/apps/']).toMatch( /^\s*proxy_set_header\s+Connection\s+\$plugin_connection_upgrade\s*;/m ) - assert.match(blocks['/apps/'], /^\s*proxy_buffering\s+off\s*;/m) - assert.match(blocks['/apps/'], /^\s*proxy_read_timeout\s+300s\s*;/m) - assert.match( - blocks['/plugin/runtime/'], + expect(blocks['/apps/']).toMatch(/^\s*proxy_buffering\s+off\s*;/m) + expect(blocks['/apps/']).toMatch(/^\s*proxy_read_timeout\s+300s\s*;/m) + expect(blocks['/plugin/runtime/']).toMatch( /^\s*add_header\s+Cache-Control\s+"no-store"\s+always\s*;/m ) const upgradeMap = source.match( /^\s*map\s+\$http_upgrade\s+\$plugin_connection_upgrade\s*\{([^{}]*)\}/m ) - assert.ok(upgradeMap, 'WebSocket 的 Connection 请求头必须按 Upgrade 状态切换') - assert.match(upgradeMap[1], /^\s*default\s+upgrade\s*;/m) - assert.match(upgradeMap[1], /^\s*''\s+close\s*;/m) + expect(upgradeMap, 'WebSocket 的 Connection 请求头必须按 Upgrade 状态切换').toBeTruthy() + expect(upgradeMap?.[1]).toMatch(/^\s*default\s+upgrade\s*;/m) + expect(upgradeMap?.[1]).toMatch(/^\s*''\s+close\s*;/m) } -for (const [mode, expectedBase, backendFiles] of [ - ['development', '/dev-api', ['.env.dev']], - ['production', '/prod-api', ['.env.prod']], - ['docker', '/docker-api', ['.env.dockermy', '.env.dockerpg']], - ['staging', '/stage-api', []], -]) { - const configuration = await loadConfiguration(mode) - assert.equal(configuration.pluginBase, expectedBase) - assert.equal(configuration.pluginBase, configuration.baseApi, `${mode} 的两种 API 前缀必须一致`) - for (const filename of backendFiles) { - assert.equal(configuration.pluginBase, readBackendRootPath(filename)) - } - checkPluginPaths(configuration) - if (mode === 'docker') { - checkDockerNginx('dockermy', 'ruoyi-backend-my', configuration.pluginBase) - checkDockerNginx('dockerpg', 'ruoyi-backend-pg', configuration.pluginBase) +test('checks Vite and nginx plugin proxy configuration across deployment modes', async () => { + for (const [mode, expectedBase, backendFiles] of [ + ['development', '/dev-api', ['.env.dev']], + ['production', '/prod-api', ['.env.prod']], + ['docker', '/docker-api', ['.env.dockermy', '.env.dockerpg']], + ['staging', '/stage-api', []], + ] as const) { + const configuration = await loadConfiguration(mode) + expect(configuration.pluginBase).toBe(expectedBase) + expect(configuration.pluginBase, `${mode} 的两种 API 前缀必须一致`).toBe(configuration.baseApi) + for (const filename of backendFiles) { + expect(configuration.pluginBase).toBe(readBackendRootPath(filename)) + } + checkPluginPaths(configuration) + if (mode === 'docker') { + checkDockerNginx('dockermy', 'ruoyi-backend-my', configuration.pluginBase) + checkDockerNginx('dockerpg', 'ruoyi-backend-pg', configuration.pluginBase) + } } -} -for (const base of ['', '/', '/gateway', '/gateway/nested-v1/']) { - const configuration = await loadConfiguration('development', base) - assert.equal(configuration.pluginBase, base, '显式前缀必须覆盖开发环境默认值') - checkPluginPaths(configuration) -} -for (const base of ['https://foreign.example', '//gateway', '/gateway/../admin', '/gateway?x=1']) { - await assert.rejects(loadConfiguration('development', base), /插件部署路径无效/) -} -assert.deepEqual({ ...process.env }, originalEnvironment) -assert.equal(process.cwd(), originalDirectory) + for (const base of ['', '/', '/gateway', '/gateway/nested-v1/']) { + const configuration = await loadConfiguration('development', base) + expect(configuration.pluginBase, '显式前缀必须覆盖开发环境默认值').toBe(base) + checkPluginPaths(configuration) + } + for (const base of [ + 'https://foreign.example', + '//gateway', + '/gateway/../admin', + '/gateway?x=1', + ]) { + await expect(loadConfiguration('development', base)).rejects.toThrow(/插件部署路径无效/) + } + expect({ ...process.env }).toStrictEqual(originalEnvironment) + expect(process.cwd()).toBe(originalDirectory) +}, 30000) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.js deleted file mode 100644 index c5c8481ad..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.js +++ /dev/null @@ -1,91 +0,0 @@ -import assert from 'node:assert/strict' -import * as gates from '../../src/utils/pluginCapabilities.ts' - -import { getPluginReleaseView } from '../../src/utils/pluginReleaseFormatter.ts' - -const plugin = { - source: 'artifact', - enabled: '0', - release: { - status: 'pending_restart', - prepareStatus: 'prepared', - healthyWorkers: 0, - disabledWorkers: 0, - liveWorkers: 0, - expectedWorkers: 2, - missingWorkers: 2, - mismatchWorkers: 0, - staleWorkers: 0, - failedWorkers: 0, - restartRequired: true, - }, -} -const view = () => getPluginReleaseView(plugin) -assert.equal(view().label, '等待重启') -assert.equal(view().workerSummary, '已就绪 0 · 在线 0 / 预期 2') -assert.equal(view().preparationLabel, '准备完成') -assert.equal(view().restartRequired, true) - -plugin.release.status = 'partial' -plugin.release.liveWorkers = 2 -plugin.release.healthyWorkers = 1 -plugin.release.mismatchWorkers = 1 -assert.equal(view().label, '部分生效') -assert.equal(view().tagType, 'warning') -assert.equal(view().counts.mismatch, '1') -assert.match(view().workerSummary, /^已就绪 1/) - -plugin.release.status = 'active' -plugin.release.healthyWorkers = 2 -plugin.release.restartRequired = false -assert.equal(view().label, '已生效') -assert.equal(view().tagType, 'success') -assert.equal(view().restartRequired, false) - -plugin.enabled = '1' -plugin.release.status = 'disabled' -plugin.release.healthyWorkers = 0 -plugin.release.disabledWorkers = 2 -assert.equal(view().label, '已停用') -assert.equal(view().workerSummary, '已停用 2 · 在线 2 / 预期 2') - -plugin.release.verificationError = '公钥已撤销' -plugin.release.lastError = 'older maintenance failure' -assert.equal(view().label, '验证失败', 'signature failure must not retain a healthy label') -assert.equal(view().tagType, 'danger') -assert.equal(view().error, '公钥已撤销') - -const missing = getPluginReleaseView({ source: 'artifact' }) -assert.equal(missing.label, '状态未知') -assert.equal(missing.unavailable, true) -assert.equal(missing.workerSummary, '已就绪 未知 · 在线 未知 / 预期 未知') -assert.equal(missing.restartRequired, false) -for (const value of [undefined, null, -1, NaN, '2', true]) { - assert.equal(getPluginReleaseView({ release: { healthyWorkers: value } }).counts.healthy, '未知') -} -assert.equal(getPluginReleaseView({ release: { status: 'no_target' } }).label, '未选择目标') -assert.equal( - getPluginReleaseView({ release: { status: 'failed', prepareStatus: 'failed' } }).preparationLabel, - '准备失败' -) -assert.equal(getPluginReleaseView({ release: { status: 'new_server_state' } }).label, '状态未知') -assert.equal( - getPluginReleaseView({ release: { lastError: 'failed preparation' } }).error, - 'failed preparation' -) - -// 执行页面的真实操作限制:即使旧版接口响应缺少能力元数据,制品记录也应保持只读。 -for (const status of ['discovered', 'installed', 'pending_upgrade', 'error']) { - const artifact = { source: 'artifact', enabled: '0', installedVersion: '1.0.0', status } - assert.equal(gates.canSelectForBatch(artifact), false) - assert.equal(gates.canInstall(artifact), false) - assert.equal(gates.canUpgrade(artifact), false) - assert.equal(gates.canUninstall(artifact), false) - for (const operation of ['install', 'upgrade', 'enable', 'disable', 'uninstall']) { - assert.equal(gates.isOperationBlocked(artifact, operation), true) - } -} -const local = { source: 'local', status: 'discovered' } -assert.equal(gates.canSelectForBatch(local), true) -assert.equal(gates.canInstall(local), true) -assert.equal(gates.isOperationBlocked(local, 'install'), false) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.ts new file mode 100644 index 000000000..e8d70759c --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginReleaseFormatter.test.ts @@ -0,0 +1,102 @@ +import type { Plugin } from '@/types/api/system/plugin.types' +import { expect, test } from 'vitest' +import * as gates from '../../src/utils/pluginCapabilities.ts' + +import { getPluginReleaseView } from '../../src/utils/pluginReleaseFormatter.ts' + +test('release controls follow backend status and capabilities', () => { + const plugin: Partial & { release: NonNullable } = { + source: 'artifact', + enabled: '0', + release: { + status: 'pending_restart', + prepareStatus: 'prepared', + healthyWorkers: 0, + disabledWorkers: 0, + liveWorkers: 0, + expectedWorkers: 2, + missingWorkers: 2, + mismatchWorkers: 0, + staleWorkers: 0, + failedWorkers: 0, + restartRequired: true, + }, + } + const view = () => getPluginReleaseView(plugin) + expect(view().label).toBe('等待重启') + expect(view().workerSummary).toBe('已就绪 0 · 在线 0 / 预期 2') + expect(view().preparationLabel).toBe('准备完成') + expect(view().restartRequired).toBe(true) + + plugin.release.status = 'partial' + plugin.release.liveWorkers = 2 + plugin.release.healthyWorkers = 1 + plugin.release.mismatchWorkers = 1 + expect(view().label).toBe('部分生效') + expect(view().tagType).toBe('warning') + expect(view().counts.mismatch).toBe('1') + expect(view().workerSummary).toMatch(/^已就绪 1/) + + plugin.release.status = 'active' + plugin.release.healthyWorkers = 2 + plugin.release.restartRequired = false + expect(view().label).toBe('已生效') + expect(view().tagType).toBe('success') + expect(view().restartRequired).toBe(false) + + plugin.enabled = '1' + plugin.release.status = 'disabled' + plugin.release.healthyWorkers = 0 + plugin.release.disabledWorkers = 2 + expect(view().label).toBe('已停用') + expect(view().workerSummary).toBe('已停用 2 · 在线 2 / 预期 2') + + plugin.release.verificationError = '公钥已撤销' + plugin.release.lastError = 'older maintenance failure' + expect(view().label, 'signature failure must not retain a healthy label').toBe('验证失败') + expect(view().tagType).toBe('danger') + expect(view().error).toBe('公钥已撤销') + + const partial: Partial = { source: 'artifact' } + const missing = getPluginReleaseView(partial) + expect(missing.label).toBe('状态未知') + expect(missing.unavailable).toBe(true) + expect(missing.workerSummary).toBe('已就绪 未知 · 在线 未知 / 预期 未知') + expect(missing.restartRequired).toBe(false) + for (const value of [undefined, null, -1, NaN, '2', true]) { + expect( + Reflect.apply(getPluginReleaseView, undefined, [{ release: { healthyWorkers: value } }]) + .counts.healthy + ).toBe('未知') + } + expect(getPluginReleaseView({ release: { status: 'no_target' } }).label).toBe('未选择目标') + expect( + getPluginReleaseView({ release: { status: 'failed', prepareStatus: 'failed' } }) + .preparationLabel + ).toBe('准备失败') + expect(getPluginReleaseView({ release: { status: 'new_server_state' } }).label).toBe('状态未知') + expect(getPluginReleaseView({ release: { lastError: 'failed preparation' } }).error).toBe( + 'failed preparation' + ) + + // 执行页面的真实操作限制:即使旧版接口响应缺少能力元数据,制品记录也应保持只读。 + for (const status of ['discovered', 'installed', 'pending_upgrade', 'error']) { + const artifact: Partial = { + source: 'artifact', + enabled: '0', + installedVersion: '1.0.0', + status, + } + expect(gates.canSelectForBatch(artifact)).toBe(false) + expect(gates.canInstall(artifact)).toBe(false) + expect(gates.canUpgrade(artifact)).toBe(false) + expect(gates.canUninstall(artifact)).toBe(false) + for (const operation of ['install', 'upgrade', 'enable', 'disable', 'uninstall']) { + expect(gates.isOperationBlocked(artifact, operation)).toBe(true) + } + } + const local = { source: 'local', status: 'discovered' } + expect(gates.canSelectForBatch(local)).toBe(true) + expect(gates.canInstall(local)).toBe(true) + expect(gates.isOperationBlocked(local, 'install')).toBe(false) +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.js deleted file mode 100644 index ea5593658..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.js +++ /dev/null @@ -1,3 +0,0 @@ -import { checkRepeatSubmit } from '../../../../../ruoyi-fastapi-test/frontend/request-repeat-submit.mjs' - -await checkRepeatSubmit(new URL('../../', import.meta.url)) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.ts new file mode 100644 index 000000000..5d9e6a6ce --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginRepeatSubmit.test.ts @@ -0,0 +1,6 @@ +import { test } from 'vitest' +import { checkRepeatSubmit } from '../../../../../ruoyi-fastapi-test/frontend/request-repeat-submit.mts' + +test('prevents repeated plugin submissions', async ({ expect }) => { + await checkRepeatSubmit(new URL('../../', import.meta.url), expect) +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.js deleted file mode 100644 index 5fc05893a..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.js +++ /dev/null @@ -1,202 +0,0 @@ -import assert from 'node:assert/strict' -import { readPluginSse, createPluginSseTransport } from '../../src/utils/pluginSse.ts' -import { - PLUGIN_BRIDGE_MAX_BYTES, - PLUGIN_BRIDGE_MAX_STREAM_BYTES, -} from '../../src/utils/pluginBridge.js' - -const encoder = new TextEncoder() -const collect = async (source) => { - const output = [] - for await (const event of source) output.push(event) - return output -} -const chunks = (values, onCancel = () => {}) => - new ReadableStream({ - start(controller) { - for (const value of values) controller.enqueue(value) - controller.close() - }, - cancel: onCancel, - }) -const input = - '\uFEFF: heartbeat\r\nid: 1\r\nevent: tick\r\ndata: 你好😀\r\ndata: second\r\n\r\n' + - 'id: ignored\0id\ndata:\n\n' + - 'id:\revent:\rdata: reset\r\r' + - 'data: unfinished' -const bytes = encoder.encode(input) -const expected = [ - { id: '1', event: 'tick', data: '你好😀\nsecond' }, - { id: '1', event: 'message', data: '' }, - { id: '', event: 'message', data: 'reset' }, -] -for (const size of [1, 2, 7, bytes.length]) { - const split = [] - for (let offset = 0; offset < bytes.length; offset += size) - split.push(bytes.slice(offset, offset + size)) - assert.deepEqual(await collect(readPluginSse(chunks(split))), expected) -} -await assert.rejects(collect(readPluginSse(chunks([new Uint8Array([0xff])])))) -await assert.rejects(collect(readPluginSse(chunks([new Uint8Array([0xe4, 0xb8])])))) -await assert.rejects( - collect(readPluginSse(chunks([encoder.encode('data: ' + 'a'.repeat(PLUGIN_BRIDGE_MAX_BYTES))]))), - /64 KiB/ -) -await assert.rejects( - collect(readPluginSse(chunks([encoder.encode('data: a\n'.repeat(9000))]))), - /64 KiB/ -) -await assert.rejects( - collect(readPluginSse(chunks([new Uint8Array(PLUGIN_BRIDGE_MAX_STREAM_BYTES + 1)]))), - /10 MiB/ -) -let cancelled = false -const infinite = new ReadableStream({ - start(controller) { - controller.enqueue(encoder.encode('data: one\n\ndata: two\n\n')) - }, - cancel() { - cancelled = true - }, -}) -for await (const event of readPluginSse(infinite)) { - assert.equal(event.data, 'one') - break -} -assert.equal(cancelled, true) -assert.equal(infinite.locked, false) - -// 读取中断不能伪装成正常 EOF;异常结束仍释放字节流锁。 -let interrupt -const brokenBody = new ReadableStream({ - start(controller) { - interrupt = () => controller.error(new Error('network disconnected')) - controller.enqueue(encoder.encode('data: first\n\n')) - }, -}) -const brokenStream = readPluginSse(brokenBody) -assert.equal((await brokenStream.next()).value.data, 'first') -interrupt() -await assert.rejects(brokenStream.next(), /network disconnected/) -assert.equal(brokenBody.locked, false) - -let fetched = [] -let encrypted = false -let response = () => - new Response('id: 5\ndata: result\n\n', { - headers: { 'Content-Type': 'text/event-stream; charset=utf-8' }, - }) -const stream = createPluginSseTransport({ - loadPolicy: async () => ({ active: encrypted }), - shouldEncryptRequest: (_, policy) => policy.active, - serializeParams: (params) => new URLSearchParams(params).toString(), - getTimezone: () => 'Asia/Shanghai', - getLocale: () => 'zh-CN', - origin: 'https://test', - fetchImpl: async (...args) => { - fetched.push(args) - return response() - }, -}) -const config = { - url: '/prefix/apps/demo/api/events', - params: { count: 5 }, - lastEventId: '4', - csrfToken: 'host-only', - signal: new AbortController().signal, -} -assert.deepEqual(await collect(stream(config)), [{ id: '5', event: 'message', data: 'result' }]) -assert.equal(fetched[0][0], 'https://test/prefix/apps/demo/api/events?count=5') -assert.deepEqual(fetched[0][1].headers, { - Accept: 'text/event-stream', - 'X-Plugin-CSRF': 'host-only', - 'X-Timezone': 'Asia/Shanghai', - 'Accept-Language': 'zh-CN', - 'Last-Event-ID': '4', -}) -assert.equal(fetched[0][1].credentials, 'same-origin') -assert.equal(fetched[0][1].redirect, 'error') -encrypted = true -await assert.rejects(collect(stream(config)), /策略例外/) -assert.equal(fetched.length, 1) -encrypted = false -for (const url of [ - 'https://evil.test/api', - '//evil.test/api', - '/apps/demo/api?x=1', - '/apps/demo/api#x', -]) - await assert.rejects(collect(stream({ ...config, url })), /地址无效/) -const aborted = new AbortController() -aborted.abort() -await assert.rejects(collect(stream({ ...config, signal: aborted.signal })), /取消/) -assert.equal(fetched.length, 1) -for (const value of [ - new Response('{}', { headers: { 'Content-Type': 'application/json' } }), - new Response('error', { status: 401 }), - new Response(null, { status: 204 }), -]) { - response = () => value - await assert.rejects(collect(stream(config)), /响应无效/) -} - -// 宿主保留的关闭事件必须转换为失败,不能交给业务或当作正常 EOF。 -response = () => - new Response( - 'id: 1\ndata: first\n\nevent: ruoyi.plugin.closed\ndata: {"code":403,"reason":"access_revoked"}\n\n', - { - headers: { 'Content-Type': 'text/event-stream' }, - } - ) -const revoked = stream(config) -assert.equal((await revoked.next()).value.data, 'first') -await assert.rejects(revoked.next(), (error) => error.name === 'PluginStreamClosedError') -for (const partial of [ - 'data: unfinished\n', - 'data: unfinished\r', - 'data: unfinished\n\nevent: custom\ndata: partial\n', -]) { - response = () => - new Response(partial + 'event: ruoyi.plugin.closed\ndata: {"code":403}\n\n', { - headers: { 'Content-Type': 'text/event-stream' }, - }) - const values = [] - await assert.rejects( - async () => { - for await (const event of stream(config)) values.push(event.data) - }, - (error) => error.name === 'PluginStreamClosedError' - ) - assert.deepEqual(values, partial.includes('\n\n') ? ['unfinished'] : []) -} - -// 策略加载期间切换语言不会改变已发起连接的协商信息;下一条连接采用新语言。 -let releasePolicy -const pendingPolicy = new Promise((resolve) => { - releasePolicy = resolve -}) -let currentLocale = 'en-US' -let currentTimezone = 'UTC' -const snapshots = [] -const localizedStream = createPluginSseTransport({ - loadPolicy: () => pendingPolicy, - shouldEncryptRequest: () => false, - serializeParams: () => '', - getTimezone: () => currentTimezone, - getLocale: () => currentLocale, - origin: 'https://test', - fetchImpl: async (_, options) => { - snapshots.push(options.headers) - return new Response('data: ready\n\n', { headers: { 'Content-Type': 'text/event-stream' } }) - }, -}) -const firstConnection = collect(localizedStream(config)) -currentLocale = 'zh-CN' -currentTimezone = 'Asia/Shanghai' -releasePolicy({}) -await firstConnection -await collect(localizedStream(config)) -assert.equal(snapshots[0]['Accept-Language'], 'en-US') -assert.equal(snapshots[0]['X-Timezone'], 'UTC') -assert.equal(snapshots[1]['Accept-Language'], 'zh-CN') -assert.equal(snapshots[1]['X-Timezone'], 'Asia/Shanghai') diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.ts new file mode 100644 index 000000000..a9737b311 --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginSse.test.ts @@ -0,0 +1,221 @@ +import { getTransportCryptoPolicy } from '../../src/utils/transportCryptoPolicy' +import { expect, test } from 'vitest' +import { readPluginSse, createPluginSseTransport } from '../../src/utils/pluginSse.ts' +import { + PLUGIN_BRIDGE_MAX_BYTES, + PLUGIN_BRIDGE_MAX_STREAM_BYTES, +} from '../../src/utils/pluginBridge.js' + +test('decodes SSE chunks and terminates interrupted or revoked streams', async () => { + const encoder = new TextEncoder() + const collect = async (source: AsyncIterable) => { + const output = [] + for await (const event of source) output.push(event) + return output + } + const chunks = (values: Uint8Array[], onCancel = () => {}) => + new ReadableStream({ + start(controller) { + for (const value of values) controller.enqueue(value) + controller.close() + }, + cancel: onCancel, + }) + const input = + '\uFEFF: heartbeat\r\nid: 1\r\nevent: tick\r\ndata: 你好😀\r\ndata: second\r\n\r\n' + + 'id: ignored\0id\ndata:\n\n' + + 'id:\revent:\rdata: reset\r\r' + + 'data: unfinished' + const bytes = encoder.encode(input) + const expected = [ + { id: '1', event: 'tick', data: '你好😀\nsecond' }, + { id: '1', event: 'message', data: '' }, + { id: '', event: 'message', data: 'reset' }, + ] + for (const size of [1, 2, 7, bytes.length]) { + const split = [] + for (let offset = 0; offset < bytes.length; offset += size) + split.push(bytes.slice(offset, offset + size)) + expect(await collect(readPluginSse(chunks(split)))).toStrictEqual(expected) + } + await expect(collect(readPluginSse(chunks([new Uint8Array([0xff])])))).rejects.toThrow() + await expect(collect(readPluginSse(chunks([new Uint8Array([0xe4, 0xb8])])))).rejects.toThrow() + await expect( + collect(readPluginSse(chunks([encoder.encode('data: ' + 'a'.repeat(PLUGIN_BRIDGE_MAX_BYTES))]))) + ).rejects.toThrow(/64 KiB/) + await expect( + collect(readPluginSse(chunks([encoder.encode('data: a\n'.repeat(9000))]))) + ).rejects.toThrow(/64 KiB/) + await expect( + collect(readPluginSse(chunks([new Uint8Array(PLUGIN_BRIDGE_MAX_STREAM_BYTES + 1)]))) + ).rejects.toThrow(/10 MiB/) + let cancelled = false + const infinite = new ReadableStream({ + start(controller) { + controller.enqueue(encoder.encode('data: one\n\ndata: two\n\n')) + }, + cancel() { + cancelled = true + }, + }) + for await (const event of readPluginSse(infinite)) { + expect(event.data).toBe('one') + break + } + expect(cancelled).toBe(true) + expect(infinite.locked).toBe(false) + + // 读取中断不能伪装成正常 EOF;异常结束仍释放字节流锁。 + let interrupt: () => void = () => { + throw new Error('Stream has not started') + } + const brokenBody = new ReadableStream({ + start(controller) { + interrupt = () => controller.error(new Error('network disconnected')) + controller.enqueue(encoder.encode('data: first\n\n')) + }, + }) + const brokenStream = readPluginSse(brokenBody) + expect((await brokenStream.next()).value.data).toBe('first') + interrupt() + await expect(brokenStream.next()).rejects.toThrow(/network disconnected/) + expect(brokenBody.locked).toBe(false) + + const fetched: Parameters[] = [] + let encrypted = false + let response = () => + new Response('id: 5\ndata: result\n\n', { + headers: { 'Content-Type': 'text/event-stream; charset=utf-8' }, + }) + const stream = createPluginSseTransport({ + loadPolicy: async () => ({ + transportCryptoEnabled: encrypted, + transportCryptoActive: encrypted, + transportCryptoMode: encrypted ? 'required' : 'off', + enabledPaths: [], + requiredPaths: [], + excludePaths: [], + envelopeVersion: '1', + publicKeyUrl: '/transport/crypto/public-key', + requestEnvelopeAlgorithm: '', + responseEnvelopeAlgorithm: '', + maxEncryptedGetUrlLength: 0, + configExpireAt: 0, + retryAt: 0, + }), + shouldEncryptRequest: (_, policy) => policy.transportCryptoActive, + serializeParams: (params) => + new URLSearchParams( + Object.entries(params).map(([key, value]) => [key, String(value)]) + ).toString(), + getTimezone: () => 'Asia/Shanghai', + getLocale: () => 'zh-CN', + origin: 'https://test', + fetchImpl: async (...args) => { + fetched.push(args) + return response() + }, + }) + const config = { + url: '/prefix/apps/demo/api/events', + params: { count: 5 }, + lastEventId: '4', + csrfToken: 'host-only', + signal: new AbortController().signal, + } + expect(await collect(stream(config))).toStrictEqual([ + { id: '5', event: 'message', data: 'result' }, + ]) + expect(fetched[0][0]).toBe('https://test/prefix/apps/demo/api/events?count=5') + expect(fetched[0][1]?.headers).toStrictEqual({ + Accept: 'text/event-stream', + 'X-Plugin-CSRF': 'host-only', + 'X-Timezone': 'Asia/Shanghai', + 'Accept-Language': 'zh-CN', + 'Last-Event-ID': '4', + }) + expect(fetched[0][1]?.credentials).toBe('same-origin') + expect(fetched[0][1]?.redirect).toBe('error') + encrypted = true + await expect(collect(stream(config))).rejects.toThrow(/策略例外/) + expect(fetched.length).toBe(1) + encrypted = false + for (const url of [ + 'https://evil.test/api', + '//evil.test/api', + '/apps/demo/api?x=1', + '/apps/demo/api#x', + ]) + await expect(collect(stream({ ...config, url }))).rejects.toThrow(/地址无效/) + const aborted = new AbortController() + aborted.abort() + await expect(collect(stream({ ...config, signal: aborted.signal }))).rejects.toThrow(/取消/) + expect(fetched.length).toBe(1) + for (const value of [ + new Response('{}', { headers: { 'Content-Type': 'application/json' } }), + new Response('error', { status: 401 }), + new Response(null, { status: 204 }), + ]) { + response = () => value + await expect(collect(stream(config))).rejects.toThrow(/响应无效/) + } + + // 宿主保留的关闭事件必须转换为失败,不能交给业务或当作正常 EOF。 + response = () => + new Response( + 'id: 1\ndata: first\n\nevent: ruoyi.plugin.closed\ndata: {"code":403,"reason":"access_revoked"}\n\n', + { + headers: { 'Content-Type': 'text/event-stream' }, + } + ) + const revoked = stream(config) + expect((await revoked.next()).value.data).toBe('first') + await expect(revoked.next()).rejects.toSatisfy( + (error) => error.name === 'PluginStreamClosedError' + ) + for (const partial of [ + 'data: unfinished\n', + 'data: unfinished\r', + 'data: unfinished\n\nevent: custom\ndata: partial\n', + ]) { + response = () => + new Response(partial + 'event: ruoyi.plugin.closed\ndata: {"code":403}\n\n', { + headers: { 'Content-Type': 'text/event-stream' }, + }) + const values: string[] = [] + await expect(async () => { + for await (const event of stream(config)) values.push(event.data) + }).rejects.toSatisfy((error) => error.name === 'PluginStreamClosedError') + expect(values).toStrictEqual(partial.includes('\n\n') ? ['unfinished'] : []) + } + // 策略加载期间切换语言不会改变已发起连接的协商信息;下一条连接采用新语言。 + const gate = Promise.withResolvers() + let currentLocale = 'en-US' + let currentTimezone = 'UTC' + const snapshots: Headers[] = [] + const localizedStream = createPluginSseTransport({ + loadPolicy: async () => { + await gate.promise + return getTransportCryptoPolicy() + }, + shouldEncryptRequest: () => false, + serializeParams: () => '', + getTimezone: () => currentTimezone, + getLocale: () => currentLocale, + origin: 'https://test', + fetchImpl: async (_, options) => { + snapshots.push(new Headers(options?.headers)) + return new Response('data: ready\n\n', { headers: { 'Content-Type': 'text/event-stream' } }) + }, + }) + const firstConnection = collect(localizedStream(config)) + currentLocale = 'zh-CN' + currentTimezone = 'Asia/Shanghai' + gate.resolve() + await firstConnection + await collect(localizedStream(config)) + expect(snapshots[0].get('Accept-Language')).toBe('en-US') + expect(snapshots[0].get('X-Timezone')).toBe('UTC') + expect(snapshots[1].get('Accept-Language')).toBe('zh-CN') + expect(snapshots[1].get('X-Timezone')).toBe('Asia/Shanghai') +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.js b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.js deleted file mode 100644 index a7d4ccb44..000000000 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.js +++ /dev/null @@ -1,20 +0,0 @@ -import assert from 'node:assert/strict' -import { resolvePluginViewPath } from '../../src/utils/pluginViewResolver.ts' -assert.equal( - resolvePluginViewPath('plugin/ai/chat/index', '.tsx'), - '../../plugins/ai/views/chat/index.tsx' -) -assert.equal( - resolvePluginViewPath('/plugin/bundle_demo/nested/view'), - '../../plugins/bundle_demo/views/nested/view.jsx' -) -for (const value of [ - null, - '', - 'plugin/../login', - 'plugin/ai/../login', - 'plugin/ai/chat.jsx', - 'plugin/a/index', - 'plugin/ai//index', -]) - assert.equal(resolvePluginViewPath(value), '') diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.ts b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.ts new file mode 100644 index 000000000..16a21ed72 --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tests/plugins/pluginViewResolver.test.ts @@ -0,0 +1,20 @@ +import { expect, test } from 'vitest' +import { resolvePluginViewPath } from '../../src/utils/pluginViewResolver.ts' +test('resolves only supported plugin view paths', () => { + expect(resolvePluginViewPath('plugin/ai/chat/index', '.tsx')).toBe( + '../../plugins/ai/views/chat/index.tsx' + ) + expect(resolvePluginViewPath('/plugin/bundle_demo/nested/view')).toBe( + '../../plugins/bundle_demo/views/nested/view.jsx' + ) + for (const value of [ + null, + '', + 'plugin/../login', + 'plugin/ai/../login', + 'plugin/ai/chat.jsx', + 'plugin/a/index', + 'plugin/ai//index', + ]) + expect(resolvePluginViewPath(value)).toBe('') +}) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.tsx similarity index 65% rename from ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.tsx index bd88551e6..ac9984435 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/aiChatUpload.test.tsx @@ -1,12 +1,13 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react' import { expect, test, vi } from 'vitest' +import type { AxiosInstance, InternalAxiosRequestConfig } from 'axios' import request from '@/utils/request' import AiChat from '../../plugins/ai/views/chat' import { t } from '../../plugins/ai/i18n' vi.mock('../../plugins/ai/views/chat/components/AiMessage', () => ({ default: () => null })) vi.mock('@/utils/transportCryptoPolicy', async (importOriginal) => { - const policy = await importOriginal() + const policy = await importOriginal() return { ...policy, ensureTransportCryptoPolicyLoaded: async () => policy.getTransportCryptoPolicy(), @@ -16,21 +17,22 @@ vi.mock('@/utils/transportCryptoPolicy', async (importOriginal) => { test('对话图片沿用 multipart 编码传送原文件,上传成功后可预览', async () => { const file = new File(['image bytes'], 'sample.png', { type: 'image/png' }) const path = '/profile/chat-image.png' - const responses = { + const responses: Record = { '/ai/model/all': { data: [{ modelId: 1, modelCode: 'vision', supportImages: 'Y' }] }, '/ai/chat/config': { data: { visionEnabled: '0' } }, '/ai/chat/session/list': { data: [] }, '/common/upload': { fileName: path }, } - const adapter = vi.fn(async (config) => ({ + const adapter = vi.fn(async (config: InternalAxiosRequestConfig) => ({ config, status: 200, statusText: 'OK', headers: {}, - data: { code: 200, ...responses[config.url] }, + data: { code: 200, ...responses[config.url ?? ''] }, })) - const previousAdapter = request.defaults.adapter - request.defaults.adapter = adapter + const defaults = (request as typeof request & AxiosInstance).defaults + const previousAdapter = defaults.adapter + defaults.adapter = adapter vi.stubGlobal( 'ResizeObserver', class { @@ -42,16 +44,19 @@ test('对话图片沿用 multipart 编码传送原文件,上传成功后可预 try { const { container } = render() await screen.findByRole('button', { name: t('plugin.ai:uploadImages') }) - fireEvent.change(container.querySelector('input[type="file"]'), { target: { files: [file] } }) + const input = container.querySelector('input[type="file"]') + if (!input) throw new Error('Missing upload input') + fireEvent.change(input, { target: { files: [file] } }) await waitFor(() => expect(container.querySelector(`img[src$="${path}"]`)).toBeTruthy()) - const [upload] = adapter.mock.calls.find(([config]) => config.url === '/common/upload') + const upload = adapter.mock.calls.find(([config]) => config.url === '/common/upload')?.[0] + if (!upload) throw new Error('Missing file upload request') expect(upload.method).toBe('post') expect(upload.headers.getContentType()).toBe('multipart/form-data') expect(upload.data).toBeInstanceOf(FormData) expect(upload.data.get('file')).toBe(file) } finally { - request.defaults.adapter = previousAdapter + defaults.adapter = previousAdapter vi.unstubAllGlobals() } }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.tsx similarity index 71% rename from ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.tsx index 529f1f0d2..de53f61a3 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/authRole.test.tsx @@ -13,20 +13,26 @@ test('保留未访问页的既有授权,并按原始用户 ID 提交本页新 const roles = Array.from({ length: 11 }, (_, i) => ({ roleId: i + 1, roleName: 'Role ' + (i + 1), - status: '0', + status: '0' as const, flag: i === 10, })) - getAuthRole.mockResolvedValue({ user: { userId: Number(userId), userName: 'operator' }, roles }) - updateAuthRole.mockResolvedValue({}) + vi.mocked(getAuthRole, { partial: true, deep: true }).mockResolvedValue({ + user: { userId: Number(userId), userName: 'operator' }, + roles, + }) + vi.mocked(updateAuthRole, { partial: true, deep: true }).mockResolvedValue({}) render( - + ) const role = await screen.findByRole('row', { name: /Role 1$/ }) expect(screen.queryByText('Role 11')).toBeNull() - fireEvent.click(within(role).getByRole('checkbox')) + fireEvent.click(within(role).getByRole('checkbox')) fireEvent.click( screen.getByRole('button', { name: (name) => name.replace(/\s/g, '') === t('common:submit') }) ) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.tsx similarity index 83% rename from ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.tsx index 1c65602e1..c8a81fa46 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/codePreview.test.tsx @@ -39,18 +39,14 @@ test('locale resources have distinct tabs that select and copy the matching file /> ) expect(screen.getByRole('tab', { name: 'do.py', selected: true })).toBeTruthy() - fireEvent.click(screen.getByRole('tab', { name: chinesePath, exact: true })) + fireEvent.click(screen.getByRole('tab', { name: chinesePath })) expect(screen.getByRole('tabpanel').textContent).toContain(chinese) - fireEvent.click(screen.getByRole('tab', { name: englishPath, exact: true })) + fireEvent.click(screen.getByRole('tab', { name: englishPath })) expect(screen.getByRole('tabpanel').textContent).toContain(english) fireEvent.click(screen.getByRole('button', { name: /复制$/ })) await waitFor(() => expect(copyText).toHaveBeenCalledWith(english)) - fireEvent.click( - screen.getByRole('tab', { name: 'zh-CN/core/generated.demo.item.po', exact: true }) - ) + fireEvent.click(screen.getByRole('tab', { name: 'zh-CN/core/generated.demo.item.po' })) expect(screen.getByRole('tabpanel').textContent).toContain('msgstr "名称"') - fireEvent.click( - screen.getByRole('tab', { name: 'en-US/core/generated.demo.item.po', exact: true }) - ) + fireEvent.click(screen.getByRole('tab', { name: 'en-US/core/generated.demo.item.po' })) expect(screen.getByRole('tabpanel').textContent).toContain('msgstr "Name"') }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.tsx similarity index 86% rename from ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.tsx index a65b49cb0..0f9297223 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/formBuilderValidation.test.tsx @@ -46,8 +46,11 @@ test('preview validates text on blur and choices on change, showing the first ma localStorage.setItem('react-form-generator', JSON.stringify({ fields, config: formConf })) render() fireEvent.click(screen.getByRole('button', { name: /preview/i })) - const preview = within((await screen.findByText('Form preview')).closest('[role="dialog"]')) - const code = preview.getByRole('textbox', { name: 'Code' }) + const title = await screen.findByText('Form preview') + const dialog = title.closest('[role="dialog"]') + if (!dialog) throw new Error('Missing form preview dialog') + const preview = within(dialog) + const code = preview.getByRole('textbox', { name: 'Code' }) await act(async () => fireEvent.change(code, { target: { value: 'bad' } })) expect(preview.queryByText('Invalid code')).toBeNull() fireEvent.blur(code) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.tsx similarity index 86% rename from ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.tsx index 487a09793..dbe965fc3 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/i18n.test.tsx @@ -6,6 +6,7 @@ import { useLocalizedFormErrors, useLocalizedText } from '@/i18n/form' import { useDict, clearDictCache } from '@/utils/dict' import { getDicts } from '@/api/system/dict/data' import { makeUpJs } from '@/utils/generator/js' +import { formConf } from '@/utils/generator/config' import { fieldRules } from '@/utils/generator/model' import FieldControl from '@/utils/generator/render' import { act, cleanup, fireEvent, render, screen, waitFor } from '@testing-library/react' @@ -35,7 +36,7 @@ afterAll(() => vi.unstubAllGlobals()) test('signed-in users can select a language and save their preference', async () => { i18n.setAccount(7, 'en-US', '0') render() - const trigger = screen.getByRole('button', { name: 'Language' }) + const trigger = screen.getByRole('button', { name: 'Language' }) expect(trigger.disabled).toBe(false) fireEvent.click(trigger) fireEvent.click(await screen.findByRole('menuitem', { name: '简体中文' })) @@ -64,11 +65,11 @@ test('language changes update React text and html.lang without remounting a draf ) - const input = screen.getByRole('textbox', { name: 'draft' }) + const input = screen.getByRole('textbox', { name: 'draft' }) fireEvent.change(input, { target: { value: 'unsaved input' } }) await act(() => i18n.setPreference('en-US')) expect(screen.getByText('Username')).toBeTruthy() - expect(screen.getByRole('textbox', { name: 'draft' })).toBe(input) + expect(screen.getByRole('textbox', { name: 'draft' })).toBe(input) expect(input.value).toBe('unsaved input') expect(document.documentElement.lang).toBe('en-US') await act(() => i18n.setPreference('zh-CN')) @@ -116,7 +117,7 @@ function ValidationEditor() { test('locale changes refresh shown errors and local dialog text while keeping untouched fields and drafts', async () => { await i18n.setPreference('zh-CN') render() - const draft = screen.getByRole('textbox', { name: 'preserved draft' }) + const draft = screen.getByRole('textbox', { name: 'preserved draft' }) fireEvent.change(draft, { target: { value: 'unsaved business value' } }) fireEvent.click(screen.getByRole('button', { name: 'validate' })) fireEvent.click(screen.getByRole('button', { name: 'show notice' })) @@ -126,7 +127,7 @@ test('locale changes refresh shown errors and local dialog text while keeping un expect(await screen.findByText('Dictionary name is required')).toBeTruthy() expect(screen.getByText('Edit')).toBeTruthy() expect(screen.queryByText('untouched validation')).toBeNull() - expect(screen.getByRole('textbox', { name: 'preserved draft' })).toBe(draft) + expect(screen.getByRole('textbox', { name: 'preserved draft' })).toBe(draft) expect(draft.value).toBe('unsaved business value') await act(() => i18n.setPreference('zh-CN')) }) @@ -142,7 +143,7 @@ function DictionaryReader() { test('dictionary labels update from cached maps without another request or changing business values', async () => { clearDictCache() - getDicts.mockResolvedValue({ + vi.mocked(getDicts, { partial: true, deep: true }).mockResolvedValue({ data: [{ dictLabel: '启用', dictLabelI18n: { 'en-US': 'Enabled' }, dictValue: '0' }], }) await i18n.setPreference('zh-CN') @@ -159,6 +160,7 @@ test('exported designer forms translate at runtime and preserve user labels, val const fields = [ { tag: 'Input', + tagIcon: 'input', vModel: 'business', label: '保留用户标签', prepend: 'ID', @@ -168,9 +170,9 @@ test('exported designer forms translate at runtime and preserve user labels, val { pattern: '/^o/', message: '次要提示' }, ], }, - { tag: 'Input', vModel: 'notes', label: '用户备注' }, + { tag: 'Input', tagIcon: 'input', vModel: 'notes', label: '用户备注' }, ] - const source = makeUpJs(fields, { formBtns: true, size: 'default' }) + const source = makeUpJs(fields, { ...formConf, formBtns: true, size: 'default' }) const executable = source .replace(/^import[^\n]+\n/gm, '') .replace('export default function', 'function') @@ -195,16 +197,16 @@ test('exported designer forms translate at runtime and preserve user labels, val `${compiled.code}; return GeneratedForm` )(...Object.values(scope)) render() - const draft = screen.getByRole('textbox', { name: '用户备注' }) + const draft = screen.getByRole('textbox', { name: '用户备注' }) fireEvent.change(draft, { target: { value: '保留草稿' } }) fireEvent.click(screen.getByRole('button', { name: 'Submit' })) expect(await screen.findByText('Enter 保留用户标签')).toBeTruthy() await act(() => i18n.setPreference('zh-CN')) expect(await screen.findByText('请填写保留用户标签')).toBeTruthy() expect(screen.getByRole('button', { name: /提\s*交/ })).toBeTruthy() - expect(screen.getByRole('textbox', { name: '用户备注' })).toBe(draft) + expect(screen.getByRole('textbox', { name: '用户备注' })).toBe(draft) expect(draft.value).toBe('保留草稿') - const business = screen.getByRole('textbox', { name: '保留用户标签' }) + const business = screen.getByRole('textbox', { name: '保留用户标签' }) await act(async () => fireEvent.change(business, { target: { value: 'invalid' } })) expect(screen.queryByText('保留用户提示')).toBeNull() fireEvent.blur(business) @@ -229,11 +231,11 @@ test('a source plugin subscribes to its own engine and preserves a draft when th i18n.setAccount(null) await act(async () => i18n.setPreference('zh-CN')) render() - const input = screen.getByRole('textbox', { name: 'plugin draft' }) + const input = screen.getByRole('textbox', { name: 'plugin draft' }) fireEvent.change(input, { target: { value: 'unsaved plugin input' } }) await act(async () => i18n.setPreference('en-US')) expect(screen.getByText('Model code')).toBeTruthy() - expect(screen.getByRole('textbox', { name: 'plugin draft' })).toBe(input) + expect(screen.getByRole('textbox', { name: 'plugin draft' })).toBe(input) expect(input.value).toBe('unsaved plugin input') expect(i18n.engine.hasResourceBundle('en-US', 'plugin.ai')).toBe(false) }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.tsx similarity index 91% rename from ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.tsx index 2b9ef7f5a..a2dd391e4 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/oauthPluginValidation.test.tsx @@ -4,7 +4,9 @@ import { afterAll, beforeAll, expect, it, vi } from 'vitest' import StringListInput from '@/components/OAuthWorkspace/StringListInput' import PluginConfigDialog from '@/views/system/plugin/components/PluginConfigDialog' -vi.mock('@/directive/permission/hasPermi', () => ({ default: ({ children }) => children })) +vi.mock('@/directive/permission/hasPermi', () => ({ + default: ({ children }: React.PropsWithChildren) => children, +})) beforeAll(() => { vi.stubGlobal( @@ -19,7 +21,7 @@ beforeAll(() => { afterAll(() => vi.unstubAllGlobals()) it('把每行 OAuth 地址的失焦传给表单', async () => { - const validator = vi.fn(async () => {}) + const validator = vi.fn(async (_rule: unknown, _addresses: string[]) => {}) render(
{}} open items={[ { key: 'config', type: 'json', placeholder: 'JSON', value: '{}' }, diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.tsx similarity index 57% rename from ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.tsx index 2b340912c..aab3322b2 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/plugin-status.test.tsx @@ -7,32 +7,52 @@ vi.mock('@/api/system/plugin', () => ({ getPluginConfigStatus: vi.fn(), getPluginRuntimeMetrics: vi.fn(), })) -const deferred = () => { - let resolve, reject - const promise = new Promise((a, b) => { - resolve = a - reject = b - }) - return { promise, resolve, reject } +type StatusResponse = Awaited> +type MetricsResponse = Awaited> +type PendingCall = PromiseWithResolvers & { signal?: AbortSignal } + +const response = { code: 200, success: true, msg: 'OK', time: '2026-01-01T00:00:00Z' } +function statusResponse(overrides: Partial = {}): StatusResponse { + return { + ...response, + data: { + ok: true, + pluginId: 'demo', + scope: 'current_worker', + desiredRevision: '1', + activationMode: 'startup_snapshot', + state: 'unobserved', + observedWorkers: 0, + matchedWorkers: 0, + pendingWorkers: 0, + unknownWorkers: 0, + workers: [], + ...overrides, + }, + } +} +const unavailable: MetricsResponse = { + ...response, + data: { ok: true, scope: 'unavailable', supported: false, series: [], workers: [] }, } beforeEach(() => vi.clearAllMocks()) describe('插件异步状态迁移回归', () => { it('配置切换取消旧请求,保存后清空旧状态,忽略迟到响应,失败后可重试', async () => { - const calls = [] - getPluginConfigStatus.mockImplementation((id, signal) => { - const call = { ...deferred(), id, signal } + const calls: PendingCall[] = [] + vi.mocked(getPluginConfigStatus).mockImplementation((_id, signal) => { + const call = { ...Promise.withResolvers(), signal } calls.push(call) return call.promise }) const view = render() view.rerender() - expect(calls[0].signal.aborted).toBe(true) + expect(calls[0].signal?.aborted).toBe(true) await act(async () => - calls[1].resolve({ data: { state: 'restart_required', pendingWorkers: 2 } }) + calls[1].resolve(statusResponse({ state: 'restart_required', pendingWorkers: 2 })) ) expect(screen.getByText('2 个已观测进程的启动配置待重启更新')).toBeTruthy() await act(async () => - calls[0].resolve({ data: { state: 'observed_match', matchedWorkers: 99 } }) + calls[0].resolve(statusResponse({ state: 'observed_match', matchedWorkers: 99 })) ) expect(screen.queryByText(/99 个/)).toBeNull() view.rerender( @@ -47,25 +67,28 @@ describe('插件异步状态迁移回归', () => { fireEvent.click(screen.getByRole('button', { name: /刷新状态/ })) expect(screen.queryByText(/配置状态查询失败/)).toBeNull() await act(async () => - calls[3].resolve({ data: { state: 'observed_match', matchedWorkers: 3 } }) + calls[3].resolve(statusResponse({ state: 'observed_match', matchedWorkers: 3 })) ) expect(screen.getByText('3 个已观测进程的启动配置与保存版本匹配')).toBeTruthy() fireEvent.click(screen.getByRole('button', { name: /刷新状态/ })) view.unmount() - expect(calls[4].signal.aborted).toBe(true) - await act(async () => calls[4].resolve({ data: {} })) + expect(calls[4].signal?.aborted).toBe(true) + await act(async () => calls[4].resolve(statusResponse({}))) }) it('运行指标切换取消请求并清除旧展示,错误后可重试且卸载取消请求', async () => { - const calls = [] - getPluginRuntimeMetrics.mockImplementation((id, signal) => { - const call = { ...deferred(), id, signal } + const calls: PendingCall[] = [] + vi.mocked(getPluginRuntimeMetrics).mockImplementation((_id, signal) => { + const call = { + ...Promise.withResolvers(), + signal, + } calls.push(call) return call.promise }) const view = render() view.rerender() - expect(calls[0].signal.aborted).toBe(true) - await act(async () => calls[1].resolve({ data: { supported: false, series: [] } })) + expect(calls[0].signal?.aborted).toBe(true) + await act(async () => calls[1].resolve(unavailable)) await act(async () => calls[0].reject(new Error('stale'))) expect(screen.queryByText(/运行指标查询失败/)).toBeNull() fireEvent.click(screen.getByRole('button', { name: /刷新指标/ })) @@ -74,7 +97,7 @@ describe('插件异步状态迁移回归', () => { fireEvent.click(screen.getByRole('button', { name: /刷新指标/ })) expect(screen.queryByText(/运行指标查询失败/)).toBeNull() view.unmount() - expect(calls[3].signal.aborted).toBe(true) - await act(async () => calls[3].resolve({ data: { series: [] } })) + expect(calls[3].signal?.aborted).toBe(true) + await act(async () => calls[3].resolve(unavailable)) }) }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.tsx similarity index 82% rename from ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.tsx index ba9dc9464..0d1d94edc 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/pluginFrame.test.tsx @@ -21,10 +21,14 @@ vi.mock('@/utils/transportCryptoPolicy', () => ({ shouldEncryptRequest: () => false, })) it('查询参数和菜单对象重建不重新开插件会话,插件或令牌变化会取消并重建', async () => { - let navigate + let navigate: ReturnType function Scene({ pluginId = 'demo', title = '演示插件' }) { navigate = useNavigate() - return + return ( + + ) } const view = render( @@ -45,11 +49,11 @@ it('查询参数和菜单对象重建不重新开插件会话,插件或令牌 ) - expect(request.mock.calls[0][0].signal.aborted).toBe(true) + expect(vi.mocked(request).mock.calls[0][0].signal?.aborted).toBe(true) expect(request).toHaveBeenCalledTimes(2) await act(async () => useUserStore.setState({ token: 'new-session' })) - expect(request.mock.calls[1][0].signal.aborted).toBe(true) + expect(vi.mocked(request).mock.calls[1][0].signal?.aborted).toBe(true) expect(request).toHaveBeenCalledTimes(3) view.unmount() - expect(request.mock.calls[2][0].signal.aborted).toBe(true) + expect(vi.mocked(request).mock.calls[2][0].signal?.aborted).toBe(true) }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.tsx similarity index 67% rename from ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.tsx index 814bf3e8f..d61e41b7a 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/rolePermissionTree.test.tsx @@ -10,7 +10,9 @@ vi.mock('@/api/system/menu') vi.mock('@/api/system/role') vi.mock('@/router', () => ({ findRoute: () => undefined })) vi.mock('@/utils/dict', () => ({ useDict: () => ({ sys_normal_disable: [] }) })) -vi.mock('@/directive/permission/hasPermi', () => ({ default: ({ children }) => children })) +vi.mock('@/directive/permission/hasPermi', () => ({ + default: ({ children }: React.PropsWithChildren) => children, +})) beforeAll(() => { vi.stubGlobal( @@ -24,7 +26,7 @@ beforeAll(() => { }) afterAll(() => vi.unstubAllGlobals()) -function threeLevels(root, branch, leaf) { +function threeLevels(root: string, branch: string, leaf: string) { return [ { id: 1, @@ -34,10 +36,16 @@ function threeLevels(root, branch, leaf) { ] } -async function openRoleDialog(action, rootLabel) { - const role = { roleId: 2, roleName: 'Auditor', roleKey: 'audit', roleSort: 1, dataScope: '2' } - listRole.mockResolvedValue({ rows: [role], total: 1 }) - getRole.mockResolvedValue({ data: role }) +async function openRoleDialog(action: string, rootLabel: string) { + const role = { + roleId: 2, + roleName: 'Auditor', + roleKey: 'audit', + roleSort: 1, + dataScope: '2' as const, + } + vi.mocked(listRole, { partial: true, deep: true }).mockResolvedValue({ rows: [role], total: 1 }) + vi.mocked(getRole, { partial: true, deep: true }).mockResolvedValue({ data: role }) render( @@ -46,16 +54,20 @@ async function openRoleDialog(action, rootLabel) { const row = await screen.findByRole('row', { name: /Auditor/ }) fireEvent.click(within(row).getByRole('button', { name: t(action) })) const root = await screen.findByText(rootLabel) - return within(root.closest('[role="dialog"]')) + const dialog = root.closest('[role="dialog"]') + if (!dialog) throw new Error('Missing role dialog') + return within(dialog) } test('角色菜单批量展开到二级,收起后隐藏下级', async () => { - roleMenuTreeselect.mockResolvedValue({ + vi.mocked(roleMenuTreeselect, { partial: true, deep: true }).mockResolvedValue({ menus: threeLevels('系统管理', '日志管理', '操作日志'), checkedKeys: [], }) const dialog = await openRoleDialog('common:edit', '系统管理') - const expand = dialog.getByRole('checkbox', { name: t('common:expandCollapse') }) + const expand = dialog.getByRole('checkbox', { + name: t('common:expandCollapse'), + }) expect(expand.checked).toBe(false) expect(dialog.queryByText('日志管理')).toBeNull() fireEvent.click(expand) @@ -66,12 +78,14 @@ test('角色菜单批量展开到二级,收起后隐藏下级', async () => { }) test('自定义数据权限默认展开所有部门,支持收起并重新展开', async () => { - deptTreeSelect.mockResolvedValue({ + vi.mocked(deptTreeSelect, { partial: true, deep: true }).mockResolvedValue({ depts: threeLevels('公司', '研发部', '平台组'), checkedKeys: [], }) const dialog = await openRoleDialog('system:role.dataScope', '公司') - const expand = dialog.getByRole('checkbox', { name: t('common:expandCollapse') }) + const expand = dialog.getByRole('checkbox', { + name: t('common:expandCollapse'), + }) expect(expand.checked).toBe(true) await dialog.findByText('平台组') fireEvent.click(expand) diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/setup.js b/ruoyi-fastapi-frontend/react/web/tests/react/setup.ts similarity index 100% rename from ruoyi-fastapi-frontend/react/web/tests/react/setup.js rename to ruoyi-fastapi-frontend/react/web/tests/react/setup.ts diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.tsx similarity index 81% rename from ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.tsx index fdf81fac8..99972533c 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/translationFields.test.tsx @@ -29,10 +29,10 @@ test('source and English labels identify separate editable values in the submitt ) - const source = screen.getByRole('textbox', { name: '字典名称' }) - const english = screen.getByRole('textbox', { name: '字典名称 · English' }) - expect(source.closest('.ant-space-compact').textContent).toContain('简体中文') - expect(english.closest('.ant-space-compact').textContent).toContain('English') + const source = screen.getByRole('textbox', { name: '字典名称' }) + const english = screen.getByRole('textbox', { name: '字典名称 · English' }) + expect(source.closest('.ant-space-compact')?.textContent).toContain('简体中文') + expect(english.closest('.ant-space-compact')?.textContent).toContain('English') expect(source.value).toBe('原始名称') expect(english.value).toBe('Original name') fireEvent.change(english, { target: { value: 'Updated English name' } }) @@ -62,7 +62,9 @@ test('a new record only shows translation inputs after Add translation', async ( ) expect(screen.queryByRole('textbox', { name: 'Menu name · English' })).toBeNull() fireEvent.click(screen.getByRole('button', { name: 'Add translation' })) - expect(screen.getByRole('textbox', { name: 'Menu name · English' }).maxLength).toBe(50) + expect( + screen.getByRole('textbox', { name: 'Menu name · English' }).maxLength + ).toBe(50) }) test('source-name validation follows blur and is independent of the translation inputs', async () => { @@ -78,9 +80,9 @@ test('source-name validation follows blur and is independent of the translation /> ) - const source = screen.getByRole('textbox', { name: 'Menu name' }) + const source = screen.getByRole('textbox', { name: 'Menu name' }) fireEvent.click(screen.getByRole('button', { name: 'Add translation' })) - const translation = screen.getByRole('textbox', { name: 'Menu name · English' }) + const translation = screen.getByRole('textbox', { name: 'Menu name · English' }) fireEvent.blur(translation) fireEvent.change(source, { target: { value: ' ' } }) expect(screen.queryByText(message)).toBeNull() @@ -102,8 +104,8 @@ test.each(['zh-CN', 'en-US'])( fileType={['pdf']} /> ) - const hint = container.querySelector('small').textContent - expect(hint.startsWith(i18n.t('common:upload') + ' ')).toBe(true) + const hint = container.querySelector('small')?.textContent + expect(hint?.startsWith(i18n.t('common:upload') + ' ')).toBe(true) expect(hint).toContain('pdf') expect(hint).not.toContain('returned an object') } diff --git a/ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.jsx b/ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.tsx similarity index 89% rename from ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.jsx rename to ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.tsx index cb62c2fd7..128caac4b 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.jsx +++ b/ruoyi-fastapi-frontend/react/web/tests/react/useInteraction.test.tsx @@ -7,7 +7,7 @@ vi.mock('@/api/authCenter', () => ({ completeInteraction: vi.fn() })) it('认证上下文保存并移除片段令牌、保留步骤状态、拒绝伪造完成地址', async () => { sessionStorage.clear() window.history.replaceState(null, '', '/auth-center/consent?interaction=pending-1#csrf=csrf-1') - const wrapper = ({ children }) => ( + const wrapper = ({ children }: React.PropsWithChildren) => ( {children} @@ -25,12 +25,14 @@ it('认证上下文保存并移除片段令牌、保留步骤状态、拒绝伪 result.current.context.followServerRedirect('https://evil.example/complete') ).rejects.toThrow('不受信任') expect(completeInteraction).not.toHaveBeenCalled() - completeInteraction.mockResolvedValueOnce({ data: { redirectUrl: null } }) + vi.mocked(completeInteraction, { partial: true, deep: true }).mockResolvedValueOnce({ + data: { redirectUrl: null }, + }) await expect( result.current.context.followServerRedirect('/auth/interaction/pending-1/complete') ).rejects.toThrow('无效跳转') expect(result.current.context.csrfToken()).toBe('csrf-1') - completeInteraction.mockResolvedValueOnce({ + vi.mocked(completeInteraction, { partial: true, deep: true }).mockResolvedValueOnce({ data: { redirectUrl: 'https://client.example/callback?code=test' }, }) const realWindow = window, diff --git a/ruoyi-fastapi-frontend/react/web/tests/security/logout.test.mjs b/ruoyi-fastapi-frontend/react/web/tests/security/logout.test.ts similarity index 59% rename from ruoyi-fastapi-frontend/react/web/tests/security/logout.test.mjs rename to ruoyi-fastapi-frontend/react/web/tests/security/logout.test.ts index cbb1f0be5..a941c5b4e 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/security/logout.test.mjs +++ b/ruoyi-fastapi-frontend/react/web/tests/security/logout.test.ts @@ -1,7 +1,8 @@ +import { test } from 'vitest' import { runLogoutTests, runUserInfoSessionTests, -} from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs' +} from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mts' -runLogoutTests(new URL('../../', import.meta.url), 'react-web') -runUserInfoSessionTests(new URL('../../', import.meta.url), 'react-web') +runLogoutTests(new URL('../../', import.meta.url), 'react-web', test) +runUserInfoSessionTests(new URL('../../', import.meta.url), 'react-web', test) diff --git a/ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.cjs b/ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.ts similarity index 50% rename from ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.cjs rename to ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.ts index ce6846221..3425f12e7 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.cjs +++ b/ruoyi-fastapi-frontend/react/web/tests/security/notice-html.test.ts @@ -1,22 +1,20 @@ -const assert = require('node:assert/strict') -const { stripTypeScriptTypes } = require('node:module') -const { readFileSync } = require('node:fs') -const { resolve } = require('node:path') -const { test } = require('node:test') -const createDOMPurify = require('dompurify') -const { JSDOM } = require('jsdom') +// @vitest-environment jsdom +import { stripTypeScriptTypes } from 'node:module' +import { readFileSync } from 'node:fs' +import { resolve } from 'node:path' +import { expect, test } from 'vitest' +import createDOMPurify from 'dompurify' for (const framework of ['vue2', 'vue3', 'react']) { test(`${framework} notice HTML removes active content and keeps rich text`, () => { const raw = readFileSync( - resolve(__dirname, `../../../../${framework}/web/src/utils/noticeHtml.ts`), + resolve(import.meta.dirname, `../../../../${framework}/web/src/utils/noticeHtml.ts`), 'utf8' ) const source = stripTypeScriptTypes(raw) .replace("import createDOMPurify from 'dompurify'", '') .replace('export function', 'function') - const window = new JSDOM('').window - const sanitize = new Function( + const sanitize: (html: string) => string = new Function( 'createDOMPurify', 'window', 'HTMLElement', @@ -25,23 +23,22 @@ for (const framework of ['vue2', 'vue3', 'react']) { const clean = sanitize( '

标题

重点

x' ) - assert.match(clean, /重点<\/strong>/) - assert.match(clean, /src="\/safe.png"/) - assert.doesNotMatch(clean, /onerror|onload|重点<\/strong>/) + expect(clean).toMatch(/src="\/safe.png"/) + expect(clean).not.toMatch(/onerror|onload|正文

' ) - assert.match(styled, /ql-align-center/) - assert.match(styled, /color: red/) - assert.match(styled, /background-color: yellow/) - assert.doesNotMatch(styled, /position|background-image/) + expect(styled).toMatch(/ql-align-center/) + expect(styled).toMatch(/color: red/) + expect(styled).toMatch(/background-color: yellow/) + expect(styled).not.toMatch(/position|background-image/) const video = sanitize( '' ) - assert.match(video, /src="https:\/\/video.example\/embed\/1"/) - assert.match(video, /sandbox="allow-scripts allow-presentation"/) - assert.doesNotMatch(video, /srcdoc|allow-same-origin/) - window.close() + expect(video).toMatch(/src="https:\/\/video.example\/embed\/1"/) + expect(video).toMatch(/sandbox="allow-scripts allow-presentation"/) + expect(video).not.toMatch(/srcdoc|allow-same-origin/) }) } diff --git a/ruoyi-fastapi-frontend/react/web/tests/time/time.test.js b/ruoyi-fastapi-frontend/react/web/tests/time/time.test.ts similarity index 55% rename from ruoyi-fastapi-frontend/react/web/tests/time/time.test.js rename to ruoyi-fastapi-frontend/react/web/tests/time/time.test.ts index fe091012c..575d25aaa 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/time/time.test.js +++ b/ruoyi-fastapi-frontend/react/web/tests/time/time.test.ts @@ -1,4 +1,5 @@ +import { test } from 'vitest' import * as time from '../../src/utils/time.ts' -import { testTimeContract } from '../../../../../ruoyi-fastapi-test/time-contract/contract.mjs' +import { testTimeContract } from '../../../../../ruoyi-fastapi-test/time-contract/contract.mts' -testTimeContract(time) +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/react/web/tsconfig.tests.json b/ruoyi-fastapi-frontend/react/web/tsconfig.tests.json new file mode 100644 index 000000000..7b02197a2 --- /dev/null +++ b/ruoyi-fastapi-frontend/react/web/tsconfig.tests.json @@ -0,0 +1,13 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true, + "types": ["vite/client", "node", "react"], + "lib": ["ES2024", "DOM", "DOM.Iterable"], + "paths": { + "@/*": ["./src/*"], + "vitest": ["./node_modules/vitest"] + } + }, + "include": ["tests/**/*.ts", "tests/**/*.tsx", "src/**/*.d.ts"] +} diff --git a/ruoyi-fastapi-frontend/react/web/vitest.config.ts b/ruoyi-fastapi-frontend/react/web/vitest.config.ts index bc89425b8..39cdf6ecb 100644 --- a/ruoyi-fastapi-frontend/react/web/vitest.config.ts +++ b/ruoyi-fastapi-frontend/react/web/vitest.config.ts @@ -5,8 +5,40 @@ export default defineConfig({ plugins: [react()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, test: { - environment: 'jsdom', - include: ['tests/react/**/*.test.{js,jsx}'], - setupFiles: ['tests/react/setup.js'], + maxWorkers: 2, + testTimeout: 15000, + pool: 'forks', + execArgv: ['--experimental-vm-modules'], + projects: [ + { + extends: true, + test: { + name: 'components', + environment: 'jsdom', + include: ['tests/react/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + setupFiles: ['tests/react/setup.ts'], + }, + }, + { + extends: true, + test: { + name: 'unit', + include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + exclude: ['tests/{react,i18n,time}/**'], + }, + }, + { + extends: true, + test: { + name: 'i18n', + testTimeout: 30000, + include: ['tests/i18n/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + }, + }, + { + extends: true, + test: { name: 'contract', include: ['tests/time/**/*.{test,spec}.?(c|m)[jt]s?(x)'] }, + }, + ], }, }) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/eslint.config.mjs b/ruoyi-fastapi-frontend/vue2/mobile/eslint.config.mjs new file mode 100644 index 000000000..2a492ba80 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/eslint.config.mjs @@ -0,0 +1,53 @@ +import vue from 'eslint-plugin-vue' +import tseslint from 'typescript-eslint' +import vueParser from 'vue-eslint-parser' + +// Rule reference: https://github.com/vuejs/core/blob/main/eslint.config.js +export default [ + { + ignores: [ + '**/{dist,coverage,.cache,.vite,target,playwright-report,test-results}/**', + '**/*.min.js', + '**/*.config.*.timestamp-*.{mjs,cjs}', + 'unpackage/**', + 'src/vendor/**', + ], + }, + { + files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'], + rules: { + 'no-debugger': 'error', + 'no-dupe-keys': 'error', + 'no-unsafe-finally': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + }, + }, + { + files: ['src/**/*.{js,jsx,ts,tsx,vue}'], + rules: { 'no-console': ['error', { allow: ['warn', 'error', 'info'] }] }, + }, + { + files: ['**/*.{ts,cts,mts,tsx,vue}'], + plugins: { '@typescript-eslint': tseslint.plugin }, + languageOptions: { parser: tseslint.parser }, + rules: { + '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 0 }], + '@typescript-eslint/no-import-type-side-effects': 'error', + }, + }, + { + files: ['**/*.vue'], + plugins: { vue }, + languageOptions: { parser: vueParser, parserOptions: { parser: tseslint.parser } }, + rules: { + 'vue/no-duplicate-attributes': 'error', + 'vue/no-parsing-error': 'error', + 'vue/no-multiple-template-root': 'error', + 'vue/valid-v-else': 'error', + 'vue/valid-v-else-if': 'error', + 'vue/valid-v-if': 'error', + }, + }, +] diff --git a/ruoyi-fastapi-frontend/vue2/mobile/package.json b/ruoyi-fastapi-frontend/vue2/mobile/package.json index 0ee9de3d4..b37bbd2d6 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/package.json +++ b/ruoyi-fastapi-frontend/vue2/mobile/package.json @@ -39,11 +39,11 @@ "dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch", "info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js", "serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js", - "test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i", - "test:h5": "cross-env UNI_PLATFORM=h5 jest -i", - "test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i", - "test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i", - "test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i", + "test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android vitest run", + "test:h5": "cross-env UNI_PLATFORM=h5 vitest run", + "test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios vitest run", + "test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu vitest run", + "test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin vitest run", "open:dev": "weapp open -p dist/dev/mp-weixin", "open:build": "weapp open -p dist/build/mp-weixin", "weapp:login": "weapp login", @@ -52,13 +52,18 @@ "postinstall": "node scripts/patch-uni-webpack.cjs", "up:uni-app": "npx @dcloudio/uvm@latest", "test:time": "pnpm run test:contract && pnpm run test:bundle", - "test:unit": "node --experimental-vm-modules --test tests/behavior.test.mjs", - "test:contract": "node --test tests/time.test.mjs tests/time-polyfill.test.mjs", - "test:bundle": "node --test tests/time-bundle.test.cjs tests/h5-template.test.cjs", - "test": "pnpm run test:unit && pnpm run test:time", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test:vitest": "vitest run", + "test:watch": "vitest watch", + "test:unit": "vitest run tests/behavior.test.ts tests/vitest/", + "test:contract": "vitest run tests/time.test.ts tests/time-polyfill.test.ts", + "test:bundle": "vitest run tests/time-bundle.test.ts tests/h5-template.test.ts", + "test": "vitest run", "i18n:check": "node scripts/check-i18n.mjs && x18n --root . check --json", - "test:i18n": "node --test tests/i18n/*.test.mjs", - "typecheck": "vue-tsc --noEmit" + "test:i18n": "vitest run tests/i18n", + "typecheck": "vue-tsc --noEmit", + "typecheck:tests": "vue-tsc --noEmit -p tsconfig.tests.json" }, "dependencies": { "@dcloudio/uni-app": "2.0.2-5020620260917001", @@ -129,8 +134,9 @@ "copy-webpack-plugin": "9.1.0", "cross-env": "7.0.3", "cssnano": "5.1.15", + "eslint": "9.39.1", + "eslint-plugin-vue": "10.6.2", "html-webpack-plugin": "5.6.8", - "jest": "25.5.4", "mini-css-extract-plugin": "2.10.2", "mini-types": "0.0.6", "miniprogram-api-typings": "3.12.3", @@ -145,6 +151,9 @@ "tailwindcss": "4.3.3", "thread-loader": "3.0.4", "typescript": "5.9.3", + "typescript-eslint": "8.48.1", + "vitest": "5.0.5", + "vue-eslint-parser": "10.2.0", "vue-template-compiler": "2.6.14", "vue-tsc": "3.0.8", "weapp-ide-cli": "5.4.12", diff --git a/ruoyi-fastapi-frontend/vue2/mobile/pnpm-lock.yaml b/ruoyi-fastapi-frontend/vue2/mobile/pnpm-lock.yaml index 137197acd..dc4c29ab4 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/pnpm-lock.yaml +++ b/ruoyi-fastapi-frontend/vue2/mobile/pnpm-lock.yaml @@ -64,7 +64,7 @@ importers: version: 2.0.2-5020620260917001 '@dcloudio/uni-quickapp-native': specifier: 2.0.2-5020620260917001 - version: 2.0.2-5020620260917001(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 2.0.2-5020620260917001(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) '@dcloudio/uni-quickapp-webview': specifier: 2.0.2-5020620260917001 version: 2.0.2-5020620260917001 @@ -155,7 +155,7 @@ importers: version: 2.0.2-5020620260917001 '@dcloudio/vue-cli-plugin-uni': specifier: 2.0.2-5020620260917001 - version: 2.0.2-5020620260917001(copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(postcss@8.5.30) + version: 2.0.2-5020620260917001(copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(postcss@8.5.30) '@dcloudio/vue-cli-plugin-uni-optimize': specifier: 2.0.2-5020620260917001 version: 2.0.2-5020620260917001 @@ -182,43 +182,46 @@ importers: version: 5.0.9(@babel/core@7.29.7(supports-color@8.1.1))(core-js@3.50.0)(supports-color@8.1.1)(vue@2.6.14) '@vue/cli-plugin-babel': specifier: 5.0.9 - version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue@2.6.14) + version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue@2.6.14) '@vue/cli-plugin-typescript': specifier: 5.0.9 - version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(loader-utils@2.0.4)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(vue-template-compiler@2.6.14)(vue@2.6.14) + version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(loader-utils@2.0.4)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(vue-template-compiler@2.6.14)(vue@2.6.14) '@vue/cli-service': specifier: 5.0.9 - version: 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) + version: 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) '@x18n/cli': specifier: 0.1.14 - version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) autoprefixer: specifier: 10.6.1 version: 10.6.1(postcss@8.5.30) babel-loader: specifier: 8.4.1 - version: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) babel-plugin-import: specifier: 1.13.8 version: 1.13.8(supports-color@8.1.1) copy-webpack-plugin: specifier: 9.1.0 - version: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) cross-env: specifier: 7.0.3 version: 7.0.3 cssnano: specifier: 5.1.15 version: 5.1.15(postcss@8.5.30) + eslint: + specifier: 9.39.1 + version: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-plugin-vue: + specifier: 10.6.2 + version: 10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)) html-webpack-plugin: specifier: 5.6.8 - version: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - jest: - specifier: 25.5.4 - version: 25.5.4(supports-color@8.1.1) + version: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) mini-css-extract-plugin: specifier: 2.10.2 - version: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) mini-types: specifier: 0.0.6 version: 0.0.6 @@ -236,7 +239,7 @@ importers: version: 12.0.1 postcss-loader: specifier: 8.2.1 - version: 8.2.1(postcss@8.5.30)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 8.2.1(postcss@8.5.30)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) postcss-rem-to-responsive-pixel: specifier: 6.1.0 version: 6.1.0 @@ -248,16 +251,25 @@ importers: version: 1.105.2 sass-loader: specifier: 14.2.1 - version: 14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) tailwindcss: specifier: 4.3.3 version: 4.3.3 thread-loader: specifier: 3.0.4 - version: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + version: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) typescript: specifier: 5.9.3 version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + vitest: + specifier: 5.0.5 + version: 5.0.5(@types/node@26.6.5)(jsdom@15.2.1)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) + vue-eslint-parser: + specifier: 10.2.0 + version: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vue-template-compiler: specifier: 2.6.14 version: 2.6.14 @@ -269,10 +281,10 @@ importers: version: 5.4.12(@types/node@26.6.5)(supports-color@8.1.1) weapp-tailwindcss: specifier: 5.6.3 - version: 5.6.3(@oxc-project/types@0.154.0)(jiti@2.7.0)(supports-color@8.1.1)(tailwindcss@4.3.3) + version: 5.6.3(@oxc-project/types@0.154.0)(jiti@2.7.0)(lightningcss@1.33.0)(rolldown@1.3.4)(supports-color@8.1.1)(tailwindcss@4.3.3)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) webpack: specifier: 5.112.0 - version: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + version: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) packages: @@ -471,21 +483,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-async-generators@7.8.4': - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-bigint@7.8.3': - resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-class-properties@7.12.13': - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-decorators@7.29.7': resolution: {integrity: sha512-9MTTLbF39X6sqM92JPEsoI7++26hjZvzkxKZy64aMhWLH2mPkJ/Q3AV4QLmls3R14FpSpkOwQQfUh962JGQxxg==} engines: {node: '>=6.9.0'} @@ -509,52 +506,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-meta@7.10.4': - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-json-strings@7.8.3': - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.29.7': resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4': - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-numeric-separator@7.10.4': - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-object-rest-spread@7.8.3': - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3': - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-chaining@7.8.3': - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.29.7': resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} engines: {node: '>=6.9.0'} @@ -924,14 +881,6 @@ packages: resolution: {integrity: sha512-c+xgSWboV2pdwXP67BUWDVRHi2BO5Q3KwxyFVs7taVTY+fsK47/L51ZXQoV9rozHJDNHvJ4v4WEsI/IlxV2l2A==} engines: {node: ^22.18.0 || >=24.11.0} - '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - - '@cnakazawa/watch@1.0.4': - resolution: {integrity: sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==} - engines: {node: '>=0.1.95'} - hasBin: true - '@csstools/cascade-layer-name-parser@3.0.2': resolution: {integrity: sha512-B731RJ9pfJj3D5GJPp8ccsaaHMdwBmlOb4QWAYQUFpmMxonxJvNeeIoo0E89CjMJaKDvQXy9MKpSXY/i7XgeFA==} engines: {node: '>=20.19.0'} @@ -1412,6 +1361,44 @@ packages: '@emnapi/runtime@1.11.3': resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==} + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@formatjs/bigdecimal@0.2.7': resolution: {integrity: sha512-B4+XY/e4u5v261r3a37Kq2ax91gPZSKGyVpx8X5dygAggLlUz+6MeBpmAhaBFGB8WQ4JB1qD+QtKHk9aJkEb9Q==} @@ -1478,6 +1465,26 @@ packages: peerDependencies: hono: ^4 || ^5.0.0-0 + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + '@iconify-json/mdi@1.2.3': resolution: {integrity: sha512-O3cLwbDOK7NNDf2ihaQOH5F9JglnulNDFV7WprU2dSoZu3h3cWH//h74uQAB87brHmvFVxIOkuBX2sZSzYhScg==} @@ -1649,58 +1656,6 @@ packages: cpu: [x64] os: [win32] - '@istanbuljs/load-nyc-config@1.1.0': - resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} - engines: {node: '>=8'} - - '@istanbuljs/schema@0.1.6': - resolution: {integrity: sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==} - engines: {node: '>=8'} - - '@jest/console@25.5.0': - resolution: {integrity: sha512-T48kZa6MK1Y6k4b89sexwmSF4YLeZS/Udqg3Jj3jG/cHH+N/sLFCEoXEDMOKugJQ9FxPN1osxIknvKkxt6MKyw==} - engines: {node: '>= 8.3'} - - '@jest/core@25.5.4': - resolution: {integrity: sha512-3uSo7laYxF00Dg/DMgbn4xMJKmDdWvZnf89n8Xj/5/AeQ2dOQmn6b6Hkj/MleyzZWXpwv+WSdYWl4cLsy2JsoA==} - engines: {node: '>= 8.3'} - - '@jest/environment@25.5.0': - resolution: {integrity: sha512-U2VXPEqL07E/V7pSZMSQCvV5Ea4lqOlT+0ZFijl/i316cRMHvZ4qC+jBdryd+lmRetjQo0YIQr6cVPNxxK87mA==} - engines: {node: '>= 8.3'} - - '@jest/fake-timers@25.5.0': - resolution: {integrity: sha512-9y2+uGnESw/oyOI3eww9yaxdZyHq7XvprfP/eeoCsjqKYts2yRlsHS/SgjPDV8FyMfn2nbMy8YzUk6nyvdLOpQ==} - engines: {node: '>= 8.3'} - - '@jest/globals@25.5.2': - resolution: {integrity: sha512-AgAS/Ny7Q2RCIj5kZ+0MuKM1wbF0WMLxbCVl/GOMoCNbODRdJ541IxJ98xnZdVSZXivKpJlNPIWa3QmY0l4CXA==} - engines: {node: '>= 8.3'} - - '@jest/reporters@25.5.1': - resolution: {integrity: sha512-3jbd8pPDTuhYJ7vqiHXbSwTJQNavczPs+f1kRprRDxETeE3u6srJ+f0NPuwvOmk+lmunZzPkYWIFZDLHQPkviw==} - engines: {node: '>= 8.3'} - - '@jest/source-map@25.5.0': - resolution: {integrity: sha512-eIGx0xN12yVpMcPaVpjXPnn3N30QGJCJQSkEDUt9x1fI1Gdvb07Ml6K5iN2hG7NmMP6FDmtPEssE3z6doOYUwQ==} - engines: {node: '>= 8.3'} - - '@jest/test-result@25.5.0': - resolution: {integrity: sha512-oV+hPJgXN7IQf/fHWkcS99y0smKLU2czLBJ9WA0jHITLst58HpQMtzSYxzaBvYc6U5U6jfoMthqsUlUlbRXs0A==} - engines: {node: '>= 8.3'} - - '@jest/test-sequencer@25.5.4': - resolution: {integrity: sha512-pTJGEkSeg1EkCO2YWq6hbFvKNXk8ejqlxiOg1jBNLnWrgXOkdY6UmqZpwGFXNnRt9B8nO1uWMzLLZ4eCmhkPNA==} - engines: {node: '>= 8.3'} - - '@jest/transform@25.5.1': - resolution: {integrity: sha512-Y8CEoVwXb4QwA6Y/9uDkn0Xfz0finGkieuV0xkdF9UtZGJeLukD5nLkaVrVsODB1ojRWlaoD0AJZpVHCSnJEvg==} - engines: {node: '>= 8.3'} - - '@jest/types@25.5.0': - resolution: {integrity: sha512-OXD0RgQ86Tu3MazKo8bnrkDRaDXXMGUqd+kTtLtK1Zb7CRzQcaSRPPPV37SvYTdevXEBVxe0HXylEjs8ibkmCw==} - engines: {node: '>= 8.3'} - '@jimp/bmp@0.10.3': resolution: {integrity: sha512-keMOc5woiDmONXsB/6aXLR4Z5Q+v8lFq3EY2rcj2FmstbDMhRuGbmcBxlEgOqfRjwvtf/wOtJ3Of37oAWtVfLg==} peerDependencies: @@ -2194,6 +2149,9 @@ packages: '@oxc-project/types@0.155.0': resolution: {integrity: sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==} + '@oxc-project/types@0.160.0': + resolution: {integrity: sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA==} + '@parcel/watcher-android-arm64@2.6.0': resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} engines: {node: '>= 10.0.0'} @@ -2279,6 +2237,110 @@ packages: '@polka/url@1.0.0-next.29': resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==} + '@rolldown/binding-android-arm-eabi@1.3.4': + resolution: {integrity: sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.3.4': + resolution: {integrity: sha512-5lifIO+b/prcM9sx/bkPN4w6UEToEfQ3gjhx0+0neuL+dkYskI792CfAq03T51jc8JFcaYXs2hi3l8RjiH/VWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.3.4': + resolution: {integrity: sha512-RCgxTI4AJQxhVF//BI3ImQOsXTHrF4Eg+f99jBy8WoETA2kSEGFxpnrVmW0leQq/2aBR4R5AC6csmy3rc66e3Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.3.4': + resolution: {integrity: sha512-zNPJVVPUaDEj+L0lImoK3rFv2b+Z5gNijI6DWu/fcD3/1TfmRXKb9ZyxbSN+2AhlctqjbNzUvCsMa+EBhnEM4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.3.4': + resolution: {integrity: sha512-upP6g7ZIRy5by1RDQ/EphHIdJ5xK0eUD7sUgfZFWJ49s4XdbYsIvIlAPtrFpayR70Hhf9J22lb4Pm8/9FhrZmg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + resolution: {integrity: sha512-SAX5C5+poMLCxu8dkPF6h5yst40rkzs+9Y3cbPn2OFSydmHjAEprrGi64zGgnYyPIVZfdGUFqJ2fJbfbnHI+mA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + resolution: {integrity: sha512-nwHqdlRZS6GWBef3dG5/pMY6RNTBBUjj7s0Da+m6xsFpe7jx6IC46SLZcCu8f46JOfCovZmwnrz51EzGE+7Fyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.3.4': + resolution: {integrity: sha512-Gr78X2ur/AgLCkmZgHffk/FerIX8S5zb/eII4bCcvJo0ANzeXhTShahdNbpnY6bpiszIAgIfiuKS9ziziWsamw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + resolution: {integrity: sha512-o9Wcn8nWrsQasaBRYM4d//FwhlBsTJYWkPVlhlt6FwzpwEoovY4IopRZjk5Fq3+ntRuSDORJjF/nA8sFeF2q6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + resolution: {integrity: sha512-UDWu4jkVcx2kiBKm3Ec//4lVCbeTWj8gmJ9SyLWCdLWtTlyq7fQVeVV/14nXvRtSLErvJ2+yA/Ux5taS31Y17Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.3.4': + resolution: {integrity: sha512-W9mGtTa0w4fWh8RLMNPyaEhhcuqUfO07Q4I1bBc4PDMNg7gQSw0yPQNQ3D0qwbkXwxbyL4YrIzc8n6k1vuFExQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.3.4': + resolution: {integrity: sha512-8B+ofyQZ7/aCmkqnyMonPr5zKLqMVNczhRGFNtdIuItiwNn8iQWJawMq2E58r7bxD1XEbtRRsULY/eCWwZQ01Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.3.4': + resolution: {integrity: sha512-TlD0FSZaC7o2B4NCe9V5N11ugTnhzTM9ksj4sgRLvrKosDzjEkvlsTX3ehkw4ZlPv8AADimZZTvJGEa16pfXug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.3.4': + resolution: {integrity: sha512-jwO8P3o53ygo7b5061B7BeaJ1BGv3BKZ6jroFdw/01qWry7Z+qNBlDvulzbTle5s/A0Fc1FRgsTxrke9DvsSbA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + resolution: {integrity: sha512-8adGMrNtrdzi2WD1ozhYapER59gD8Q/DV6SCKJlyG2HqULPdeQUBvMa33lTsiEYwIqTZUaIU2MmvPp5f1wbtXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.3.4': + resolution: {integrity: sha512-rIMjtESdXJCIoOiUTroQ1Y1rjVDZkuUVRUxs3APX2vNv175D7TDWvzdELiIhzGq9cUNUFat+co+PTmPHPqSREg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.1.1': + resolution: {integrity: sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==} + '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -2295,9 +2357,6 @@ packages: resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} engines: {node: '>=18'} - '@sinonjs/commons@1.8.6': - resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} - '@soda/friendly-errors-webpack-plugin@1.8.1': resolution: {integrity: sha512-h2ooWqP8XuFqTXT+NyAFbrArzfQA7R6HTezADrvD9Re8fxMLTPPniLdqVTdDaO0eIoLaAwKT+d6w+5GeTk7Vbg==} engines: {node: '>=8.0.0'} @@ -2401,18 +2460,6 @@ packages: resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==} engines: {node: '>= 20'} - '@types/babel__core@7.20.5': - resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} - - '@types/babel__generator@7.27.0': - resolution: {integrity: sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==} - - '@types/babel__template@7.4.4': - resolution: {integrity: sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==} - - '@types/babel__traverse@7.28.0': - resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} - '@types/bluebird@3.5.42': resolution: {integrity: sha512-Jhy+MWRlro6UjVi578V/4ZGNfeCOcNCp0YaFNIUGFKlImowqwb1O/22wDVk3FDGMLqxdpOV3qQHD5fPEH4hK6A==} @@ -2422,12 +2469,18 @@ packages: '@types/bonjour@3.5.13': resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + '@types/connect-history-api-fallback@1.5.4': resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} '@types/connect@3.4.38': resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -2443,9 +2496,6 @@ packages: '@types/formidable@1.2.8': resolution: {integrity: sha512-6psvrUy5VDYb+yaPJReF1WrRsz+FBwyJutK9Twz1Efa27tm07bARNIkK2B8ZPWq80dXqpKfrxTO96xrtPp+AuA==} - '@types/graceful-fs@4.1.9': - resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} - '@types/html-minifier-terser@6.1.0': resolution: {integrity: sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg==} @@ -2455,15 +2505,6 @@ packages: '@types/http-proxy@1.17.17': resolution: {integrity: sha512-ED6LB+Z1AVylNTu7hdzuBqOgMnvG/ld6wGCG8wFnAzKX5uyW2K3WD52v0gnLCTK/VLpXtKckgWuyScYK6cSPaw==} - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} - - '@types/istanbul-lib-report@3.0.3': - resolution: {integrity: sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==} - - '@types/istanbul-reports@1.1.2': - resolution: {integrity: sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==} - '@types/jsesc@2.5.1': resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} @@ -2488,9 +2529,6 @@ packages: '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} - '@types/prettier@1.19.1': - resolution: {integrity: sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==} - '@types/qs@6.15.1': resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} @@ -2515,29 +2553,93 @@ packages: '@types/sockjs@0.3.36': resolution: {integrity: sha512-MK9V6NzAS1+Ud7JV9lJLFqW85VbC9dq3LmwZCuBe4wBDgKC0Kj/jd8Xl+nSviU+Qc3+m7umHHyHg//2KSa0a0Q==} - '@types/stack-utils@1.0.1': - resolution: {integrity: sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==} - '@types/webpack-env@1.18.8': resolution: {integrity: sha512-G9eAoJRMLjcvN4I08wB5I7YofOb/kaJNd5uoCMX+LbKXTPCF+ZIHuqTnFaK9Jz1rgs035f9JUPUhNFtqgucy/A==} '@types/ws@8.18.2': resolution: {integrity: sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w==} - '@types/yargs-parser@21.0.3': - resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - - '@types/yargs@15.0.20': - resolution: {integrity: sha512-KIkX+/GgfFitlASYCGoSF+T4XRXhOubJLhkLVtSfsRTe9jWMmuM2g28zQ41BtPTG7TRBb2xHW+LCNVE9QR/vsg==} - '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@valibot/to-json-schema@1.8.0': resolution: {integrity: sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==} peerDependencies: valibot: ^1.5.0 + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + '@volar/language-core@2.4.23': resolution: {integrity: sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==} @@ -2999,6 +3101,11 @@ packages: acorn-globals@4.3.4: resolution: {integrity: sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@6.2.0: resolution: {integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA==} engines: {node: '>=0.4.0'} @@ -3091,10 +3198,6 @@ packages: resolution: {integrity: sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==} engines: {node: '>=4'} - ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - ansi-html-community@0.0.8: resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} engines: {'0': node >= 0.8.0} @@ -3104,10 +3207,6 @@ packages: resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} engines: {node: '>=4'} - ansi-regex@4.1.1: - resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} - engines: {node: '>=6'} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -3147,9 +3246,6 @@ packages: engines: {node: '>=10'} deprecated: This package is no longer supported. - argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -3202,6 +3298,10 @@ packages: assert@1.5.1: resolution: {integrity: sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} @@ -3210,10 +3310,6 @@ packages: resolution: {integrity: sha512-FvWoWYfSCM6kRxCSH+MGLHIKKGRL6A6AW7Zek2O32REPQRdg131428uRTKMBYAeRd3XXAaHDS60Wpri7CdKDrA==} engines: {node: '>=4'} - astral-regex@1.0.0: - resolution: {integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==} - engines: {node: '>=4'} - async-each@1.0.6: resolution: {integrity: sha512-c646jH1avxr+aVpndVMeAfYw7wAa6idufrlN3LPA4PmKS0QEGp6PIC9nwz0WQkkvBGAMEki3pFdtxaF39J9vvg==} @@ -3260,12 +3356,6 @@ packages: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} - babel-jest@25.5.1: - resolution: {integrity: sha512-9dA9+GmMjIzgPnYtkhBg73gOo/RHqPmLruP3BaGL4KEX3Dwz6pI8auSN8G8+iuEG90+GSswyKvslN+JYSaacaQ==} - engines: {node: '>= 8.3'} - peerDependencies: - '@babel/core': ^7.0.0 - babel-loader@8.4.1: resolution: {integrity: sha512-nXzRChX+Z1GoE6yWavBQg6jDslyFF3SDjl2paADuoQtQW10JqShJt62R6eJQ5m/pjJFDT8xgKIWSP85OY8eXeA==} engines: {node: '>= 8.9'} @@ -3279,14 +3369,6 @@ packages: babel-plugin-import@1.13.8: resolution: {integrity: sha512-36babpjra5m3gca44V6tSTomeBlPA7cHUynrE2WiQIm3rEGD9xy28MKsx5IdO45EbnpJY7Jrgd00C6Dwt/l/2Q==} - babel-plugin-istanbul@6.1.1: - resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} - engines: {node: '>=8'} - - babel-plugin-jest-hoist@25.5.0: - resolution: {integrity: sha512-u+/W+WAjMlvoocYGTwthAiQSxDcJAyHpQ6oWlHdFZaaN+Rlk8Q7iiwDPg2lN/FyJtAYnKjFxbn7xus4HCFkg5g==} - engines: {node: '>= 8.3'} - babel-plugin-polyfill-corejs2@0.4.17: resolution: {integrity: sha512-aTyf30K/rqAsNwN76zYrdtx8obu0E4KoUME29B1xj+B3WxgvWkp943vYQ+z8Mv3lw9xHXMHpvSPOBxzAkIa94w==} peerDependencies: @@ -3307,17 +3389,6 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - babel-preset-current-node-syntax@0.1.4: - resolution: {integrity: sha512-5/INNCYhUGqw7VbVjT/hb3ucjgkVHKXY7lX3ZjlN4gm565VyFmJUrJ/h+h16ECVB38R/9SF6aACydpKMLZ/c9w==} - peerDependencies: - '@babel/core': ^7.0.0 - - babel-preset-jest@25.5.0: - resolution: {integrity: sha512-8ZczygctQkBU+63DtSOKGh7tFL0CeCuz+1ieud9lJ1WPQ9O6A1a/r+LGn6Y705PA6whHQ3T1XuB/PmpfNYf8Fw==} - engines: {node: '>= 8.3'} - peerDependencies: - '@babel/core': ^7.0.0 - backo2@1.0.2: resolution: {integrity: sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==} @@ -3406,6 +3477,9 @@ packages: brace-expansion@1.1.21: resolution: {integrity: sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==} + brace-expansion@2.1.8: + resolution: {integrity: sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==} + braces@2.3.2: resolution: {integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==} engines: {node: '>=0.10.0'} @@ -3420,9 +3494,6 @@ packages: browser-process-hrtime@1.0.0: resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==} - browser-resolve@1.11.3: - resolution: {integrity: sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==} - browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} @@ -3448,9 +3519,6 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true - bser@2.1.2: - resolution: {integrity: sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==} - buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} @@ -3524,10 +3592,6 @@ packages: caniuse-lite@1.0.30001816: resolution: {integrity: sha512-+8Yx7BXCoqk6IF8yTicjfUR6D/ldJzdlsodlEOiOSPmhK844WIgk67/zIQaGAOxNkZyyvBlrRFnLvqKIoqbAFw==} - capture-exit@2.0.0: - resolution: {integrity: sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==} - engines: {node: 6.* || 8.* || >= 10.*} - case-sensitive-paths-webpack-plugin@2.4.0: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} engines: {node: '>=4'} @@ -3538,6 +3602,10 @@ packages: centra@2.7.0: resolution: {integrity: sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg==} + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -3578,9 +3646,6 @@ packages: resolution: {integrity: sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==} engines: {node: '>=6.0'} - ci-info@2.0.0: - resolution: {integrity: sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==} - cipher-base@1.0.7: resolution: {integrity: sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==} engines: {node: '>= 0.10'} @@ -3614,9 +3679,6 @@ packages: resolution: {integrity: sha512-mKhiIL2DrQIsuXMgBgnfEHOZOryC7kY7YO//TN6c63wlEm3NG5tz+YgY5rVi29KCmq/QQjKYvM7a19+MDOTHOQ==} engines: {node: '>=8'} - cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} @@ -3643,9 +3705,6 @@ packages: resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - collect-v8-coverage@1.0.3: - resolution: {integrity: sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==} - collection-visit@1.0.0: resolution: {integrity: sha512-lNkKvzEeMBBjUGHZ+q6z9pSJla0KWAQPvtzhEV9+iGyQYG+pBpl7xKDhxoNSOZH2hhv0v5k0y2yAM4o4SjoSkw==} engines: {node: '>=0.10.0'} @@ -3931,9 +3990,6 @@ packages: resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} engines: {node: '>=18'} - convert-source-map@1.9.0: - resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -4233,10 +4289,6 @@ packages: supports-color: optional: true - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - decode-uri-component@0.2.2: resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} engines: {node: '>=0.10'} @@ -4319,10 +4371,6 @@ packages: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} - detect-newline@3.1.0: - resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} - engines: {node: '>=8'} - detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} @@ -4341,10 +4389,6 @@ packages: cac: optional: true - diff-sequences@25.2.6: - resolution: {integrity: sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg==} - engines: {node: '>= 8.3'} - diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} @@ -4539,10 +4583,6 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -4552,18 +4592,63 @@ packages: engines: {node: '>=4.0'} hasBin: true + eslint-plugin-vue@10.6.2: + resolution: {integrity: sha512-nA5yUs/B1KmKzvC42fyD0+l9Yd+LtEpVhWRbXuDj0e+ZURcTtyRbMDWUeJmTAh2wC6jC83raS63anNM2YT3NPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@stylistic/eslint-plugin': ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + '@typescript-eslint/parser': ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 + peerDependenciesMeta: + '@stylistic/eslint-plugin': + optional: true + '@typescript-eslint/parser': + optional: true + eslint-scope@4.0.3: resolution: {integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==} engines: {node: '>=4.0.0'} + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + esm-env@1.2.2: resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + esrap@2.4.0: resolution: {integrity: sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==} peerDependencies: @@ -4587,6 +4672,9 @@ 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'} @@ -4617,17 +4705,10 @@ packages: evp_bytestokey@1.0.3: resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} - exec-sh@0.3.6: - resolution: {integrity: sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==} - execa@1.0.0: resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} engines: {node: '>=6'} - execa@3.4.0: - resolution: {integrity: sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==} - engines: {node: ^8.12.0 || >=9.7.0} - execa@5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -4639,17 +4720,13 @@ packages: exif-parser@0.1.12: resolution: {integrity: sha512-c2bQfLNbMzLPmzQuOr8fy0csy84WmwnER81W88DzTp9CYNPJ6yzOj2EZAh9pywYpqHnshVLHQJ8WzldAyfY+Iw==} - exit@0.1.2: - resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} - engines: {node: '>= 0.8.0'} - expand-brackets@2.1.4: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} - expect@25.5.0: - resolution: {integrity: sha512-w7KAXo0+6qqZZhovCaBVPSIqQp7/UTcx4M9uKt2m6pd2VB1voyC8JizLRqeEqud3AAVP02g+hbErDu5gu64tlA==} - engines: {node: '>= 8.3'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} express-rate-limit@8.7.1: resolution: {integrity: sha512-2FXbqkygil3mZiXzEtM0IjE/UBmBNot0J1GEVrJT4JbrvwOSoEtqtO+wHbiMQELWe1eNvHoYRg2dkjOid+6JkA==} @@ -4719,9 +4796,6 @@ packages: resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} engines: {node: '>=0.8.0'} - fb-watchman@2.0.4: - resolution: {integrity: sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==} - fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} @@ -4746,6 +4820,10 @@ packages: resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} engines: {node: '>=18'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + file-type@9.0.0: resolution: {integrity: sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==} engines: {node: '>=6'} @@ -4785,10 +4863,21 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + flatted@3.6.0: + resolution: {integrity: sha512-1Szo+c/GCm/cKBovrfT0Wpqw7fiqZg/xzlZtLtvWlYyvT4zUGZTS8Qo3sXPQ0nWqMg3N4nEFL2Ukzrjnsopwbg==} + flush-write-stream@1.1.1: resolution: {integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==} @@ -4923,10 +5012,6 @@ packages: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} - get-package-type@0.1.0: - resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} - engines: {node: '>=8.0.0'} - get-proto@1.0.1: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} @@ -4982,6 +5067,10 @@ packages: global@4.4.0: resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -4993,8 +5082,8 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - growly@1.3.0: - resolution: {integrity: sha512-+xGQY0YyAWCnqy7Cd++hc2JqMYzlm0dG30Jd0beaA64sROr8C4nt8Yc9V5Ro3avlSUDTN0ulqP/VBKi1/lLygw==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} gzip-size@6.0.0: resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==} @@ -5193,10 +5282,6 @@ packages: resolution: {integrity: sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==} engines: {node: '>= 6.0.0'} - human-signals@1.1.1: - resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} - engines: {node: '>=8.12.0'} - human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -5262,11 +5347,6 @@ packages: resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} engines: {node: '>=6'} - import-local@3.2.0: - resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} - engines: {node: '>=8'} - hasBin: true - import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} @@ -5350,10 +5430,6 @@ packages: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - is-ci@2.0.0: - resolution: {integrity: sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==} - hasBin: true - is-core-module@2.17.0: resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==} engines: {node: '>= 0.4'} @@ -5401,10 +5477,6 @@ packages: is-function@1.0.2: resolution: {integrity: sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ==} - is-generator-fn@2.1.0: - resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} - engines: {node: '>=6'} - is-generator-function@1.1.2: resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==} engines: {node: '>= 0.4'} @@ -5520,157 +5592,13 @@ packages: isstream@0.1.2: resolution: {integrity: sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==} - istanbul-lib-coverage@3.2.2: - resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} - engines: {node: '>=8'} - - istanbul-lib-instrument@4.0.3: - resolution: {integrity: sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==} - engines: {node: '>=8'} - - istanbul-lib-instrument@5.2.1: - resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} - engines: {node: '>=8'} - - istanbul-lib-report@3.0.1: - resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} - engines: {node: '>=10'} - - istanbul-lib-source-maps@4.0.1: - resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} - engines: {node: '>=10'} - - istanbul-reports@3.2.0: - resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} - engines: {node: '>=8'} - javascript-stringify@2.1.0: resolution: {integrity: sha512-JVAfqNPTvNq3sB/VHQJAFxN/sPgKnsKrCwyRt15zwNCdrMMJDdcEOdubuy+DuJYYdm0ox1J4uzEuYKkN+9yhVg==} - jest-changed-files@25.5.0: - resolution: {integrity: sha512-EOw9QEqapsDT7mKF162m8HFzRPbmP8qJQny6ldVOdOVBz3ACgPm/1nAn5fPQ/NDaYhX/AHkrGwwkCncpAVSXcw==} - engines: {node: '>= 8.3'} - - jest-cli@25.5.4: - resolution: {integrity: sha512-rG8uJkIiOUpnREh1768/N3n27Cm+xPFkSNFO91tgg+8o2rXeVLStz+vkXkGr4UtzH6t1SNbjwoiswd7p4AhHTw==} - engines: {node: '>= 8.3'} - hasBin: true - - jest-config@25.5.4: - resolution: {integrity: sha512-SZwR91SwcdK6bz7Gco8qL7YY2sx8tFJYzvg216DLihTWf+LKY/DoJXpM9nTzYakSyfblbqeU48p/p7Jzy05Atg==} - engines: {node: '>= 8.3'} - - jest-diff@25.5.0: - resolution: {integrity: sha512-z1kygetuPiREYdNIumRpAHY6RXiGmp70YHptjdaxTWGmA085W3iCnXNx0DhflK3vwrKmrRWyY1wUpkPMVxMK7A==} - engines: {node: '>= 8.3'} - - jest-docblock@25.3.0: - resolution: {integrity: sha512-aktF0kCar8+zxRHxQZwxMy70stc9R1mOmrLsT5VO3pIT0uzGRSDAXxSlz4NqQWpuLjPpuMhPRl7H+5FRsvIQAg==} - engines: {node: '>= 8.3'} - - jest-each@25.5.0: - resolution: {integrity: sha512-QBogUxna3D8vtiItvn54xXde7+vuzqRrEeaw8r1s+1TG9eZLVJE5ZkKoSUlqFwRjnlaA4hyKGiu9OlkFIuKnjA==} - engines: {node: '>= 8.3'} - - jest-environment-jsdom@25.5.0: - resolution: {integrity: sha512-7Jr02ydaq4jaWMZLY+Skn8wL5nVIYpWvmeatOHL3tOcV3Zw8sjnPpx+ZdeBfc457p8jCR9J6YCc+Lga0oIy62A==} - engines: {node: '>= 8.3'} - - jest-environment-node@25.5.0: - resolution: {integrity: sha512-iuxK6rQR2En9EID+2k+IBs5fCFd919gVVK5BeND82fYeLWPqvRcFNPKu9+gxTwfB5XwBGBvZ0HFQa+cHtIoslA==} - engines: {node: '>= 8.3'} - - jest-get-type@25.2.6: - resolution: {integrity: sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig==} - engines: {node: '>= 8.3'} - - jest-haste-map@25.5.1: - resolution: {integrity: sha512-dddgh9UZjV7SCDQUrQ+5t9yy8iEgKc1AKqZR9YDww8xsVOtzPQSMVLDChc21+g29oTRexb9/B0bIlZL+sWmvAQ==} - engines: {node: '>= 8.3'} - - jest-jasmine2@25.5.4: - resolution: {integrity: sha512-9acbWEfbmS8UpdcfqnDO+uBUgKa/9hcRh983IHdM+pKmJPL77G0sWAAK0V0kr5LK3a8cSBfkFSoncXwQlRZfkQ==} - engines: {node: '>= 8.3'} - - jest-leak-detector@25.5.0: - resolution: {integrity: sha512-rV7JdLsanS8OkdDpZtgBf61L5xZ4NnYLBq72r6ldxahJWWczZjXawRsoHyXzibM5ed7C2QRjpp6ypgwGdKyoVA==} - engines: {node: '>= 8.3'} - - jest-matcher-utils@25.5.0: - resolution: {integrity: sha512-VWI269+9JS5cpndnpCwm7dy7JtGQT30UHfrnM3mXl22gHGt/b7NkjBqXfbhZ8V4B7ANUsjK18PlSBmG0YH7gjw==} - engines: {node: '>= 8.3'} - - jest-message-util@25.5.0: - resolution: {integrity: sha512-ezddz3YCT/LT0SKAmylVyWWIGYoKHOFOFXx3/nA4m794lfVUskMcwhip6vTgdVrOtYdjeQeis2ypzes9mZb4EA==} - engines: {node: '>= 8.3'} - - jest-mock@25.5.0: - resolution: {integrity: sha512-eXWuTV8mKzp/ovHc5+3USJMYsTBhyQ+5A1Mak35dey/RG8GlM4YWVylZuGgVXinaW6tpvk/RSecmF37FKUlpXA==} - engines: {node: '>= 8.3'} - - jest-pnp-resolver@1.2.3: - resolution: {integrity: sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==} - engines: {node: '>=6'} - peerDependencies: - jest-resolve: '*' - peerDependenciesMeta: - jest-resolve: - optional: true - - jest-regex-util@25.2.6: - resolution: {integrity: sha512-KQqf7a0NrtCkYmZZzodPftn7fL1cq3GQAFVMn5Hg8uKx/fIenLEobNanUxb7abQ1sjADHBseG/2FGpsv/wr+Qw==} - engines: {node: '>= 8.3'} - - jest-resolve-dependencies@25.5.4: - resolution: {integrity: sha512-yFmbPd+DAQjJQg88HveObcGBA32nqNZ02fjYmtL16t1xw9bAttSn5UGRRhzMHIQbsep7znWvAvnD4kDqOFM0Uw==} - engines: {node: '>= 8.3'} - - jest-resolve@25.5.1: - resolution: {integrity: sha512-Hc09hYch5aWdtejsUZhA+vSzcotf7fajSlPA6EZPE1RmPBAD39XtJhvHWFStid58iit4IPDLI/Da4cwdDmAHiQ==} - engines: {node: '>= 8.3'} - - jest-runner@25.5.4: - resolution: {integrity: sha512-V/2R7fKZo6blP8E9BL9vJ8aTU4TH2beuqGNxHbxi6t14XzTb+x90B3FRgdvuHm41GY8ch4xxvf0ATH4hdpjTqg==} - engines: {node: '>= 8.3'} - - jest-runtime@25.5.4: - resolution: {integrity: sha512-RWTt8LeWh3GvjYtASH2eezkc8AehVoWKK20udV6n3/gC87wlTbE1kIA+opCvNWyyPeBs6ptYsc6nyHUb1GlUVQ==} - engines: {node: '>= 8.3'} - hasBin: true - - jest-serializer@25.5.0: - resolution: {integrity: sha512-LxD8fY1lByomEPflwur9o4e2a5twSQ7TaVNLlFUuToIdoJuBt8tzHfCsZ42Ok6LkKXWzFWf3AGmheuLAA7LcCA==} - engines: {node: '>= 8.3'} - - jest-snapshot@25.5.1: - resolution: {integrity: sha512-C02JE1TUe64p2v1auUJ2ze5vcuv32tkv9PyhEb318e8XOKF7MOyXdJ7kdjbvrp3ChPLU2usI7Rjxs97Dj5P0uQ==} - engines: {node: '>= 8.3'} - - jest-util@25.5.0: - resolution: {integrity: sha512-KVlX+WWg1zUTB9ktvhsg2PXZVdkI1NBevOJSkTKYAyXyH4QSvh+Lay/e/v+bmaFfrkfx43xD8QTfgobzlEXdIA==} - engines: {node: '>= 8.3'} - - jest-validate@25.5.0: - resolution: {integrity: sha512-okUFKqhZIpo3jDdtUXUZ2LxGUZJIlfdYBvZb1aczzxrlyMlqdnnws9MOxezoLGhSaFc2XYaHNReNQfj5zPIWyQ==} - engines: {node: '>= 8.3'} - - jest-watcher@25.5.0: - resolution: {integrity: sha512-XrSfJnVASEl+5+bb51V0Q7WQx65dTSk7NL4yDdVjPnRNpM0hG+ncFmDYJo9O8jaSRcAitVbuVawyXCRoxGrT5Q==} - engines: {node: '>= 8.3'} - - jest-worker@25.5.0: - resolution: {integrity: sha512-/dsSmUkIy5EBGfv/IjjqmFxrNAUpBERfGs1oHROyD7yxjG/w+t0GOJDX8O1k32ySmd7+a5IhnJU2qQFcJ4n1vw==} - engines: {node: '>= 8.3'} - jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} - jest@25.5.4: - resolution: {integrity: sha512-hHFJROBTqZahnO+X+PMtT6G2/ztqAZJveGqz//FnWWHurizkD05PQGzRZOhF3XP6z7SJmL+5tCfW8qV06JypwQ==} - engines: {node: '>= 8.3'} - hasBin: true - jimp@0.10.3: resolution: {integrity: sha512-meVWmDMtyUG5uYjFkmzu0zBgnCvvxwWNi27c4cg55vWNVC9ES4Lcwb+ogx+uBBQE3Q+dLKjXaLl0JVW+nUNwbQ==} @@ -5697,10 +5625,6 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@3.15.2: - resolution: {integrity: sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==} - hasBin: true - js-yaml@4.3.2: resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} hasBin: true @@ -5722,6 +5646,9 @@ packages: engines: {node: '>=6'} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} @@ -5740,6 +5667,9 @@ packages: json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json-stringify-safe@5.0.1: resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} @@ -5776,6 +5706,9 @@ packages: resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} engines: {node: '>= 0.6'} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kill-port@1.6.1: resolution: {integrity: sha512-un0Y55cOM7JKGaLnGja28T38tDDop0AQ8N0KlAdyh+B1nmMoX8AnNmqPNZbS3mUMgiST51DCVqmbFT1gNJpVNw==} hasBin: true @@ -5792,10 +5725,6 @@ packages: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} - kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - klona@2.0.6: resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} engines: {node: '>= 8'} @@ -5848,14 +5777,14 @@ packages: resolution: {integrity: sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==} engines: {node: '>=8'} - leven@3.1.0: - resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} - engines: {node: '>=6'} - levn@0.3.0: resolution: {integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==} engines: {node: '>= 0.8.0'} + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + licia@1.49.0: resolution: {integrity: sha512-9nYyWnV7E0Vb9ymUGisqOpkw8gczIZjFZKo4q49a5zQafzpg340iA8EDgHKRJrZDZxj07luy6kGYwXpQu7hIaQ==} @@ -5868,30 +5797,60 @@ packages: cpu: [arm64] os: [android] + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + lightningcss-darwin-arm64@1.32.0: resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [darwin] + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + lightningcss-darwin-x64@1.32.0: resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [darwin] + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + lightningcss-freebsd-x64@1.32.0: resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [freebsd] + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + lightningcss-linux-arm-gnueabihf@1.32.0: resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} engines: {node: '>= 12.0.0'} cpu: [arm] os: [linux] + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + lightningcss-linux-arm64-gnu@1.32.0: resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} engines: {node: '>= 12.0.0'} @@ -5899,6 +5858,13 @@ packages: os: [linux] libc: [glibc] + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} @@ -5906,6 +5872,13 @@ packages: os: [linux] libc: [musl] + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} @@ -5913,6 +5886,13 @@ packages: os: [linux] libc: [glibc] + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} @@ -5920,22 +5900,45 @@ packages: os: [linux] libc: [musl] + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [win32] + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + lightningcss-win32-x64-msvc@1.32.0: resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [win32] + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + lightningcss@1.32.0: resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} engines: {node: '>= 12.0.0'} + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -5981,6 +5984,10 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} @@ -5996,6 +6003,9 @@ packages: lodash.memoize@4.1.2: resolution: {integrity: sha512-t7j+NzmgnQzTAYXcsHYLgimltOV1MXHtlOWf6GjL9Kj8GK5FInw5JotxvbOs+IvV1/Dzo04/fCGfLVs7aXb4Ag==} + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.sortby@4.7.0: resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} @@ -6013,9 +6023,6 @@ packages: resolution: {integrity: sha512-vlP11XfFGyeNQlmEn9tJ66rEW1coA/79m5z6BCkudjbAGE83uhAcGYrBFwfs3AdLiLzGRusRPAbSPK9xZteCmg==} engines: {node: '>=4'} - lolex@5.1.2: - resolution: {integrity: sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==} - lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} @@ -6047,16 +6054,9 @@ packages: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} - make-dir@4.0.0: - resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} - engines: {node: '>=10'} - make-plural@7.5.0: resolution: {integrity: sha512-0booA+aVYyVFoR67JBHdfVk0U08HmrBH2FrtmBqBa+NldlqXv/G2Z9VQuQq6Wgp2jDWdybEWGfBkk1cq5264WA==} - makeerror@1.0.12: - resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - map-cache@0.2.2: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} @@ -6198,6 +6198,10 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -6335,6 +6339,12 @@ packages: resolution: {integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==} engines: {node: '>=0.10.0'} + napi-windows-process-start-time@0.1.0: + resolution: {integrity: sha512-zHxhzKsIFu3elch3eFw69WEUGc79DFhbc3nD/WEOzWL/pFFLZRW13EHnuO0c+0YjncE5uCaS9ICHxOBXkb6vPw==} + engines: {node: '>=20'} + cpu: [x64, arm64] + os: [win32] + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -6378,15 +6388,9 @@ packages: resolution: {integrity: sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==} engines: {node: '>= 6.13.0'} - node-int64@0.4.0: - resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} - node-libs-browser@2.2.1: resolution: {integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==} - node-notifier@6.0.0: - resolution: {integrity: sha512-SVfQ/wMw+DesunOm5cKqr6yDcvUTDl/yc97ybGHMrteNEY6oekXpNpS3lZwgLlwz0FLgHoiW28ZpmBHUDg37cw==} - node-releases@2.0.59: resolution: {integrity: sha512-5qr2okC4ItAI0hG5SaV0HoYMpnM/Y6+Oqr7AmPYy/2uEoGvS+GbSKLeRxSS1uAdu59yz0ouzcuXievSgg///WA==} engines: {node: '>=18'} @@ -6518,6 +6522,10 @@ packages: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} engines: {node: '>= 0.8.0'} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -6551,22 +6559,18 @@ packages: rolldown: optional: true - p-each-series@2.2.0: - resolution: {integrity: sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==} - engines: {node: '>=8'} - p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} engines: {node: '>=4'} - p-finally@2.0.1: - resolution: {integrity: sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==} - engines: {node: '>=8'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-locate@3.0.0: resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} engines: {node: '>=6'} @@ -6575,6 +6579,10 @@ packages: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-retry@4.6.2: resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} engines: {node: '>=8'} @@ -7266,10 +7274,18 @@ packages: resolution: {integrity: sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.34: + resolution: {integrity: sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==} + engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -7283,10 +7299,6 @@ packages: pretty-error@4.0.0: resolution: {integrity: sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==} - pretty-format@25.5.0: - resolution: {integrity: sha512-kbo/kq2LQ/A/is0PQwsEHM7Ca6//bGPPvU6UnsdDRSKTWxT/ru/xb88v4BJf6a69H+uTytOEsTusT9ksd/1iWQ==} - engines: {node: '>= 8.3'} - pretty-ms@9.3.1: resolution: {integrity: sha512-HzMy3Geq23nVALD/M2LliU+F+M+gVNsvkQWWqeBZ8HDiCgzo6YPJ/Omrmtq24EFrIsk0a3EkQGEd7bDOo+IhGA==} engines: {node: '>=18'} @@ -7316,10 +7328,6 @@ packages: bluebird: optional: true - prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - proxy-addr@2.0.8: resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} engines: {node: '>= 0.10'} @@ -7414,9 +7422,6 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - read-cache@1.0.2: resolution: {integrity: sha512-/peqiBB/n07gQGLsWaHho3WfvUyRscw0gYTsEFMhrIe/nWLkYaf5SbKYjGYqtRV3aPwykJgF2VEMo1ac4bnsGA==} @@ -7447,10 +7452,6 @@ packages: resolution: {integrity: sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==} engines: {node: '>= 20.19.0'} - realpath-native@2.0.0: - resolution: {integrity: sha512-v1SEYUOXXdbBZK8ZuNgO4TBjamPsiSgcFr0aP+tEKpQZK8vooEUqV6nm6Cv502mX4NF2EfsnVqtNAHG+/6Ur1Q==} - engines: {node: '>=8'} - recast@0.24.0: resolution: {integrity: sha512-dN08tw9Kl2i8oDBy16NhxBh6qOqsEqmGYpX1xaxPmgz6/6ukopSuysLfvLbieuDMY57jEz6eTmNz6lqH54kuqQ==} engines: {node: '>= 22'} @@ -7538,24 +7539,13 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - resolve-cwd@3.0.0: - resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} - engines: {node: '>=8'} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} - resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - resolve-path@1.4.0: resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==} engines: {node: '>= 0.8'} @@ -7564,9 +7554,6 @@ packages: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated - resolve@1.1.7: - resolution: {integrity: sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==} - resolve@1.22.13: resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==} engines: {node: '>= 0.4'} @@ -7606,6 +7593,11 @@ packages: resolution: {integrity: sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==} engines: {node: '>= 0.8'} + rolldown@1.3.4: + resolution: {integrity: sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rou3@1.0.0: resolution: {integrity: sha512-ySeaQkSrua+ut9g+65I7FHqOFBaY8tV0FmccXItoq0q21se32Q3u4YiW7/RqXSosWgYJaaKwRHXy3BST9PeCNQ==} engines: {node: '>=20.19.0'} @@ -7614,10 +7606,6 @@ packages: resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} engines: {node: '>= 18'} - rsvp@4.8.5: - resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} - engines: {node: 6.* || >= 7.*} - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} @@ -7646,12 +7634,6 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sane@4.1.0: - resolution: {integrity: sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==} - engines: {node: 6.* || 8.* || >= 10.*} - deprecated: some dependency vulnerabilities fixed, support for node < 10 dropped, and newer ECMAScript syntax/features added - hasBin: true - sass-loader@14.2.1: resolution: {integrity: sha512-G0VcnMYU18a4N7VoNDegg2OuMjYtxnqzQWARVWCIVSZwJeiL9kg8QMsuIZOplsJgTzZLF6jGxI3AClj8I9nRdQ==} engines: {node: '>= 18.12.0'} @@ -7822,9 +7804,6 @@ packages: engines: {node: '>=4'} hasBin: true - shellwords@0.1.1: - resolution: {integrity: sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==} - side-channel-list@1.0.1: resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} engines: {node: '>= 0.4'} @@ -7852,9 +7831,6 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} - sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -7897,6 +7873,10 @@ packages: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + source-map-js@1.3.0: + resolution: {integrity: sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==} + engines: {node: '>=6.0.0'} + source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated @@ -7946,9 +7926,6 @@ packages: split@0.3.3: resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} - sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - srvx@1.0.8: resolution: {integrity: sha512-ngFS/J6St4PJfHRHGjr78xkPPtbyXtdMOLNE4x/XZunEK3OhV7aGUWMHf9WTUEy6wm1U0W4okkd82ZFFWRVQTw==} engines: {node: '>=20.16.0'} @@ -7970,10 +7947,6 @@ packages: resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' - stack-utils@1.0.5: - resolution: {integrity: sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==} - engines: {node: '>=8'} - stackframe@1.3.4: resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} @@ -7989,6 +7962,9 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + stealthy-require@1.1.1: resolution: {integrity: sha512-ZnWpYnYugiOVEY5GkcuJK1io5V8QmNYChG62gSit9pQVGErXtrKuPC55ITaVSukmMta5qpMU7vqLt2Lnni4f/g==} engines: {node: '>=0.10.0'} @@ -8008,10 +7984,6 @@ packages: stricter-htmlparser2@3.9.6: resolution: {integrity: sha512-w/PqXYnjfpi49nb3xnsizORItMM53M/jHdCL8Cer0OqO3vRLsNDtRKoHY/IkIuGnH7/TEn23yvlZoQQLt7pdrw==} - string-length@3.1.0: - resolution: {integrity: sha512-Ttp5YvkGm5v9Ijagtaz1BnN+k9ObpvS0eIBblPMp2YWL8FBmi9qblQ9fexc2k/CXFgrTIteU3jAw3payCnwSTA==} - engines: {node: '>=8'} - string-width@2.1.1: resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} engines: {node: '>=4'} @@ -8030,18 +8002,10 @@ packages: resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} engines: {node: '>=4'} - strip-ansi@5.2.0: - resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} - engines: {node: '>=6'} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-bom@4.0.0: - resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} - engines: {node: '>=8'} - strip-eof@1.0.0: resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} engines: {node: '>=0.10.0'} @@ -8058,6 +8022,10 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + stylehacks@5.1.1: resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} engines: {node: ^10 || ^12 || >=14.0} @@ -8076,10 +8044,6 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} - supports-hyperlinks@2.3.0: - resolution: {integrity: sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA==} - engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -8125,10 +8089,6 @@ packages: resolution: {integrity: sha512-RnW7HHZD1XuhSTzD3djYOdIl1adE3oNEprE3HOFFxWs5m4FZsqYRhKJ4mDU2udtNGMLUS7jV7l8vVRLWAvmPDw==} engines: {'0': node} - terminal-link@2.1.1: - resolution: {integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==} - engines: {node: '>=8'} - terser-webpack-plugin@1.4.6: resolution: {integrity: sha512-2lBVf/VMVIddjSn3GqbT90GvIJ/eYXJkt8cTzU7NbjKqK8fwv18Ftr4PlbF46b/e88743iZFL5Dtr/rC4hjIeA==} engines: {node: '>= 6.9.0'} @@ -8188,10 +8148,6 @@ packages: engines: {node: '>=10'} hasBin: true - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} - thenify-all@1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -8205,9 +8161,6 @@ packages: peerDependencies: webpack: ^4.27.0 || ^5.0.0 - throat@5.0.0: - resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==} - through2@2.0.5: resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} @@ -8227,6 +8180,10 @@ packages: tiny-invariant@1.3.3: resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} @@ -8238,9 +8195,6 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} - tmpl@1.0.5: - resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - to-array@0.1.4: resolution: {integrity: sha512-LhVdShQD/4Mk4zXNroIQZJC+Ap3zgLcDuwEdcmLv9CCO73NWockQDwyUnW/m8VX/EElfL6FcYx7EeutN4HJA6A==} @@ -8289,6 +8243,12 @@ packages: tr46@1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-loader@9.6.2: resolution: {integrity: sha512-R4iuczmtgxvtuI556s+hTZ6/7Ee03VCAk/l/M8LY1OAsUgB7YydsCxkgq9D9pKRaD7GJqUi2u8fp9zZP/ufjKA==} engines: {node: '>=12.0.0'} @@ -8320,13 +8280,9 @@ packages: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} engines: {node: '>= 0.8.0'} - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} - engines: {node: '>=4'} - - type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} @@ -8348,12 +8304,16 @@ packages: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} - typedarray-to-buffer@3.1.5: - resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typedarray@0.0.6: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -8487,10 +8447,6 @@ packages: deprecated: uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028). hasBin: true - v8-to-istanbul@4.1.4: - resolution: {integrity: sha512-Rw6vJHj1mbdK8edjR7+zuJrpDtKIgNdAvTSAcpYfgMIw+u2dPDntD3dgN4XQFLU2/fvFQdzj+EeSGfd/jnY5fQ==} - engines: {node: 8.x.x || >=10.10.0} - valibot@1.5.0: resolution: {integrity: sha512-nil6AkP2TChWL43Z5uJ6GTxX01CUA+g8LWUM+N/rB9NBbkUMaUsi9PUNzlUPgoKASgmx9f7eGOYpJ04/fSa6FQ==} peerDependencies: @@ -8510,12 +8466,102 @@ packages: resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} engines: {'0': node >=0.6.0} + vite@8.4.1: + resolution: {integrity: sha512-2bl8n3+GkKBKQQR8CZC+t+3NvjWCBNh9S0Dbfu7hr7+Jjeg71jcZk7uKF6mo8GZXjIws+Nl6jhvAfHUO320VuQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.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 + vm-browserify@1.1.2: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} vscode-uri@3.2.0: resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} + vue-eslint-parser@10.2.0: + resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vue-hot-reload-api@2.3.4: resolution: {integrity: sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==} @@ -8581,9 +8627,6 @@ packages: w3c-xmlserializer@1.1.2: resolution: {integrity: sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg==} - walker@1.0.8: - resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} - watchpack-chokidar2@2.0.1: resolution: {integrity: sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==} @@ -8723,9 +8766,6 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - which-typed-array@1.1.24: resolution: {integrity: sha512-wk4Mf4pR5mRP7eYuuTBCIQ9d0ud2Fv2jRLQpfgnRjbOxAFHmjKFValgTpitVKzJJS8ajnYQV2Du1SZ8j6b/EUQ==} engines: {node: '>= 0.4'} @@ -8739,6 +8779,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} @@ -8756,10 +8801,6 @@ packages: resolution: {integrity: sha512-iXR3tDXpbnTpzjKSylUJRkLuOrEC7hwEB221cgn6wtF8wpmz28puFXAEfPT5zrjM3wahygB//VuWEr1vTkDcNQ==} engines: {node: '>=4'} - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -8770,9 +8811,6 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - write-file-atomic@3.0.3: - resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - ws@7.5.13: resolution: {integrity: sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==} engines: {node: '>=8.3.0'} @@ -8806,6 +8844,10 @@ packages: xml-name-validator@3.0.0: resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==} + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + xml-parse-from-string@1.0.1: resolution: {integrity: sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g==} @@ -8856,18 +8898,10 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} - yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} - yargs@16.2.2: resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==} engines: {node: '>=10'} @@ -8882,6 +8916,10 @@ packages: resolution: {integrity: sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==} engines: {node: '>= 4.0.0'} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + yoctocolors@2.2.0: resolution: {integrity: sha512-xYqdZFUK/VYazNl/oCDYN+3WloWQwMfZxBoiNt6qNyk+xfOdi598muWE42rNZFp1kNOiqW936q5RhUdnpqElSg==} engines: {node: '>=18'} @@ -9156,22 +9194,7 @@ snapshots: dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-bigint@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-decorators@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': + '@babel/plugin-syntax-decorators@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 @@ -9191,51 +9214,11 @@ snapshots: '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.29.7(supports-color@8.1.1))': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7(supports-color@8.1.1))': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) @@ -9731,13 +9714,6 @@ snapshots: '@babel/helper-string-parser': 8.0.6 '@babel/helper-validator-identifier': 8.0.6 - '@bcoe/v8-coverage@0.2.3': {} - - '@cnakazawa/watch@1.0.4': - dependencies: - exec-sh: 0.3.6 - minimist: 1.2.8 - '@csstools/cascade-layer-name-parser@3.0.2(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2)': dependencies: '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) @@ -10195,9 +10171,9 @@ snapshots: '@dcloudio/uni-mp-xhs@2.0.2-5020620260917001': {} - '@dcloudio/uni-quickapp-native@2.0.2-5020620260917001(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': + '@dcloudio/uni-quickapp-native@2.0.2-5020620260917001(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': dependencies: - '@hap-toolkit/dsl-vue': 0.6.13(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + '@hap-toolkit/dsl-vue': 0.6.13(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) '@hap-toolkit/packager': 0.6.13(supports-color@8.1.1) '@hap-toolkit/server': 0.6.13(supports-color@8.1.1) module-alias: 2.3.4 @@ -10290,12 +10266,12 @@ snapshots: '@dcloudio/vue-cli-plugin-uni-optimize@2.0.2-5020620260917001': {} - '@dcloudio/vue-cli-plugin-uni@2.0.2-5020620260917001(copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(postcss@8.5.30)': + '@dcloudio/vue-cli-plugin-uni@2.0.2-5020620260917001(copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(postcss@8.5.30)': dependencies: '@dcloudio/uni-stat': 2.0.2-5020620260917001 buffer-json: 2.0.0 clone-deep: 4.0.1 - copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) cross-env: 5.2.1 envinfo: 6.0.1 hash-sum: 1.0.2 @@ -10344,6 +10320,52 @@ snapshots: tslib: 2.8.1 optional: true + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))': + dependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@8.1.1)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@8.1.1)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + '@formatjs/bigdecimal@0.2.7': {} '@formatjs/fast-memoize@3.1.7': {} @@ -10414,16 +10436,16 @@ snapshots: - supports-color - utf-8-validate - '@hap-toolkit/dsl-vue@0.6.13(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': + '@hap-toolkit/dsl-vue@0.6.13(@vue/compiler-sfc@3.5.44)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': dependencies: '@hap-toolkit/compiler': 0.6.15(supports-color@8.1.1) '@hap-toolkit/packager': 0.6.13(supports-color@8.1.1) '@hap-toolkit/shared-utils': 0.6.15 - css-loader: 2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + css-loader: 2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) md5: 2.3.0 - mini-css-extract-plugin: 0.5.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - url-loader: 2.3.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - vue-loader: 15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + mini-css-extract-plugin: 0.5.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + url-loader: 2.3.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + vue-loader: 15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) vue-template-compiler: 2.6.14 webpack-sources: 1.4.3 transitivePeerDependencies: @@ -10554,6 +10576,22 @@ snapshots: dependencies: hono: 4.13.13 + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + '@iconify-json/mdi@1.2.3': dependencies: '@iconify/types': 2.0.0 @@ -10672,165 +10710,6 @@ snapshots: '@img/sharp-win32-x64@0.35.5': optional: true - '@istanbuljs/load-nyc-config@1.1.0': - dependencies: - camelcase: 5.3.1 - find-up: 4.1.0 - get-package-type: 0.1.0 - js-yaml: 3.15.2 - resolve-from: 5.0.0 - - '@istanbuljs/schema@0.1.6': {} - - '@jest/console@25.5.0': - dependencies: - '@jest/types': 25.5.0 - chalk: 3.0.0 - jest-message-util: 25.5.0 - jest-util: 25.5.0 - slash: 3.0.0 - - '@jest/core@25.5.4(supports-color@8.1.1)': - dependencies: - '@jest/console': 25.5.0 - '@jest/reporters': 25.5.1(supports-color@8.1.1) - '@jest/test-result': 25.5.0 - '@jest/transform': 25.5.1(supports-color@8.1.1) - '@jest/types': 25.5.0 - ansi-escapes: 4.3.2 - chalk: 3.0.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-changed-files: 25.5.0 - jest-config: 25.5.4(supports-color@8.1.1) - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-message-util: 25.5.0 - jest-regex-util: 25.2.6 - jest-resolve: 25.5.1 - jest-resolve-dependencies: 25.5.4 - jest-runner: 25.5.4(supports-color@8.1.1) - jest-runtime: 25.5.4(supports-color@8.1.1) - jest-snapshot: 25.5.1 - jest-util: 25.5.0 - jest-validate: 25.5.0 - jest-watcher: 25.5.0 - micromatch: 4.0.8 - p-each-series: 2.2.0 - realpath-native: 2.0.0 - rimraf: 3.0.2 - slash: 3.0.0 - strip-ansi: 6.0.1 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - '@jest/environment@25.5.0': - dependencies: - '@jest/fake-timers': 25.5.0 - '@jest/types': 25.5.0 - jest-mock: 25.5.0 - - '@jest/fake-timers@25.5.0': - dependencies: - '@jest/types': 25.5.0 - jest-message-util: 25.5.0 - jest-mock: 25.5.0 - jest-util: 25.5.0 - lolex: 5.1.2 - - '@jest/globals@25.5.2': - dependencies: - '@jest/environment': 25.5.0 - '@jest/types': 25.5.0 - expect: 25.5.0 - - '@jest/reporters@25.5.1(supports-color@8.1.1)': - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@jest/console': 25.5.0 - '@jest/test-result': 25.5.0 - '@jest/transform': 25.5.1(supports-color@8.1.1) - '@jest/types': 25.5.0 - chalk: 3.0.0 - collect-v8-coverage: 1.0.3 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-instrument: 4.0.3(supports-color@8.1.1) - istanbul-lib-report: 3.0.1 - istanbul-lib-source-maps: 4.0.1(supports-color@8.1.1) - istanbul-reports: 3.2.0 - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-resolve: 25.5.1 - jest-util: 25.5.0 - jest-worker: 25.5.0 - slash: 3.0.0 - source-map: 0.6.1 - string-length: 3.1.0 - terminal-link: 2.1.1 - v8-to-istanbul: 4.1.4 - optionalDependencies: - node-notifier: 6.0.0 - transitivePeerDependencies: - - supports-color - - '@jest/source-map@25.5.0': - dependencies: - callsites: 3.1.0 - graceful-fs: 4.2.11 - source-map: 0.6.1 - - '@jest/test-result@25.5.0': - dependencies: - '@jest/console': 25.5.0 - '@jest/types': 25.5.0 - '@types/istanbul-lib-coverage': 2.0.6 - collect-v8-coverage: 1.0.3 - - '@jest/test-sequencer@25.5.4(supports-color@8.1.1)': - dependencies: - '@jest/test-result': 25.5.0 - graceful-fs: 4.2.11 - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-runner: 25.5.4(supports-color@8.1.1) - jest-runtime: 25.5.4(supports-color@8.1.1) - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - '@jest/transform@25.5.1(supports-color@8.1.1)': - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@jest/types': 25.5.0 - babel-plugin-istanbul: 6.1.1(supports-color@8.1.1) - chalk: 3.0.0 - convert-source-map: 1.9.0 - fast-json-stable-stringify: 2.1.0 - graceful-fs: 4.2.11 - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-regex-util: 25.2.6 - jest-util: 25.5.0 - micromatch: 4.0.8 - pirates: 4.0.7 - realpath-native: 2.0.0 - slash: 3.0.0 - source-map: 0.6.1 - write-file-atomic: 3.0.3 - transitivePeerDependencies: - - supports-color - - '@jest/types@25.5.0': - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-reports': 1.1.2 - '@types/yargs': 15.0.20 - chalk: 3.0.0 - '@jimp/bmp@0.10.3(@jimp/custom@0.10.3(debug@4.4.3(supports-color@8.1.1)))': dependencies: '@babel/runtime': 7.29.10 @@ -11337,6 +11216,8 @@ snapshots: '@oxc-project/types@0.155.0': {} + '@oxc-project/types@0.160.0': {} + '@parcel/watcher-android-arm64@2.6.0': optional: true @@ -11396,6 +11277,58 @@ snapshots: '@polka/url@1.0.0-next.29': {} + '@rolldown/binding-android-arm-eabi@1.3.4': + optional: true + + '@rolldown/binding-android-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-x64@1.3.4': + optional: true + + '@rolldown/binding-freebsd-x64@1.3.4': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.3.4': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-musl@1.3.4': + optional: true + + '@rolldown/binding-openharmony-arm64@1.3.4': + optional: true + + '@rolldown/binding-wasm32-wasi@1.3.4': + dependencies: + '@oxc-project/types': 0.160.0 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.3.4': + optional: true + + '@rolldown/pluginutils@1.1.1': {} + '@sec-ant/readable-stream@0.4.1': {} '@sideway/address@4.1.5': @@ -11408,17 +11341,13 @@ snapshots: '@sindresorhus/merge-streams@4.0.0': {} - '@sinonjs/commons@1.8.6': - dependencies: - type-detect: 4.0.8 - - '@soda/friendly-errors-webpack-plugin@1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': + '@soda/friendly-errors-webpack-plugin@1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4))': dependencies: chalk: 3.0.0 error-stack-parser: 2.1.4 string-width: 4.2.3 strip-ansi: 6.0.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) '@soda/get-current-script@1.0.2': {} @@ -11487,27 +11416,6 @@ snapshots: '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3 '@tailwindcss/oxide-win32-x64-msvc': 4.3.3 - '@types/babel__core@7.20.5': - dependencies: - '@babel/parser': 7.29.9 - '@babel/types': 7.29.8 - '@types/babel__generator': 7.27.0 - '@types/babel__template': 7.4.4 - '@types/babel__traverse': 7.28.0 - - '@types/babel__generator@7.27.0': - dependencies: - '@babel/types': 7.29.8 - - '@types/babel__template@7.4.4': - dependencies: - '@babel/parser': 7.29.9 - '@babel/types': 7.29.8 - - '@types/babel__traverse@7.28.0': - dependencies: - '@babel/types': 7.29.8 - '@types/bluebird@3.5.42': {} '@types/body-parser@1.19.6': @@ -11519,6 +11427,11 @@ snapshots: dependencies: '@types/node': 26.6.5 + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.1.3 @@ -11528,6 +11441,8 @@ snapshots: dependencies: '@types/node': 26.6.5 + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.9': {} '@types/express-serve-static-core@4.19.9': @@ -11555,10 +11470,6 @@ snapshots: dependencies: '@types/node': 26.6.5 - '@types/graceful-fs@4.1.9': - dependencies: - '@types/node': 26.6.5 - '@types/html-minifier-terser@6.1.0': {} '@types/http-errors@2.0.5': {} @@ -11567,17 +11478,6 @@ snapshots: dependencies: '@types/node': 26.6.5 - '@types/istanbul-lib-coverage@2.0.6': {} - - '@types/istanbul-lib-report@3.0.3': - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - - '@types/istanbul-reports@1.1.2': - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - '@types/istanbul-lib-report': 3.0.3 - '@types/jsesc@2.5.1': {} '@types/json-schema@7.0.15': {} @@ -11598,8 +11498,6 @@ snapshots: '@types/parse-json@4.0.2': {} - '@types/prettier@1.19.1': {} - '@types/qs@6.15.1': {} '@types/range-parser@1.2.7': {} @@ -11629,54 +11527,149 @@ snapshots: dependencies: '@types/node': 26.6.5 - '@types/stack-utils@1.0.1': {} - '@types/webpack-env@1.18.8': {} '@types/ws@8.18.2': dependencies: '@types/node': 26.6.5 - '@types/yargs-parser@21.0.3': {} - - '@types/yargs@15.0.20': - dependencies: - '@types/yargs-parser': 21.0.3 - '@types/yauzl@2.10.3': dependencies: '@types/node': 26.6.5 optional: true - '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@5.9.3))': + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': dependencies: - valibot: 1.5.0(typescript@5.9.3) + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + graphemer: 1.4.0 + ignore: 7.0.14 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color - '@volar/language-core@2.4.23': + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': dependencies: - '@volar/source-map': 2.4.23 + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color - '@volar/source-map@2.4.23': {} + '@typescript-eslint/project-service@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color - '@volar/typescript@2.4.23(typescript@5.9.3)': + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': dependencies: - '@volar/language-core': 2.4.23 - path-browserify: 1.0.1 - vscode-uri: 3.2.0 - optionalDependencies: typescript: 5.9.3 - '@vue/babel-helper-vue-jsx-merge-props@1.4.0': {} + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color - '@vue/babel-helper-vue-transform-on@1.5.0': {} + '@typescript-eslint/types@8.48.1': {} - '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': + '@typescript-eslint/typescript-estree@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': dependencies: - '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) - '@babel/helper-plugin-utils': 7.29.7 - '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/template': 7.29.7 - '@babel/traverse': 7.29.10(supports-color@8.1.1) + '@typescript-eslint/project-service': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 9.0.9 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + + '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@5.9.3))': + dependencies: + valibot: 1.5.0(typescript@5.9.3) + + '@vitest/mocker@5.0.5(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.3 + optionalDependencies: + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) + + '@vitest/spy@5.0.5': {} + + '@volar/language-core@2.4.23': + dependencies: + '@volar/source-map': 2.4.23 + + '@volar/source-map@2.4.23': {} + + '@volar/typescript@2.4.23(typescript@5.9.3)': + dependencies: + '@volar/language-core': 2.4.23 + path-browserify: 1.0.1 + vscode-uri: 3.2.0 + optionalDependencies: + typescript: 5.9.3 + + '@vue/babel-helper-vue-jsx-merge-props@1.4.0': {} + + '@vue/babel-helper-vue-transform-on@1.5.0': {} + + '@vue/babel-plugin-jsx@1.5.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1)': + dependencies: + '@babel/helper-module-imports': 7.29.7(supports-color@8.1.1) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7(supports-color@8.1.1)) + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.10(supports-color@8.1.1) '@babel/types': 7.29.8 '@vue/babel-helper-vue-transform-on': 1.5.0 '@vue/babel-plugin-resolve-type': 1.5.0(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) @@ -11791,15 +11784,15 @@ snapshots: '@vue/cli-overlay@5.0.9': {} - '@vue/cli-plugin-babel@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue@2.6.14)': + '@vue/cli-plugin-babel@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue@2.6.14)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@vue/babel-preset-app': 5.0.9(@babel/core@7.29.7(supports-color@8.1.1))(core-js@3.50.0)(supports-color@8.1.1)(vue@2.6.14) - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 - babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) transitivePeerDependencies: - '@minify-html/node' - '@napi-rs/image' @@ -11823,27 +11816,27 @@ snapshots: - vue - webpack-cli - '@vue/cli-plugin-router@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))': + '@vue/cli-plugin-router@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))': dependencies: - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 transitivePeerDependencies: - encoding - '@vue/cli-plugin-typescript@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(loader-utils@2.0.4)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(vue-template-compiler@2.6.14)(vue@2.6.14)': + '@vue/cli-plugin-typescript@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(loader-utils@2.0.4)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(vue-template-compiler@2.6.14)(vue@2.6.14)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@types/webpack-env': 1.18.8 - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 - babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - fork-ts-checker-webpack-plugin: 6.5.3(typescript@5.9.3)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(typescript@5.9.3)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) globby: 11.1.0 - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - ts-loader: 9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + ts-loader: 9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) typescript: 5.9.3 vue: 2.6.14 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: vue-template-compiler: 2.6.14 transitivePeerDependencies: @@ -11869,22 +11862,22 @@ snapshots: - uglify-js - webpack-cli - '@vue/cli-plugin-vuex@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))': + '@vue/cli-plugin-vuex@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0))': dependencies: - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0) - '@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)': + '@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)': dependencies: '@babel/helper-compilation-targets': 7.29.7 - '@soda/friendly-errors-webpack-plugin': 1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + '@soda/friendly-errors-webpack-plugin': 1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) '@soda/get-current-script': 1.0.2 '@types/minimist': 1.2.5 '@vue/cli-overlay': 5.0.9 - '@vue/cli-plugin-router': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)) - '@vue/cli-plugin-vuex': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)) + '@vue/cli-plugin-router': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)) + '@vue/cli-plugin-vuex': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(sharp@0.35.5(@types/node@26.6.5))(supports-color@8.1.1)(svgo@2.8.4)(vue-template-compiler@2.6.14)(vue@2.6.14)(webpack-sources@3.6.0)) '@vue/cli-shared-utils': 5.0.9 '@vue/component-compiler-utils': 3.3.0(lodash@4.18.1)(mustache@3.2.1) - '@vue/vue-loader-v15': vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + '@vue/vue-loader-v15': vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) '@vue/web-component-wrapper': 1.3.0 acorn: 8.19.0 acorn-walk: 8.3.5 @@ -11895,9 +11888,9 @@ snapshots: cli-highlight: 2.1.11 clipboardy: 2.3.0 cliui: 7.0.4 - copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - css-minimizer-webpack-plugin: 3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + css-minimizer-webpack-plugin: 3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) cssnano: 5.1.15(postcss@8.5.30) debug: 4.4.3(supports-color@8.1.1) default-gateway: 6.0.3 @@ -11906,32 +11899,32 @@ snapshots: fs-extra: 9.1.0 globby: 11.1.0 hash-sum: 2.0.0 - html-webpack-plugin: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + html-webpack-plugin: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) is-file-esm: 1.0.0 launch-editor-middleware: 2.14.2 lodash.defaultsdeep: 4.6.1 lodash.mapvalues: 4.6.0 - mini-css-extract-plugin: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + mini-css-extract-plugin: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) minimist: 1.2.8 module-alias: 2.3.4 portfinder: 1.0.38(supports-color@8.1.1) postcss: 8.5.30 - postcss-loader: 6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - progress-webpack-plugin: 1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + postcss-loader: 6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + progress-webpack-plugin: 1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) ssri: 8.0.1 - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) - vue-loader: 17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + vue-loader: 17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) vue-style-loader: 4.1.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) webpack-bundle-analyzer: 4.10.2 webpack-chain: 6.5.1 - webpack-dev-server: 4.15.2(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + webpack-dev-server: 4.15.2(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) webpack-merge: 5.10.0 webpack-virtual-modules: 0.4.6 whatwg-fetch: 3.6.20 optionalDependencies: - sass-loader: 14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + sass-loader: 14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) vue-template-compiler: 2.6.14 webpack-sources: 3.6.0 transitivePeerDependencies: @@ -12215,7 +12208,7 @@ snapshots: postcss-selector-parser: 7.1.6 postcss-value-parser: 4.2.0 - '@weapp-tailwindcss/postcss@3.4.3(jiti@2.7.0)(tailwindcss@4.3.3)(yaml@2.9.1)': + '@weapp-tailwindcss/postcss@3.4.3(jiti@2.7.0)(lightningcss@1.33.0)(tailwindcss@4.3.3)(yaml@2.9.1)': dependencies: '@csstools/css-color-parser': 4.2.6(@csstools/css-parser-algorithms@4.0.2(@csstools/css-tokenizer@4.0.2))(@csstools/css-tokenizer@4.0.2) '@csstools/css-parser-algorithms': 4.0.2(@csstools/css-tokenizer@4.0.2) @@ -12247,6 +12240,7 @@ snapshots: '@weapp-tailwindcss/native-linux-x64-musl': 5.6.3 '@weapp-tailwindcss/native-win32-arm64-msvc': 5.6.3 '@weapp-tailwindcss/native-win32-x64-msvc': 5.6.3 + lightningcss: 1.33.0 transitivePeerDependencies: - jiti - tailwindcss @@ -12459,25 +12453,25 @@ snapshots: '@webassemblyjs/wast-parser': 1.9.0 '@xtuc/long': 4.2.2 - '@x18n/builtins@0.1.14(typescript@5.9.3)': + '@x18n/builtins@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: '@vue/compiler-sfc': 3.5.44 '@x18n/core': 0.1.14(typescript@5.9.3) json5: 2.2.3 jsonc-parser: 3.3.1 oxc-parser: 0.155.0 - svelte: 5.57.3 + svelte: 5.57.3(@typescript-eslint/types@8.48.1) yaml: 2.9.1 transitivePeerDependencies: - '@typescript-eslint/types' - typescript - '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) - '@x18n/node': 0.1.14(typescript@5.9.3) - '@x18n/ui': 0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + '@x18n/node': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) + '@x18n/ui': 0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) cac: 7.1.0 devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) nostics: 1.3.0 @@ -12497,9 +12491,9 @@ snapshots: transitivePeerDependencies: - typescript - '@x18n/node@0.1.14(typescript@5.9.3)': + '@x18n/node@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) chokidar: 6.0.0 ignore: 7.0.14 @@ -12511,11 +12505,11 @@ snapshots: - '@typescript-eslint/types' - typescript - '@x18n/ui@0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/ui@0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: '@devframes/agentic': 1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6) '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@5.9.3)) - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) valibot: 1.5.0(typescript@5.9.3) @@ -12535,7 +12529,8 @@ snapshots: dependencies: shelljs: 0.8.5 - abab@2.0.6: {} + abab@2.0.6: + optional: true accepts@1.3.8: dependencies: @@ -12551,8 +12546,14 @@ snapshots: dependencies: acorn: 6.4.2 acorn-walk: 6.2.0 + optional: true - acorn-walk@6.2.0: {} + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + + acorn-walk@6.2.0: + optional: true acorn-walk@8.3.5: dependencies: @@ -12562,7 +12563,8 @@ snapshots: acorn@6.4.2: {} - acorn@7.4.1: {} + acorn@7.4.1: + optional: true acorn@8.19.0: {} @@ -12637,16 +12639,10 @@ snapshots: ansi-escapes@3.2.0: {} - ansi-escapes@4.3.2: - dependencies: - type-fest: 0.21.3 - ansi-html-community@0.0.8: {} ansi-regex@3.0.1: {} - ansi-regex@4.1.1: {} - ansi-regex@5.0.1: {} ansi-styles@3.2.1: @@ -12667,6 +12663,7 @@ snapshots: normalize-path: 2.1.1 transitivePeerDependencies: - supports-color + optional: true anymatch@3.1.3: dependencies: @@ -12684,10 +12681,6 @@ snapshots: delegates: 1.0.0 readable-stream: 3.6.2 - argparse@1.0.10: - dependencies: - sprintf-js: 1.0.3 - argparse@2.0.1: {} aria-query@5.3.1: {} @@ -12698,7 +12691,8 @@ snapshots: arr-union@3.1.0: {} - array-equal@1.0.2: {} + array-equal@1.0.2: + optional: true array-flatten@1.1.1: {} @@ -12727,14 +12721,14 @@ snapshots: object.assign: 4.1.7 util: 0.10.4 + assertion-error@2.0.1: {} + assign-symbols@1.0.0: {} ast-types@0.16.3: dependencies: tslib: 2.8.1 - astral-regex@1.0.0: {} - async-each@1.0.6: optional: true @@ -12775,20 +12769,6 @@ snapshots: axobject-query@4.1.0: {} - babel-jest@25.5.1(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@jest/transform': 25.5.1(supports-color@8.1.1) - '@jest/types': 25.5.0 - '@types/babel__core': 7.20.5 - babel-plugin-istanbul: 6.1.1(supports-color@8.1.1) - babel-preset-jest: 25.5.0(@babel/core@7.29.7(supports-color@8.1.1)) - chalk: 3.0.0 - graceful-fs: 4.2.11 - slash: 3.0.0 - transitivePeerDependencies: - - supports-color - babel-loader@8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@4.47.0(supports-color@8.1.1)): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) @@ -12798,14 +12778,14 @@ snapshots: schema-utils: 2.7.1 webpack: 4.47.0(supports-color@8.1.1) - babel-loader@8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + babel-loader@8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) find-cache-dir: 3.3.2 loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) babel-plugin-dynamic-import-node@2.3.3: dependencies: @@ -12817,22 +12797,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-plugin-istanbul@6.1.1(supports-color@8.1.1): - dependencies: - '@babel/helper-plugin-utils': 7.29.7 - '@istanbuljs/load-nyc-config': 1.1.0 - '@istanbuljs/schema': 0.1.6 - istanbul-lib-instrument: 5.2.1(supports-color@8.1.1) - test-exclude: 6.0.0 - transitivePeerDependencies: - - supports-color - - babel-plugin-jest-hoist@25.5.0: - dependencies: - '@babel/template': 7.29.7 - '@babel/types': 7.29.8 - '@types/babel__traverse': 7.28.0 - babel-plugin-polyfill-corejs2@0.4.17(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1): dependencies: '@babel/compat-data': 7.29.7 @@ -12865,27 +12829,6 @@ snapshots: transitivePeerDependencies: - supports-color - babel-preset-current-node-syntax@0.1.4(@babel/core@7.29.7(supports-color@8.1.1)): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-bigint': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.29.7(supports-color@8.1.1)) - - babel-preset-jest@25.5.0(@babel/core@7.29.7(supports-color@8.1.1)): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - babel-plugin-jest-hoist: 25.5.0 - babel-preset-current-node-syntax: 0.1.4(@babel/core@7.29.7(supports-color@8.1.1)) - backo2@1.0.2: {} balanced-match@1.0.2: {} @@ -12989,6 +12932,10 @@ snapshots: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.1.8: + dependencies: + balanced-match: 1.0.2 + braces@2.3.2(supports-color@8.1.1): dependencies: arr-flatten: 1.1.0 @@ -13010,11 +12957,8 @@ snapshots: brorand@1.1.0: {} - browser-process-hrtime@1.0.0: {} - - browser-resolve@1.11.3: - dependencies: - resolve: 1.1.7 + browser-process-hrtime@1.0.0: + optional: true browserify-aes@1.2.0: dependencies: @@ -13068,10 +13012,6 @@ snapshots: node-releases: 2.0.59 update-browserslist-db: 1.3.4(browserslist@4.29.3) - bser@2.1.2: - dependencies: - node-int64: 0.4.0 - buffer-crc32@0.2.13: {} buffer-equal@0.0.1: {} @@ -13169,10 +13109,6 @@ snapshots: caniuse-lite@1.0.30001816: {} - capture-exit@2.0.0: - dependencies: - rsvp: 4.8.5 - case-sensitive-paths-webpack-plugin@2.4.0: {} caseless@0.12.0: {} @@ -13183,6 +13119,8 @@ snapshots: transitivePeerDependencies: - debug + chai@6.3.0: {} + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -13246,8 +13184,6 @@ snapshots: chrome-trace-event@1.0.4: {} - ci-info@2.0.0: {} - cipher-base@1.0.7: dependencies: inherits: 2.0.4 @@ -13290,12 +13226,6 @@ snapshots: execa: 1.0.0 is-wsl: 2.2.0 - cliui@6.0.0: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - cliui@7.0.4: dependencies: string-width: 4.2.3 @@ -13329,8 +13259,6 @@ snapshots: co@4.6.0: {} - collect-v8-coverage@1.0.3: {} - collection-visit@1.0.0: dependencies: map-visit: 1.0.0 @@ -13438,8 +13366,6 @@ snapshots: content-type@2.1.0: {} - convert-source-map@1.9.0: {} - convert-source-map@2.0.0: {} cookie-signature@1.0.7: {} @@ -13468,7 +13394,7 @@ snapshots: copy-to@2.0.1: {} - copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: fast-glob: 3.3.3 glob-parent: 6.0.2 @@ -13476,7 +13402,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) core-js-compat@3.50.0: dependencies: @@ -13599,7 +13525,7 @@ snapshots: postcss-selector-parser: 7.1.6 postcss-value-parser: 4.2.0 - css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: camelcase: 5.3.1 icss-utils: 4.1.1 @@ -13612,9 +13538,9 @@ snapshots: postcss-modules-values: 2.0.0 postcss-value-parser: 3.3.1 schema-utils: 1.0.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) - css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: icss-utils: 5.1.0(postcss@8.5.30) postcss: 8.5.30 @@ -13625,9 +13551,9 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.8.5 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) - css-minimizer-webpack-plugin@3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + css-minimizer-webpack-plugin@3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: cssnano: 5.1.15(postcss@8.5.30) jest-worker: 27.5.1 @@ -13635,7 +13561,7 @@ snapshots: schema-utils: 4.5.0 serialize-javascript: 6.0.2 source-map: 0.6.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: clean-css: 5.3.3 csso: 4.2.0 @@ -13722,13 +13648,16 @@ snapshots: dependencies: css-tree: 1.1.3 - cssom@0.3.8: {} + cssom@0.3.8: + optional: true - cssom@0.4.4: {} + cssom@0.4.4: + optional: true cssstyle@2.3.0: dependencies: cssom: 0.3.8 + optional: true cyclist@1.0.2: {} @@ -13741,6 +13670,7 @@ snapshots: abab: 2.0.6 whatwg-mimetype: 2.3.0 whatwg-url: 7.1.0 + optional: true dayjs@1.11.23: {} @@ -13778,8 +13708,6 @@ snapshots: optionalDependencies: supports-color: 8.1.1 - decamelize@1.2.0: {} - decode-uri-component@0.2.2: {} deep-equal@1.0.1: {} @@ -13846,8 +13774,6 @@ snapshots: detect-libc@2.1.2: {} - detect-newline@3.1.0: {} - detect-node@2.1.0: {} devalue@5.9.4: {} @@ -13865,8 +13791,6 @@ snapshots: - ocache - srvx - diff-sequences@25.2.6: {} - diffie-hellman@5.0.3: dependencies: bn.js: 4.12.5 @@ -13915,6 +13839,7 @@ snapshots: domexception@1.0.1: dependencies: webidl-conversions: 4.0.2 + optional: true domhandler@4.3.1: dependencies: @@ -14088,8 +14013,6 @@ snapshots: escape-string-regexp@1.0.5: {} - escape-string-regexp@2.0.0: {} - escape-string-regexp@4.0.0: {} escodegen@1.14.3: @@ -14101,18 +14024,93 @@ snapshots: optionalDependencies: source-map: 0.6.1 + eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 7.1.6 + semver: 7.8.5 + vue-eslint-parser: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + xml-name-validator: 4.0.0 + optionalDependencies: + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + eslint-scope@4.0.3: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@8.1.1) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@8.1.1) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 + transitivePeerDependencies: + - supports-color + esm-env@1.2.2: {} + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + esprima@4.0.1: {} - esrap@2.4.0: + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrap@2.4.0(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + optionalDependencies: + '@typescript-eslint/types': 8.48.1 esrecurse@4.3.0: dependencies: @@ -14124,6 +14122,10 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + esutils@2.0.3: {} etag@1.8.1: {} @@ -14145,8 +14147,6 @@ snapshots: md5.js: 1.3.5 safe-buffer: 5.2.1 - exec-sh@0.3.6: {} - execa@1.0.0: dependencies: cross-spawn: 6.0.6 @@ -14157,19 +14157,6 @@ snapshots: signal-exit: 3.0.7 strip-eof: 1.0.0 - execa@3.4.0: - dependencies: - cross-spawn: 7.0.6 - get-stream: 5.2.0 - human-signals: 1.1.1 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - p-finally: 2.0.1 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -14199,8 +14186,6 @@ snapshots: exif-parser@0.1.12: {} - exit@0.1.2: {} - expand-brackets@2.1.4(supports-color@8.1.1): dependencies: debug: 2.6.9(supports-color@8.1.1) @@ -14213,14 +14198,7 @@ snapshots: transitivePeerDependencies: - supports-color - expect@25.5.0: - dependencies: - '@jest/types': 25.5.0 - ansi-styles: 4.3.0 - jest-get-type: 25.2.6 - jest-matcher-utils: 25.5.0 - jest-message-util: 25.5.0 - jest-regex-util: 25.2.6 + expect-type@1.4.0: {} express-rate-limit@8.7.1(express@5.3.0(supports-color@8.1.1))(supports-color@8.1.1): dependencies: @@ -14363,10 +14341,6 @@ snapshots: dependencies: websocket-driver: 0.7.5 - fb-watchman@2.0.4: - dependencies: - bser: 2.1.2 - fd-slicer@1.1.0: dependencies: pend: 1.2.0 @@ -14385,6 +14359,10 @@ snapshots: dependencies: is-unicode-supported: 2.1.0 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + file-type@9.0.0: {} file-uri-to-path@1.0.0: @@ -14445,8 +14423,20 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.6.0 + keyv: 4.5.4 + flat@5.0.2: {} + flatted@3.6.0: {} + flush-write-stream@1.1.1: dependencies: inherits: 2.0.4 @@ -14468,7 +14458,7 @@ snapshots: forever-agent@0.6.1: {} - fork-ts-checker-webpack-plugin@6.5.3(typescript@5.9.3)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + fork-ts-checker-webpack-plugin@6.5.3(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(typescript@5.9.3)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@babel/code-frame': 7.29.7 '@types/json-schema': 7.0.15 @@ -14484,8 +14474,9 @@ snapshots: semver: 7.8.5 tapable: 1.1.3 typescript: 5.9.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) vue-template-compiler: 2.6.14 form-data@2.3.3: @@ -14593,8 +14584,6 @@ snapshots: hasown: 2.0.4 math-intrinsics: 1.1.0 - get-package-type@0.1.0: {} - get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 @@ -14655,6 +14644,8 @@ snapshots: min-document: 2.19.2 process: 0.11.10 + globals@14.0.0: {} + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -14668,8 +14659,7 @@ snapshots: graceful-fs@4.2.11: {} - growly@1.3.0: - optional: true + graphemer@1.4.0: {} gzip-size@6.0.0: dependencies: @@ -14781,6 +14771,7 @@ snapshots: html-encoding-sniffer@1.0.2: dependencies: whatwg-encoding: 1.0.5 + optional: true html-entities@2.6.0: {} @@ -14798,7 +14789,7 @@ snapshots: html-tags@2.0.0: {} - html-webpack-plugin@5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + html-webpack-plugin@5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -14806,7 +14797,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.3.3 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) htmlparser2@12.0.0: dependencies: @@ -14889,8 +14880,6 @@ snapshots: transitivePeerDependencies: - supports-color - human-signals@1.1.1: {} - human-signals@2.1.0: {} human-signals@8.0.1: {} @@ -14945,11 +14934,6 @@ snapshots: parent-module: 1.0.1 resolve-from: 4.0.0 - import-local@3.2.0: - dependencies: - pkg-dir: 4.2.0 - resolve-cwd: 3.0.0 - import-meta-resolve@4.2.0: {} imurmurhash@0.1.4: {} @@ -14981,7 +14965,8 @@ snapshots: ip-address@10.7.4: {} - ip-regex@2.1.0: {} + ip-regex@2.1.0: + optional: true ipaddr.js@1.9.1: {} @@ -15006,10 +14991,6 @@ snapshots: is-callable@1.2.7: {} - is-ci@2.0.0: - dependencies: - ci-info: 2.0.0 - is-core-module@2.17.0: dependencies: hasown: 2.0.4 @@ -15048,8 +15029,6 @@ snapshots: is-function@1.0.2: {} - is-generator-fn@2.1.0: {} - is-generator-function@1.1.2: dependencies: call-bound: 1.0.4 @@ -15130,364 +15109,17 @@ snapshots: isarray@2.0.5: {} - isexe@2.0.0: {} - - isobject@2.1.0: - dependencies: - isarray: 1.0.0 - - isobject@3.0.1: {} - - isstream@0.1.2: {} - - istanbul-lib-coverage@3.2.2: {} - - istanbul-lib-instrument@4.0.3(supports-color@8.1.1): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@istanbuljs/schema': 0.1.6 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - istanbul-lib-instrument@5.2.1(supports-color@8.1.1): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@babel/parser': 7.29.9 - '@istanbuljs/schema': 0.1.6 - istanbul-lib-coverage: 3.2.2 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - - istanbul-lib-report@3.0.1: - dependencies: - istanbul-lib-coverage: 3.2.2 - make-dir: 4.0.0 - supports-color: 7.2.0 - - istanbul-lib-source-maps@4.0.1(supports-color@8.1.1): - dependencies: - debug: 4.4.3(supports-color@8.1.1) - istanbul-lib-coverage: 3.2.2 - source-map: 0.6.1 - transitivePeerDependencies: - - supports-color - - istanbul-reports@3.2.0: - dependencies: - html-escaper: 2.0.2 - istanbul-lib-report: 3.0.1 - - javascript-stringify@2.1.0: {} - - jest-changed-files@25.5.0: - dependencies: - '@jest/types': 25.5.0 - execa: 3.4.0 - throat: 5.0.0 - - jest-cli@25.5.4(supports-color@8.1.1): - dependencies: - '@jest/core': 25.5.4(supports-color@8.1.1) - '@jest/test-result': 25.5.0 - '@jest/types': 25.5.0 - chalk: 3.0.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - import-local: 3.2.0 - is-ci: 2.0.0 - jest-config: 25.5.4(supports-color@8.1.1) - jest-util: 25.5.0 - jest-validate: 25.5.0 - prompts: 2.4.2 - realpath-native: 2.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - jest-config@25.5.4(supports-color@8.1.1): - dependencies: - '@babel/core': 7.29.7(supports-color@8.1.1) - '@jest/test-sequencer': 25.5.4(supports-color@8.1.1) - '@jest/types': 25.5.0 - babel-jest: 25.5.1(@babel/core@7.29.7(supports-color@8.1.1))(supports-color@8.1.1) - chalk: 3.0.0 - deepmerge: 4.3.1 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-environment-jsdom: 25.5.0 - jest-environment-node: 25.5.0 - jest-get-type: 25.2.6 - jest-jasmine2: 25.5.4(supports-color@8.1.1) - jest-regex-util: 25.2.6 - jest-resolve: 25.5.1 - jest-util: 25.5.0 - jest-validate: 25.5.0 - micromatch: 4.0.8 - pretty-format: 25.5.0 - realpath-native: 2.0.0 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - jest-diff@25.5.0: - dependencies: - chalk: 3.0.0 - diff-sequences: 25.2.6 - jest-get-type: 25.2.6 - pretty-format: 25.5.0 - - jest-docblock@25.3.0: - dependencies: - detect-newline: 3.1.0 - - jest-each@25.5.0: - dependencies: - '@jest/types': 25.5.0 - chalk: 3.0.0 - jest-get-type: 25.2.6 - jest-util: 25.5.0 - pretty-format: 25.5.0 - - jest-environment-jsdom@25.5.0: - dependencies: - '@jest/environment': 25.5.0 - '@jest/fake-timers': 25.5.0 - '@jest/types': 25.5.0 - jest-mock: 25.5.0 - jest-util: 25.5.0 - jsdom: 15.2.1 - transitivePeerDependencies: - - bufferutil - - canvas - - utf-8-validate - - jest-environment-node@25.5.0: - dependencies: - '@jest/environment': 25.5.0 - '@jest/fake-timers': 25.5.0 - '@jest/types': 25.5.0 - jest-mock: 25.5.0 - jest-util: 25.5.0 - semver: 6.3.1 - - jest-get-type@25.2.6: {} - - jest-haste-map@25.5.1(supports-color@8.1.1): - dependencies: - '@jest/types': 25.5.0 - '@types/graceful-fs': 4.1.9 - anymatch: 3.1.3 - fb-watchman: 2.0.4 - graceful-fs: 4.2.11 - jest-serializer: 25.5.0 - jest-util: 25.5.0 - jest-worker: 25.5.0 - micromatch: 4.0.8 - sane: 4.1.0(supports-color@8.1.1) - walker: 1.0.8 - which: 2.0.2 - optionalDependencies: - fsevents: 2.3.3 - transitivePeerDependencies: - - supports-color - - jest-jasmine2@25.5.4(supports-color@8.1.1): - dependencies: - '@babel/traverse': 7.29.10(supports-color@8.1.1) - '@jest/environment': 25.5.0 - '@jest/source-map': 25.5.0 - '@jest/test-result': 25.5.0 - '@jest/types': 25.5.0 - chalk: 3.0.0 - co: 4.6.0 - expect: 25.5.0 - is-generator-fn: 2.1.0 - jest-each: 25.5.0 - jest-matcher-utils: 25.5.0 - jest-message-util: 25.5.0 - jest-runtime: 25.5.4(supports-color@8.1.1) - jest-snapshot: 25.5.1 - jest-util: 25.5.0 - pretty-format: 25.5.0 - throat: 5.0.0 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - jest-leak-detector@25.5.0: - dependencies: - jest-get-type: 25.2.6 - pretty-format: 25.5.0 - - jest-matcher-utils@25.5.0: - dependencies: - chalk: 3.0.0 - jest-diff: 25.5.0 - jest-get-type: 25.2.6 - pretty-format: 25.5.0 - - jest-message-util@25.5.0: - dependencies: - '@babel/code-frame': 7.29.7 - '@jest/types': 25.5.0 - '@types/stack-utils': 1.0.1 - chalk: 3.0.0 - graceful-fs: 4.2.11 - micromatch: 4.0.8 - slash: 3.0.0 - stack-utils: 1.0.5 - - jest-mock@25.5.0: - dependencies: - '@jest/types': 25.5.0 - - jest-pnp-resolver@1.2.3(jest-resolve@25.5.1): - optionalDependencies: - jest-resolve: 25.5.1 - - jest-regex-util@25.2.6: {} - - jest-resolve-dependencies@25.5.4: - dependencies: - '@jest/types': 25.5.0 - jest-regex-util: 25.2.6 - jest-snapshot: 25.5.1 - - jest-resolve@25.5.1: - dependencies: - '@jest/types': 25.5.0 - browser-resolve: 1.11.3 - chalk: 3.0.0 - graceful-fs: 4.2.11 - jest-pnp-resolver: 1.2.3(jest-resolve@25.5.1) - read-pkg-up: 7.0.1 - realpath-native: 2.0.0 - resolve: 1.22.13 - slash: 3.0.0 - - jest-runner@25.5.4(supports-color@8.1.1): - dependencies: - '@jest/console': 25.5.0 - '@jest/environment': 25.5.0 - '@jest/test-result': 25.5.0 - '@jest/types': 25.5.0 - chalk: 3.0.0 - exit: 0.1.2 - graceful-fs: 4.2.11 - jest-config: 25.5.4(supports-color@8.1.1) - jest-docblock: 25.3.0 - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-jasmine2: 25.5.4(supports-color@8.1.1) - jest-leak-detector: 25.5.0 - jest-message-util: 25.5.0 - jest-resolve: 25.5.1 - jest-runtime: 25.5.4(supports-color@8.1.1) - jest-util: 25.5.0 - jest-worker: 25.5.0 - source-map-support: 0.5.21 - throat: 5.0.0 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - jest-runtime@25.5.4(supports-color@8.1.1): - dependencies: - '@jest/console': 25.5.0 - '@jest/environment': 25.5.0 - '@jest/globals': 25.5.2 - '@jest/source-map': 25.5.0 - '@jest/test-result': 25.5.0 - '@jest/transform': 25.5.1(supports-color@8.1.1) - '@jest/types': 25.5.0 - '@types/yargs': 15.0.20 - chalk: 3.0.0 - collect-v8-coverage: 1.0.3 - exit: 0.1.2 - glob: 7.2.3 - graceful-fs: 4.2.11 - jest-config: 25.5.4(supports-color@8.1.1) - jest-haste-map: 25.5.1(supports-color@8.1.1) - jest-message-util: 25.5.0 - jest-mock: 25.5.0 - jest-regex-util: 25.2.6 - jest-resolve: 25.5.1 - jest-snapshot: 25.5.1 - jest-util: 25.5.0 - jest-validate: 25.5.0 - realpath-native: 2.0.0 - slash: 3.0.0 - strip-bom: 4.0.0 - yargs: 15.4.1 - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - - jest-serializer@25.5.0: - dependencies: - graceful-fs: 4.2.11 - - jest-snapshot@25.5.1: - dependencies: - '@babel/types': 7.29.8 - '@jest/types': 25.5.0 - '@types/prettier': 1.19.1 - chalk: 3.0.0 - expect: 25.5.0 - graceful-fs: 4.2.11 - jest-diff: 25.5.0 - jest-get-type: 25.2.6 - jest-matcher-utils: 25.5.0 - jest-message-util: 25.5.0 - jest-resolve: 25.5.1 - make-dir: 3.1.0 - natural-compare: 1.4.0 - pretty-format: 25.5.0 - semver: 6.3.1 - - jest-util@25.5.0: - dependencies: - '@jest/types': 25.5.0 - chalk: 3.0.0 - graceful-fs: 4.2.11 - is-ci: 2.0.0 - make-dir: 3.1.0 + isexe@2.0.0: {} - jest-validate@25.5.0: + isobject@2.1.0: dependencies: - '@jest/types': 25.5.0 - camelcase: 5.3.1 - chalk: 3.0.0 - jest-get-type: 25.2.6 - leven: 3.1.0 - pretty-format: 25.5.0 + isarray: 1.0.0 - jest-watcher@25.5.0: - dependencies: - '@jest/test-result': 25.5.0 - '@jest/types': 25.5.0 - ansi-escapes: 4.3.2 - chalk: 3.0.0 - jest-util: 25.5.0 - string-length: 3.1.0 + isobject@3.0.1: {} - jest-worker@25.5.0: - dependencies: - merge-stream: 2.0.0 - supports-color: 7.2.0 + isstream@0.1.2: {} + + javascript-stringify@2.1.0: {} jest-worker@27.5.1: dependencies: @@ -15495,17 +15127,6 @@ snapshots: merge-stream: 2.0.0 supports-color: 8.1.1 - jest@25.5.4(supports-color@8.1.1): - dependencies: - '@jest/core': 25.5.4(supports-color@8.1.1) - import-local: 3.2.0 - jest-cli: 25.5.4(supports-color@8.1.1) - transitivePeerDependencies: - - bufferutil - - canvas - - supports-color - - utf-8-validate - jimp@0.10.3(debug@4.4.3(supports-color@8.1.1)): dependencies: '@babel/runtime': 7.29.10 @@ -15537,11 +15158,6 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@3.15.2: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - js-yaml@4.3.2: dependencies: argparse: 2.0.1 @@ -15579,9 +15195,12 @@ snapshots: transitivePeerDependencies: - bufferutil - utf-8-validate + optional: true jsesc@3.1.0: {} + json-buffer@3.0.1: {} + json-parse-better-errors@1.0.2: {} json-parse-even-better-errors@2.3.1: {} @@ -15594,6 +15213,8 @@ snapshots: json-schema@0.4.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} + json-stringify-safe@5.0.1: {} json5@1.0.2: @@ -15634,6 +15255,10 @@ snapshots: dependencies: tsscmp: 1.0.6 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + kill-port@1.6.1: dependencies: get-them-args: 1.3.2 @@ -15649,8 +15274,6 @@ snapshots: kind-of@6.0.3: {} - kleur@3.0.3: {} - klona@2.0.6: {} koa-body@4.2.0: @@ -15750,13 +15373,16 @@ snapshots: dependencies: invert-kv: 3.0.1 - leven@3.1.0: {} - levn@0.3.0: dependencies: prelude-ls: 1.1.2 type-check: 0.3.2 + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + licia@1.49.0: {} lie@3.3.0: @@ -15766,36 +15392,69 @@ snapshots: lightningcss-android-arm64@1.32.0: optional: true + lightningcss-android-arm64@1.33.0: + optional: true + lightningcss-darwin-arm64@1.32.0: optional: true + lightningcss-darwin-arm64@1.33.0: + optional: true + lightningcss-darwin-x64@1.32.0: optional: true + lightningcss-darwin-x64@1.33.0: + optional: true + lightningcss-freebsd-x64@1.32.0: optional: true + lightningcss-freebsd-x64@1.33.0: + optional: true + lightningcss-linux-arm-gnueabihf@1.32.0: optional: true + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + lightningcss-linux-arm64-gnu@1.32.0: optional: true + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + lightningcss-linux-arm64-musl@1.32.0: optional: true + lightningcss-linux-arm64-musl@1.33.0: + optional: true + lightningcss-linux-x64-gnu@1.32.0: optional: true + lightningcss-linux-x64-gnu@1.33.0: + optional: true + lightningcss-linux-x64-musl@1.32.0: optional: true + lightningcss-linux-x64-musl@1.33.0: + optional: true + lightningcss-win32-arm64-msvc@1.32.0: optional: true + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + lightningcss-win32-x64-msvc@1.32.0: optional: true + lightningcss-win32-x64-msvc@1.33.0: + optional: true + lightningcss@1.32.0: dependencies: detect-libc: 2.1.2 @@ -15812,6 +15471,22 @@ snapshots: lightningcss-win32-arm64-msvc: 1.32.0 lightningcss-win32-x64-msvc: 1.32.0 + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + lilconfig@2.1.0: {} lilconfig@3.1.4: {} @@ -15864,6 +15539,10 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash.debounce@4.0.8: {} lodash.defaultsdeep@4.6.1: {} @@ -15874,7 +15553,10 @@ snapshots: lodash.memoize@4.1.2: {} - lodash.sortby@4.7.0: {} + lodash.merge@4.6.2: {} + + lodash.sortby@4.7.0: + optional: true lodash.uniq@4.5.0: {} @@ -15891,10 +15573,6 @@ snapshots: cli-cursor: 2.1.0 wrap-ansi: 3.0.1 - lolex@5.1.2: - dependencies: - '@sinonjs/commons': 1.8.6 - lower-case@2.0.2: dependencies: tslib: 2.8.1 @@ -15931,16 +15609,8 @@ snapshots: dependencies: semver: 6.3.1 - make-dir@4.0.0: - dependencies: - semver: 7.8.5 - make-plural@7.5.0: {} - makeerror@1.0.12: - dependencies: - tmpl: 1.0.5 - map-cache@0.2.2: {} map-visit@1.0.0: @@ -16051,18 +15721,18 @@ snapshots: dependencies: dom-walk: 0.1.2 - mini-css-extract-plugin@0.5.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + mini-css-extract-plugin@0.5.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: loader-utils: 1.4.2 schema-utils: 1.0.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) webpack-sources: 1.4.3 - mini-css-extract-plugin@2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + mini-css-extract-plugin@2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: schema-utils: 4.5.0 tapable: 2.3.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) mini-types@0.0.6: {} @@ -16074,20 +15744,25 @@ snapshots: dependencies: brace-expansion: 1.1.21 + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.8 + minimist@1.2.8: {} - minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.5.0 terser: 5.51.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: clean-css: 5.3.3 cssnano: 5.1.15(postcss@8.5.30) csso: 4.2.0 html-minifier-terser: 6.1.0 + lightningcss: 1.33.0 postcss: 8.5.30 sharp: 0.35.5(@types/node@26.6.5) svgo: 2.8.4 @@ -16188,6 +15863,9 @@ snapshots: transitivePeerDependencies: - supports-color + napi-windows-process-start-time@0.1.0: + optional: true + natural-compare@1.4.0: {} negotiator@0.6.3: {} @@ -16218,8 +15896,6 @@ snapshots: node-forge@1.4.0: {} - node-int64@0.4.0: {} - node-libs-browser@2.2.1: dependencies: assert: 1.5.1 @@ -16246,15 +15922,6 @@ snapshots: util: 0.11.1 vm-browserify: 1.1.2 - node-notifier@6.0.0: - dependencies: - growly: 1.3.0 - is-wsl: 2.2.0 - semver: 6.3.1 - shellwords: 0.1.1 - which: 1.3.1 - optional: true - node-releases@2.0.59: {} node-simctl@6.6.0: @@ -16281,6 +15948,7 @@ snapshots: normalize-path@2.1.1: dependencies: remove-trailing-separator: 1.1.0 + optional: true normalize-path@3.0.0: {} @@ -16312,7 +15980,8 @@ snapshots: dependencies: boolbase: 1.0.0 - nwsapi@2.2.28: {} + nwsapi@2.2.28: + optional: true oauth-sign@0.9.0: {} @@ -16394,6 +16063,15 @@ snapshots: type-check: 0.3.2 word-wrap: 1.2.5 + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + ora@5.4.1: dependencies: bl: 4.1.0 @@ -16460,21 +16138,22 @@ snapshots: '@oxc-parser/binding-win32-ia32-msvc': 0.155.0 '@oxc-parser/binding-win32-x64-msvc': 0.155.0 - oxc-walker@1.1.1(@oxc-project/types@0.154.0)(oxc-parser@0.154.0): + oxc-walker@1.1.1(@oxc-project/types@0.154.0)(oxc-parser@0.154.0)(rolldown@1.3.4): optionalDependencies: '@oxc-project/types': 0.154.0 oxc-parser: 0.154.0 - - p-each-series@2.2.0: {} + rolldown: 1.3.4 p-finally@1.0.0: {} - p-finally@2.0.1: {} - p-limit@2.3.0: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-locate@3.0.0: dependencies: p-limit: 2.3.0 @@ -16483,6 +16162,10 @@ snapshots: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-retry@4.6.2: dependencies: '@types/retry': 0.12.0 @@ -16545,7 +16228,8 @@ snapshots: dependencies: '@types/node': 26.6.5 - parse5@5.1.0: {} + parse5@5.1.0: + optional: true parse5@5.1.1: {} @@ -16660,7 +16344,8 @@ snapshots: exsolve: 1.1.3 pathe: 2.0.3 - pn@1.1.0: {} + pn@1.1.0: + optional: true pngjs@3.4.0: {} @@ -16837,22 +16522,22 @@ snapshots: postcss: 8.5.30 yaml: 2.9.1 - postcss-loader@6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + postcss-loader@6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: cosmiconfig: 7.1.0 klona: 2.0.6 postcss: 8.5.30 semver: 7.8.5 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) - postcss-loader@8.2.1(postcss@8.5.30)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + postcss-loader@8.2.1(postcss@8.5.30)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: cosmiconfig: 9.0.2(typescript@5.9.3) jiti: 2.7.0 postcss: 8.5.30 semver: 7.8.5 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) transitivePeerDependencies: - typescript @@ -17205,8 +16890,16 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + postcss@8.5.34: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.3.0 + prelude-ls@1.1.2: {} + prelude-ls@1.2.1: {} + prettier@2.8.8: optional: true @@ -17217,13 +16910,6 @@ snapshots: lodash: 4.18.1 renderkid: 3.0.0 - pretty-format@25.5.0: - dependencies: - '@jest/types': 25.5.0 - ansi-regex: 5.0.1 - ansi-styles: 4.3.0 - react-is: 16.13.1 - pretty-ms@9.3.1: dependencies: parse-ms: 4.0.0 @@ -17232,12 +16918,12 @@ snapshots: process@0.11.10: {} - progress-webpack-plugin@1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + progress-webpack-plugin@1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: chalk: 2.4.2 figures: 2.0.0 log-update: 2.3.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) progress@2.0.3: {} @@ -17245,11 +16931,6 @@ snapshots: optionalDependencies: bluebird: 3.7.2 - prompts@2.4.2: - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - proxy-addr@2.0.8: dependencies: forwarded: 0.2.0 @@ -17364,8 +17045,6 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-is@16.13.1: {} - read-cache@1.0.2: {} read-pkg-up@7.0.1: @@ -17412,8 +17091,6 @@ snapshots: readdirp@5.1.1: {} - realpath-native@2.0.0: {} - recast@0.24.0: dependencies: ast-types: 0.16.3 @@ -17467,7 +17144,8 @@ snapshots: relateurl@0.2.7: {} - remove-trailing-separator@1.1.0: {} + remove-trailing-separator@1.1.0: + optional: true renderkid@3.0.0: dependencies: @@ -17485,6 +17163,7 @@ snapshots: dependencies: lodash: 4.18.1 request: 2.88.2 + optional: true request-promise-native@1.0.9(request@2.88.2): dependencies: @@ -17492,6 +17171,7 @@ snapshots: request-promise-core: 1.1.4(request@2.88.2) stealthy-require: 1.1.1 tough-cookie: 2.5.0 + optional: true request@2.88.2: dependencies: @@ -17520,18 +17200,10 @@ snapshots: require-from-string@2.0.2: {} - require-main-filename@2.0.0: {} - requires-port@1.0.0: {} - resolve-cwd@3.0.0: - dependencies: - resolve-from: 5.0.0 - resolve-from@4.0.0: {} - resolve-from@5.0.0: {} - resolve-path@1.4.0: dependencies: http-errors: 1.6.3 @@ -17539,8 +17211,6 @@ snapshots: resolve-url@0.2.1: {} - resolve@1.1.7: {} - resolve@1.22.13: dependencies: es-errors: 1.3.0 @@ -17577,6 +17247,28 @@ snapshots: hash-base: 3.1.2 inherits: 2.0.4 + rolldown@1.3.4: + dependencies: + '@oxc-project/types': 0.160.0 + '@rolldown/pluginutils': 1.1.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.3.4 + '@rolldown/binding-android-arm64': 1.3.4 + '@rolldown/binding-darwin-arm64': 1.3.4 + '@rolldown/binding-darwin-x64': 1.3.4 + '@rolldown/binding-freebsd-x64': 1.3.4 + '@rolldown/binding-linux-arm-gnueabihf': 1.3.4 + '@rolldown/binding-linux-arm64-gnu': 1.3.4 + '@rolldown/binding-linux-arm64-musl': 1.3.4 + '@rolldown/binding-linux-ppc64-gnu': 1.3.4 + '@rolldown/binding-linux-s390x-gnu': 1.3.4 + '@rolldown/binding-linux-x64-gnu': 1.3.4 + '@rolldown/binding-linux-x64-musl': 1.3.4 + '@rolldown/binding-openharmony-arm64': 1.3.4 + '@rolldown/binding-wasm32-wasi': 1.3.4 + '@rolldown/binding-win32-arm64-msvc': 1.3.4 + '@rolldown/binding-win32-x64-msvc': 1.3.4 + rou3@1.0.0: {} router@2.2.0(supports-color@8.1.1): @@ -17589,8 +17281,6 @@ snapshots: transitivePeerDependencies: - supports-color - rsvp@4.8.5: {} - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -17619,26 +17309,12 @@ snapshots: safer-buffer@2.1.2: {} - sane@4.1.0(supports-color@8.1.1): - dependencies: - '@cnakazawa/watch': 1.0.4 - anymatch: 2.0.0(supports-color@8.1.1) - capture-exit: 2.0.0 - exec-sh: 0.3.6 - execa: 1.0.0 - fb-watchman: 2.0.4 - micromatch: 3.1.10(supports-color@8.1.1) - minimist: 1.2.8 - walker: 1.0.8 - transitivePeerDependencies: - - supports-color - - sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + sass-loader@14.2.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: neo-async: 2.6.2 optionalDependencies: sass: 1.105.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) sass@1.105.2: dependencies: @@ -17653,6 +17329,7 @@ snapshots: saxes@3.1.11: dependencies: xmlchars: 2.2.0 + optional: true schema-utils@1.0.0: dependencies: @@ -17864,9 +17541,6 @@ snapshots: interpret: 1.4.0 rechoir: 0.6.2 - shellwords@0.1.1: - optional: true - side-channel-list@1.0.1: dependencies: es-errors: 1.3.0 @@ -17905,8 +17579,6 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 - sisteransi@1.0.5: {} - slash@3.0.0: {} snapdragon-node@2.1.1: @@ -17991,6 +17663,8 @@ snapshots: source-map-js@1.2.2: {} + source-map-js@1.3.0: {} + source-map-resolve@0.5.3: dependencies: atob: 2.1.2 @@ -18055,8 +17729,6 @@ snapshots: dependencies: through: 2.3.8 - sprintf-js@1.0.3: {} - srvx@1.0.8: {} sshpk@1.18.0: @@ -18081,10 +17753,6 @@ snapshots: stable@0.1.8: {} - stack-utils@1.0.5: - dependencies: - escape-string-regexp: 2.0.0 - stackframe@1.3.4: {} static-extend@0.1.2: @@ -18096,7 +17764,10 @@ snapshots: statuses@2.0.2: {} - stealthy-require@1.1.1: {} + std-env@4.3.0: {} + + stealthy-require@1.1.1: + optional: true stream-browserify@2.0.2: dependencies: @@ -18127,11 +17798,6 @@ snapshots: readable-stream: 2.3.8 x-domhandler: 2.4.2 - string-length@3.1.0: - dependencies: - astral-regex: 1.0.0 - strip-ansi: 5.2.0 - string-width@2.1.1: dependencies: is-fullwidth-code-point: 2.0.0 @@ -18155,16 +17821,10 @@ snapshots: dependencies: ansi-regex: 3.0.1 - strip-ansi@5.2.0: - dependencies: - ansi-regex: 4.1.1 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 - strip-bom@4.0.0: {} - strip-eof@1.0.0: {} strip-final-newline@2.0.0: {} @@ -18173,6 +17833,8 @@ snapshots: strip-json-comments@2.0.1: {} + strip-json-comments@3.1.1: {} + stylehacks@5.1.1(postcss@8.5.30): dependencies: browserslist: 4.29.3 @@ -18191,14 +17853,9 @@ snapshots: dependencies: has-flag: 4.0.0 - supports-hyperlinks@2.3.0: - dependencies: - has-flag: 4.0.0 - supports-color: 7.2.0 - supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.57.3: + svelte@5.57.3(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.6.0 @@ -18210,7 +17867,7 @@ snapshots: clsx: 2.1.1 devalue: 5.9.4 esm-env: 1.2.2 - esrap: 2.4.0 + esrap: 2.4.0(@typescript-eslint/types@8.48.1) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -18230,7 +17887,8 @@ snapshots: sax: 1.6.1 stable: 0.1.8 - symbol-tree@3.2.4: {} + symbol-tree@3.2.4: + optional: true tailwindcss-config@2.0.6: dependencies: @@ -18268,11 +17926,6 @@ snapshots: source-map-support: 0.5.21 which: 2.0.2 - terminal-link@2.1.1: - dependencies: - ansi-escapes: 4.3.2 - supports-hyperlinks: 2.3.0 - terser-webpack-plugin@1.4.6(webpack@4.47.0(supports-color@8.1.1)): dependencies: cacache: 12.0.4 @@ -18286,18 +17939,19 @@ snapshots: webpack-sources: 1.4.3 worker-farm: 1.7.0 - terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.5.0 terser: 5.51.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: clean-css: 5.3.3 cssnano: 5.1.15(postcss@8.5.30) csso: 4.2.0 html-minifier-terser: 6.1.0 + lightningcss: 1.33.0 postcss: 8.5.30 terser@4.8.1: @@ -18314,12 +17968,6 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - test-exclude@6.0.0: - dependencies: - '@istanbuljs/schema': 0.1.6 - glob: 7.2.3 - minimatch: 3.1.5 - thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -18328,16 +17976,14 @@ snapshots: dependencies: any-promise: 1.3.0 - thread-loader@3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + thread-loader@3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: json-parse-better-errors: 1.0.2 loader-runner: 4.3.2 loader-utils: 2.0.4 neo-async: 2.6.2 schema-utils: 3.3.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) - - throat@5.0.0: {} + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) through2@2.0.5: dependencies: @@ -18356,6 +18002,8 @@ snapshots: tiny-invariant@1.3.3: {} + tinybench@6.2.5: {} + tinycolor2@1.6.0: {} tinyexec@1.3.1: {} @@ -18365,8 +18013,6 @@ snapshots: fdir: 6.5.0(picomatch@4.0.7) picomatch: 4.0.7 - tmpl@1.0.5: {} - to-array@0.1.4: {} to-arraybuffer@1.0.1: {} @@ -18411,20 +18057,26 @@ snapshots: ip-regex: 2.1.0 psl: 1.15.0 punycode: 2.3.1 + optional: true tr46@0.0.3: {} tr46@1.0.1: dependencies: punycode: 2.3.1 + optional: true - ts-loader@9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + + ts-loader@9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: chalk: 4.1.2 picomatch: 4.0.7 source-map: 0.7.6 typescript: 5.9.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: loader-utils: 2.0.4 @@ -18444,9 +18096,9 @@ snapshots: dependencies: prelude-ls: 1.1.2 - type-detect@4.0.8: {} - - type-fest@0.21.3: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 type-fest@0.6.0: {} @@ -18469,12 +18121,19 @@ snapshots: es-errors: 1.3.0 is-typed-array: 1.1.15 - typedarray-to-buffer@3.1.5: - dependencies: - is-typedarray: 1.0.0 - typedarray@0.0.6: {} + typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + typescript@5.9.3: {} ufo@1.6.4: {} @@ -18549,12 +18208,12 @@ snapshots: urix@0.1.0: {} - url-loader@2.3.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + url-loader@2.3.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: loader-utils: 1.4.2 mime: 2.6.0 schema-utils: 2.7.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) url@0.11.4: dependencies: @@ -18585,12 +18244,6 @@ snapshots: uuid@8.3.2: {} - v8-to-istanbul@4.1.4: - dependencies: - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 1.9.0 - source-map: 0.7.6 - valibot@1.5.0(typescript@5.9.3): optionalDependencies: typescript: 5.9.3 @@ -18608,21 +18261,71 @@ snapshots: core-util-is: 1.0.2 extsprintf: 1.3.0 + vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.34 + rolldown: 1.3.4 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 26.6.5 + fsevents: 2.3.3 + jiti: 2.7.0 + napi-windows-process-start-time: 0.1.0 + sass: 1.105.2 + terser: 5.51.2 + yaml: 2.9.1 + + vitest@5.0.5(@types/node@26.6.5)(jsdom@15.2.1)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.3 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 26.6.5 + jsdom: 15.2.1 + transitivePeerDependencies: + - msw + vm-browserify@1.1.2: {} vscode-uri@3.2.0: {} + vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + vue-hot-reload-api@2.3.4: {} - vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@vue/component-compiler-utils': 3.3.0(lodash@4.18.1)(mustache@3.2.1) - css-loader: 2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + css-loader: 2.1.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) hash-sum: 1.0.2 loader-utils: 1.4.2 vue-hot-reload-api: 2.3.4 vue-style-loader: 4.1.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: '@vue/compiler-sfc': 3.5.44 prettier: 3.9.10 @@ -18682,15 +18385,15 @@ snapshots: - walrus - whiskers - vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)))(lodash@4.18.1)(mustache@3.2.1)(prettier@3.9.10)(vue-template-compiler@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@vue/component-compiler-utils': 3.3.0(lodash@4.18.1)(mustache@3.2.1) - css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) hash-sum: 1.0.2 loader-utils: 1.4.2 vue-hot-reload-api: 2.3.4 vue-style-loader: 4.1.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: '@vue/compiler-sfc': 3.5.44 prettier: 3.9.10 @@ -18750,12 +18453,12 @@ snapshots: - walrus - whiskers - vue-loader@17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + vue-loader@17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.6.14)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.6.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) optionalDependencies: '@vue/compiler-sfc': 3.5.44 vue: 2.6.14 @@ -18787,16 +18490,14 @@ snapshots: w3c-hr-time@1.0.2: dependencies: browser-process-hrtime: 1.0.0 + optional: true w3c-xmlserializer@1.1.2: dependencies: domexception: 1.0.1 webidl-conversions: 4.0.2 xml-name-validator: 3.0.0 - - walker@1.0.8: - dependencies: - makeerror: 1.0.12 + optional: true watchpack-chokidar2@2.0.1(supports-color@8.1.1): dependencies: @@ -18852,7 +18553,7 @@ snapshots: '@weapp-tailwindcss/shared': 2.0.4 micromatch: 4.0.8 - weapp-tailwindcss@5.6.3(@oxc-project/types@0.154.0)(jiti@2.7.0)(supports-color@8.1.1)(tailwindcss@4.3.3): + weapp-tailwindcss@5.6.3(@oxc-project/types@0.154.0)(jiti@2.7.0)(lightningcss@1.33.0)(rolldown@1.3.4)(supports-color@8.1.1)(tailwindcss@4.3.3)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)): dependencies: '@babel/parser': 8.0.7 '@babel/traverse': 8.0.7 @@ -18862,7 +18563,7 @@ snapshots: '@weapp-tailwindcss/env': 0.2.0 '@weapp-tailwindcss/escape': 0.0.2 '@weapp-tailwindcss/logger': 2.0.4 - '@weapp-tailwindcss/postcss': 3.4.3(jiti@2.7.0)(tailwindcss@4.3.3)(yaml@2.9.1) + '@weapp-tailwindcss/postcss': 3.4.3(jiti@2.7.0)(lightningcss@1.33.0)(tailwindcss@4.3.3)(yaml@2.9.1) '@weapp-tailwindcss/reset': 0.1.5(tailwindcss@4.3.3) '@weapp-tailwindcss/shared': 2.0.4 '@weapp-tailwindcss/source-scan': 0.1.2 @@ -18875,7 +18576,7 @@ snapshots: magic-string: 1.4.3 micromatch: 4.0.8 oxc-parser: 0.154.0 - oxc-walker: 1.1.1(@oxc-project/types@0.154.0)(oxc-parser@0.154.0) + oxc-walker: 1.1.1(@oxc-project/types@0.154.0)(oxc-parser@0.154.0)(rolldown@1.3.4) semver: 7.8.5 tailwindcss-config: 2.0.6 weapp-style-injector: 1.0.7 @@ -18890,6 +18591,7 @@ snapshots: '@weapp-tailwindcss/native-win32-arm64-msvc': 5.6.3 '@weapp-tailwindcss/native-win32-x64-msvc': 5.6.3 tailwindcss: 4.3.3 + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) transitivePeerDependencies: - '@oxc-project/types' - jiti @@ -18900,7 +18602,8 @@ snapshots: webidl-conversions@3.0.1: {} - webidl-conversions@4.0.2: {} + webidl-conversions@4.0.2: + optional: true webpack-bundle-analyzer@4.10.2: dependencies: @@ -18925,16 +18628,16 @@ snapshots: deepmerge: 1.5.2 javascript-stringify: 2.1.0 - webpack-dev-middleware@5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + webpack-dev-middleware@5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: colorette: 2.0.20 memfs: 3.5.3 mime-types: 2.1.35 range-parser: 1.3.0 schema-utils: 4.5.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) - webpack-dev-server@4.15.2(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): + webpack-dev-server@4.15.2(debug@4.4.3(supports-color@8.1.1))(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -18964,10 +18667,10 @@ snapshots: serve-index: 1.9.2(supports-color@8.1.1) sockjs: 0.3.24 spdy: 4.0.2(supports-color@8.1.1) - webpack-dev-middleware: 5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + webpack-dev-middleware: 5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) ws: 8.22.0 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4) transitivePeerDependencies: - bufferutil - debug @@ -19021,7 +18724,7 @@ snapshots: transitivePeerDependencies: - supports-color - webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4): + webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -19035,7 +18738,7 @@ snapshots: events: 3.3.0 graceful-fs: 4.2.11 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) + minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(sharp@0.35.5(@types/node@26.6.5))(svgo@2.8.4)) schema-utils: 4.5.0 tapable: 2.3.3 watchpack: 2.6.1 @@ -19069,10 +18772,12 @@ snapshots: whatwg-encoding@1.0.5: dependencies: iconv-lite: 0.4.24 + optional: true whatwg-fetch@3.6.20: {} - whatwg-mimetype@2.3.0: {} + whatwg-mimetype@2.3.0: + optional: true whatwg-url@5.0.0: dependencies: @@ -19084,8 +18789,7 @@ snapshots: lodash.sortby: 4.7.0 tr46: 1.0.1 webidl-conversions: 4.0.2 - - which-module@2.0.1: {} + optional: true which-typed-array@1.1.24: dependencies: @@ -19105,6 +18809,8 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@3.2.1: {} + wide-align@1.1.5: dependencies: string-width: 4.2.3 @@ -19122,12 +18828,6 @@ snapshots: string-width: 2.1.1 strip-ansi: 4.0.0 - wrap-ansi@6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -19140,13 +18840,6 @@ snapshots: wrappy@1.0.2: {} - write-file-atomic@3.0.3: - dependencies: - imurmurhash: 0.1.4 - is-typedarray: 1.0.0 - signal-exit: 3.0.7 - typedarray-to-buffer: 3.1.5 - ws@7.5.13: {} ws@8.22.0: {} @@ -19162,7 +18855,10 @@ snapshots: parse-headers: 2.0.6 xtend: 4.0.2 - xml-name-validator@3.0.0: {} + xml-name-validator@3.0.0: + optional: true + + xml-name-validator@4.0.0: {} xml-parse-from-string@1.0.1: {} @@ -19173,7 +18869,8 @@ snapshots: xmlbuilder@11.0.1: {} - xmlchars@2.2.0: {} + xmlchars@2.2.0: + optional: true xmlhttprequest-ssl@1.6.3: {} @@ -19195,27 +18892,8 @@ snapshots: yaml@2.9.1: {} - yargs-parser@18.1.3: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - yargs-parser@20.2.9: {} - yargs@15.4.1: - dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - yargs@16.2.2: dependencies: cliui: 7.0.4 @@ -19235,6 +18913,8 @@ snapshots: ylru@1.4.0: {} + yocto-queue@0.1.0: {} + yoctocolors@2.2.0: {} zimmerframe@1.1.5: {} diff --git a/ruoyi-fastapi-frontend/vue2/mobile/src/permission.ts b/ruoyi-fastapi-frontend/vue2/mobile/src/permission.ts index 67d5c16c0..3f53a3076 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/src/permission.ts +++ b/ruoyi-fastapi-frontend/vue2/mobile/src/permission.ts @@ -38,7 +38,7 @@ list.forEach((item) => { } }, fail(err: unknown) { - console.log(err) + console.error(err) }, }) }) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/src/plugins/modal.ts b/ruoyi-fastapi-frontend/vue2/mobile/src/plugins/modal.ts index ed3ee3e7d..7e613017b 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/src/plugins/modal.ts +++ b/ruoyi-fastapi-frontend/vue2/mobile/src/plugins/modal.ts @@ -73,7 +73,7 @@ export default { try { uni.hideLoading() } catch (e) { - console.log(e) + console.warn(e) } }, } diff --git a/ruoyi-fastapi-frontend/vue2/mobile/src/utils/transportForge.ts b/ruoyi-fastapi-frontend/vue2/mobile/src/utils/transportForge.ts index 2783d6ba8..b19809f37 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/src/utils/transportForge.ts +++ b/ruoyi-fastapi-frontend/vue2/mobile/src/utils/transportForge.ts @@ -104,8 +104,8 @@ function getAppPlusIosRandomBytes(length: number) { } } return randomBytes - } catch (error) { - return null + } catch { + // 原生接口失败时与其他平台共用下方的空值回退。 } // #endif return null @@ -146,8 +146,8 @@ function getAppPlusAndroidRandomBytes(length: number) { plus.android.autoCollection(secureRandom) } return randomBytes - } catch (error) { - return null + } catch { + // 原生接口失败时与其他平台共用下方的空值回退。 } // #endif return null diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.ts similarity index 56% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.ts index 46c0b8e8b..5e0e71c21 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/behavior.test.ts @@ -1,18 +1,17 @@ -import assert from 'node:assert/strict' -import test from 'node:test' -import { testMobileBehavior } from '../../../../ruoyi-fastapi-test/frontend/mobile-behavior.mjs' -import { runUserInfoSessionTests } from '../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs' -import { createMobileHarness } from '../../../../ruoyi-fastapi-test/frontend/mobile-harness.mjs' +import { expect, test } from 'vitest' +import { testMobileBehavior } from '../../../../ruoyi-fastapi-test/frontend/mobile-behavior.mts' +import { runUserInfoSessionTests } from '../../../../ruoyi-fastapi-test/frontend/logout-behavior.mts' +import { createMobileHarness } from '../../../../ruoyi-fastapi-test/frontend/mobile-harness.mts' const root = new URL('../', import.meta.url) -testMobileBehavior(root, 'vue2') -runUserInfoSessionTests(root, 'vue2-mobile') +testMobileBehavior(root, 'vue2', test) +runUserInfoSessionTests(root, 'vue2-mobile', test) test('upload translates a platform failure with only a message field', async () => { const app = await createMobileHarness(root, 'vue2') app.uploadResponses.push({ failure: { message: 'Network Error' } }) - await assert.rejects(app.upload({ url: '/upload', filePath: '/tmp/example' }), { + await expect(app.upload({ url: '/upload', filePath: '/tmp/example' })).rejects.toMatchObject({ message: '后端接口连接异常', }) - assert.equal(app.calls.toasts.at(-1).title, '后端接口连接异常') + expect(app.calls.toasts.at(-1)?.title).toBe('后端接口连接异常') }) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.cjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.ts similarity index 74% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.cjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.ts index fecb488eb..823ad387b 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/h5-template.test.ts @@ -1,6 +1,7 @@ -const assert = require('node:assert/strict') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) const path = require('node:path') -const test = require('node:test') const Config = require('webpack-chain') const Vue = require('vue') const compiler = require('vue-template-compiler') @@ -22,9 +23,9 @@ test('H5 development templates compile and render with the project Prettier vers isProduction: false, }) - assert.deepEqual(compiled.errors, []) - assert.equal(typeof compiled.code, 'string', '模板编译必须同步生成 JavaScript,不能返回 Promise') + expect(compiled.errors).toStrictEqual([]) + expect(typeof compiled.code, '模板编译必须同步生成 JavaScript,不能返回 Promise').toBe('string') const render = new Function(`${compiled.code}\nreturn render`)() const vnode = render.call(new Vue({ data: { message: 'H5 ready' } })) - assert.equal(vnode.children[0].children[0].text, 'H5 ready') + expect(vnode.children[0].children[0].text).toBe('H5 ready') }) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.mjs deleted file mode 100644 index 873eedeec..000000000 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.mjs +++ /dev/null @@ -1,40 +0,0 @@ -import assert from 'node:assert/strict' -import { EventEmitter } from 'node:events' -import { registerHooks } from 'node:module' -import { test } from 'node:test' -import Vue from 'vue' - -export const i18n = { locale: 'zh-CN', preference: 'zh-CN', engine: new EventEmitter() } - -test('the adapter tracks language changes without claiming the uni-app instance locale', async () => { - const adapter = new URL('../../src/i18n/adapter.ts', import.meta.url).href - // 仅替换依赖 webpack 词库的入口,实际加载适配器和 Vue。 - const hook = registerHooks({ - resolve(specifier, context, nextResolve) { - if (specifier === adapter) - return { url: adapter, format: 'module-typescript', shortCircuit: true } - return specifier === './index' && context.parentURL === adapter - ? { url: import.meta.url, shortCircuit: true } - : nextResolve(specifier, context) - }, - }) - try { - const { default: plugin, localeState } = await import(adapter) - const App = Vue.extend({ - computed: { language: () => [localeState.locale, localeState.preference] }, - }) - App.use(plugin) - const vm = new App() - assert.equal('$locale' in vm, false) - Object.defineProperty(vm, '$locale', { value: 'zh-Hans', writable: true }) - assert.deepEqual(vm.language, ['zh-CN', 'zh-CN']) - - vm.$locale = 'en' - i18n.engine.emit('languageChanged', 'en-US') - i18n.engine.emit('preferenceChanged', 'auto') - assert.deepEqual(vm.language, ['en-US', 'auto']) - assert.equal(vm.$locale, 'en') - } finally { - hook.deregister() - } -}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.ts b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.ts new file mode 100644 index 000000000..07e7e1571 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/adapter.test.ts @@ -0,0 +1,26 @@ +import { EventEmitter } from 'node:events' +import { expect, test, vi } from 'vitest' +import Vue from 'vue' + +vi.mock('../../src/i18n/index', () => ({ + i18n: { locale: 'zh-CN', preference: 'zh-CN', engine: new EventEmitter() }, +})) + +test('the adapter tracks language changes without claiming the uni-app instance locale', async () => { + const { i18n } = await import('../../src/i18n/index') + const { default: plugin, localeState } = await import('../../src/i18n/adapter') + const App = Vue.extend({ + computed: { language: () => [localeState.locale, localeState.preference] }, + }) + App.use(plugin) + const vm = new App() as InstanceType & { $locale?: string } + expect('$locale' in vm).toBe(false) + Object.defineProperty(vm, '$locale', { value: 'zh-Hans', writable: true }) + expect(vm.language).toStrictEqual(['zh-CN', 'zh-CN']) + + vm.$locale = 'en' + i18n.engine.emit('languageChanged', 'en-US') + i18n.engine.emit('preferenceChanged', 'auto') + expect(vm.language).toStrictEqual(['en-US', 'auto']) + expect(vm.$locale).toBe('en') +}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.mjs deleted file mode 100644 index bc366b0a3..000000000 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { stripTypeScriptTypes } from 'node:module' -import { test } from 'node:test' -import { createInstance } from 'i18next' -import { localeRequestHeaders } from '../../src/utils/transportLocale.ts' - -function loadSource(name, bindings, names) { - const source = stripTypeScriptTypes( - readFileSync(new URL(`../../src/utils/${name}.ts`, import.meta.url), 'utf8') - ) - .replace(/^import[\s\S]*?from ['"][^'"]+['"]\r?\n/gm, '') - .replace(/\bexport (?=(?:async )?function)/g, '') - return new Function(...Object.keys(bindings), source + `\nreturn {${names.join(',')}}`)( - ...Object.values(bindings) - ) -} - -test('policy, public key and key retry keep the original language without forwarding credentials', async () => { - const values = new Map() - const calls = [] - let policyReply - const platform = { - getStorageSync: (key) => values.get(key), - setStorageSync: (key, value) => values.set(key, value), - removeStorageSync: (key) => values.delete(key), - request(options) { - calls.push(options) - if (options.url.endsWith('/frontend-config')) - policyReply = () => - options.success({ - data: { - code: 200, - data: { - transportCryptoActive: true, - configExpireAt: Math.floor(Date.now() / 1000) + 600, - }, - }, - }) - else queueMicrotask(() => options.success({ data: { code: 500 } })) - }, - } - const engine = createInstance() - await engine.init({ - lng: 'en-US', - resources: { - 'en-US': { - utility: JSON.parse( - readFileSync(new URL('../../src/i18n/locales/en-US/utility.json', import.meta.url)) - ), - }, - }, - }) - const bindings = { - localeRequestHeaders, - uni: platform, - Taro: platform, - config: { baseUrl: 'https://api.example.test' }, - getStorage: platform.getStorageSync, - setStorage: platform.setStorageSync, - removeStorage: platform.removeStorageSync, - translateMessage: (key, fallback, options) => - engine.t(key, { defaultValue: fallback, ...options }), - forge: {}, - primeForgeRandomBytes() {}, - } - const policy = loadSource('transportCryptoPolicy', bindings, [ - 'ensureTransportCryptoPolicyLoaded', - 'getTransportCryptoPolicy', - 'getTransportRequestPath', - 'shouldEncryptQuery', - 'shouldEncryptRequest', - 'shouldEncryptResponse', - ]) - const crypto = loadSource('transportCrypto', { ...bindings, ...policy }, [ - 'encryptTransportRequest', - 'resetTransportRequestConfig', - 'invalidateTransportKeyMeta', - 'shouldRetryTransportWithFreshKey', - ]) - const original = { - 'Accept-Language': 'en-US', - Authorization: 'Bearer secret', - } - const config = { - url: '/login', - method: 'post', - data: { username: 'example' }, - header: { ...original }, - } - const pending = crypto.encryptTransportRequest(config) - // A concurrent UI switch must not change the headers of this request's remaining bootstrap work. - original['Accept-Language'] = 'zh-CN' - policyReply() - await assert.rejects(pending, /Could not retrieve the transport public key/) - for (const msgKey of ['transport.decryptFailed', 'transport.keyExpired']) { - assert.equal(crypto.shouldRetryTransportWithFreshKey({ data: { msgKey } }), true) - assert.equal(crypto.shouldRetryTransportWithFreshKey({ response: { data: { msgKey } } }), true) - } - assert.equal( - crypto.shouldRetryTransportWithFreshKey({ data: { msg: 'Decryption failed' } }), - false - ) - crypto.invalidateTransportKeyMeta() - crypto.resetTransportRequestConfig(config) - await assert.rejects( - crypto.encryptTransportRequest(config), - /Could not retrieve the transport public key/ - ) - assert.equal(calls.length, 3) - assert.ok(calls[0].url.endsWith('/frontend-config')) - assert.ok(calls.slice(1).every((call) => call.url.endsWith('/public-key'))) - for (const call of calls) assert.deepEqual(call.header, { 'Accept-Language': 'en-US' }) - assert.equal(config.header.Authorization, 'Bearer secret') - assert.deepEqual(localeRequestHeaders({ 'accept-language': 'zh-CN', Cookie: 'secret' }), { - 'Accept-Language': 'zh-CN', - }) -}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.ts b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.ts new file mode 100644 index 000000000..e9f2ca9c0 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/bootstrap.test.ts @@ -0,0 +1,130 @@ +import { readFileSync } from 'node:fs' +import { stripTypeScriptTypes } from 'node:module' +import { expect, test } from 'vitest' +import { createInstance } from 'i18next' +import { localeRequestHeaders } from '../../src/utils/transportLocale.ts' + +type TransportModules = { + transportCrypto: typeof import('../../src/utils/transportCrypto') + transportCryptoPolicy: typeof import('../../src/utils/transportCryptoPolicy') +} +function loadSource( + name: M, + bindings: Record, + names: K[] +): Pick { + const source = stripTypeScriptTypes( + readFileSync(new URL(`../../src/utils/${name}.ts`, import.meta.url), 'utf8') + ) + .replace(/^import[\s\S]*?from ['"][^'"]+['"]\r?\n/gm, '') + .replace(/\bexport (?=(?:async )?function)/g, '') + return new Function(...Object.keys(bindings), source + `\nreturn {${names.join(',')}}`)( + ...Object.values(bindings) + ) +} + +test('policy, public key and key retry keep the original language without forwarding credentials', async () => { + const values = new Map() + interface BootstrapRequest { + url: string + header: Record + success(reply: { data: { code: number; data?: Record } }): void + } + const calls: BootstrapRequest[] = [] + const platform = { + getStorageSync: (key: string) => values.get(key), + setStorageSync: (key: string, value: unknown) => values.set(key, value), + removeStorageSync: (key: string) => values.delete(key), + request(options: BootstrapRequest) { + calls.push(options) + if (!options.url.endsWith('/frontend-config')) + queueMicrotask(() => options.success({ data: { code: 500 } })) + }, + } + const engine = createInstance() + await engine.init({ + lng: 'en-US', + resources: { + 'en-US': { + utility: JSON.parse( + readFileSync( + new URL('../../src/i18n/locales/en-US/utility.json', import.meta.url), + 'utf8' + ) + ), + }, + }, + }) + const bindings = { + localeRequestHeaders, + uni: platform, + Taro: platform, + config: { baseUrl: 'https://api.example.test' }, + getStorage: platform.getStorageSync, + setStorage: platform.setStorageSync, + removeStorage: platform.removeStorageSync, + translateMessage: (key: string, fallback: string, options: Record) => + engine.t(key, { defaultValue: fallback, ...options }), + forge: {}, + primeForgeRandomBytes() {}, + } + const policy = loadSource('transportCryptoPolicy', bindings, [ + 'ensureTransportCryptoPolicyLoaded', + 'getTransportCryptoPolicy', + 'getTransportRequestPath', + 'shouldEncryptQuery', + 'shouldEncryptRequest', + 'shouldEncryptResponse', + ]) + const crypto = loadSource('transportCrypto', { ...bindings, ...policy }, [ + 'encryptTransportRequest', + 'resetTransportRequestConfig', + 'invalidateTransportKeyMeta', + 'shouldRetryTransportWithFreshKey', + ]) + const original = { + 'Accept-Language': 'en-US', + Authorization: 'Bearer secret', + } + const config = { + url: '/login', + method: 'post' as const, + data: { username: 'example' }, + header: { ...original }, + } + const pending = crypto.encryptTransportRequest(config) + // A concurrent UI switch must not change the headers of this request's remaining bootstrap work. + original['Accept-Language'] = 'zh-CN' + const policyRequest = calls.find(({ url }) => url.endsWith('/frontend-config')) + if (!policyRequest) throw new Error('Expected the frontend policy request') + policyRequest.success({ + data: { + code: 200, + data: { + transportCryptoActive: true, + configExpireAt: Math.floor(Date.now() / 1000) + 600, + }, + }, + }) + await expect(pending).rejects.toThrow(/Could not retrieve the transport public key/) + for (const msgKey of ['transport.decryptFailed', 'transport.keyExpired']) { + expect(crypto.shouldRetryTransportWithFreshKey({ data: { msgKey } })).toBe(true) + expect(crypto.shouldRetryTransportWithFreshKey({ response: { data: { msgKey } } })).toBe(true) + } + expect(crypto.shouldRetryTransportWithFreshKey({ data: { msg: 'Decryption failed' } })).toBe( + false + ) + crypto.invalidateTransportKeyMeta() + crypto.resetTransportRequestConfig(config) + await expect(crypto.encryptTransportRequest(config)).rejects.toThrow( + /Could not retrieve the transport public key/ + ) + expect(calls.length).toBe(3) + expect(calls[0].url.endsWith('/frontend-config')).toBeTruthy() + expect(calls.slice(1).every((call) => call.url.endsWith('/public-key'))).toBeTruthy() + for (const call of calls) expect(call.header).toStrictEqual({ 'Accept-Language': 'en-US' }) + expect(config.header.Authorization).toBe('Bearer secret') + expect(localeRequestHeaders({ 'accept-language': 'zh-CN', Cookie: 'secret' })).toStrictEqual({ + 'Accept-Language': 'zh-CN', + }) +}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.ts similarity index 66% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.ts index d0744c064..13be17cc9 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/navigation.test.ts @@ -1,7 +1,6 @@ -import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import { stripTypeScriptTypes } from 'node:module' -import { test } from 'node:test' +import { expect, test } from 'vitest' const source = stripTypeScriptTypes( readFileSync(new URL('../../src/i18n/navigation.ts', import.meta.url), 'utf8') @@ -11,13 +10,13 @@ test('native titles and tab labels follow the active page and language', () => { let locale = 'zh-CN' let route = 'pages/mine/setting/index' let options = {} - const calls = [] - const events = {} + const calls: Array<['title', string] | ['tab', number, string]> = [] + const events: Record void> = {} const uni = { - setNavigationBarTitle(value) { + setNavigationBarTitle(value: { title: string }) { calls.push(['title', value.title]) }, - setTabBarItem(value) { + setTabBarItem(value: { index: number; text: string }) { calls.push(['tab', value.index, value.text]) }, } @@ -31,10 +30,10 @@ test('native titles and tab labels follow the active page and language', () => { .replace('export function', 'function') .replace('export default', 'const plugin =') + '\nreturn { refreshNavigation, plugin }' )( - (key) => `${locale}:${key}`, + (key: string) => `${locale}:${key}`, { engine: { - on(event, handler) { + on(event: string, handler: () => void) { events[event] = handler }, }, @@ -42,33 +41,33 @@ test('native titles and tab labels follow the active page and language', () => { uni, () => [{ route, options }] ) - module.plugin.install({ nextTick: (fn) => fn(), mixin() {} }) + module.plugin.install({ nextTick: (fn: () => void) => fn(), mixin() {} }) module.refreshNavigation() - assert.equal(calls[0][1], 'zh-CN:mobile:settings.title') - assert.equal(calls.filter((item) => item[0] === 'tab').length, 3) + expect(calls[0][1]).toBe('zh-CN:mobile:settings.title') + expect(calls.filter((item) => item[0] === 'tab').length).toBe(3) calls.length = 0 locale = 'en-US' events.languageChanged() - assert.equal(calls[0][1], 'en-US:mobile:settings.title') - assert.equal(calls[1][2], 'en-US:mobile:nav.home') + expect(calls[0][1]).toBe('en-US:mobile:settings.title') + expect(calls[1][2]).toBe('en-US:mobile:nav.home') calls.length = 0 route = 'pages/common/textview/index' module.refreshNavigation() - assert.ok( + expect( calls.every((item) => item[0] === 'tab'), 'custom content titles are preserved' - ) + ).toBeTruthy() route = 'pages/common/webview/index' options = { title: 'External report' } calls.length = 0 module.refreshNavigation() - assert.ok( + expect( calls.every((item) => item[0] === 'tab'), 'external titles survive onShow' - ) + ).toBeTruthy() events.languageChanged() - assert.ok( + expect( calls.every((item) => item[0] === 'tab'), 'external titles survive language changes' - ) + ).toBeTruthy() }) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.mjs deleted file mode 100644 index 55e80954e..000000000 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readFileSync } from 'node:fs' -import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' - -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) -const resources = { - 'zh-CN': { common: { sample: '中文' } }, - 'en-US': { common: { sample: 'English' } }, -} -function setup(storage = { get: () => null, set: () => {} }, extra = {}) { - return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra }) -} -const key = 'contract:api:locale:v2:user:7' - -test('declared language families preserve exact variants', () => { - const registry = createLocaleRegistry(meta, resources) - assert.equal(registry.resolve('auto', ['en-GB']), 'en-US') - assert.equal(registry.resolve('auto', ['en-AU']), 'en-US') - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }], - } - const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) - assert.equal(precise.resolve('en-GB'), 'en-GB') - assert.equal(precise.resolve('zh-TW'), 'en-US') - assert.throws( - () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources), - /Invalid language fallback/ - ) -}) - -test('source language supplies missing text independently of the negotiation default', async () => { - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - assert.equal(runtime.registry.resolve('unknown'), 'en-US') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), '中文') - assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称') -}) - -test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { - const data = new Map() - const events = [] - const storage = { - get: (k) => data.get(k), - set: (k, v) => { - data.set(k, v) - events.push([k, v]) - }, - } - const a = setup(storage), - b = setup(storage) - a.setAccount(7, 'zh-CN', '0') - b.setAccount(7, 'zh-CN', '0') - let release - let server = { locale: 'zh-CN', revision: '0' } - const delayed = a.setPreference('en-US', { - save: async () => { - server = { locale: 'en-US', revision: '1' } - const response = { ...server } - await new Promise((resolve) => { - release = resolve - }) - return response - }, - }) - await Promise.resolve() - await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) - a.acceptStorageEvent(key, data.get(key)) - const writes = events.length - release() - await delayed - assert.deepEqual(server, { locale: 'auto', revision: '2' }) - assert.equal(a.preference, 'auto') - assert.equal(b.preference, 'auto') - assert.equal(events.length, writes) - assert.deepEqual(JSON.parse(data.get(key)), server) -}) - -test('out-of-order storage and profile reads preserve the latest decimal revision', () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '9007199254740993') - const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) - data.set(key, old) - runtime.acceptStorageEvent(key, old) - runtime.setAccount(7, 'zh-CN', '9007199254740992') - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '9007199254740993') - assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '9007199254740993') -}) - -test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'en-US', revision: '2' }), - }) - assert.equal(runtime.preferenceRevision, '2') - await assert.rejects( - runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }), - /Invalid locale snapshot/ - ) - assert.equal(runtime.preference, 'en-US') -}) - -test('offline account snapshots and API instances are isolated', async () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '1') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '1') - restored.setAccount(8, 'zh-CN', '0') - restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) - assert.equal(restored.preference, 'zh-CN') - restored.setAccount(null) - assert.equal(restored.preference, 'zh-CN') - assert.equal(restored.loginPreference, null) - const other = setup(storage, { scope: 'other:api' }) - other.initialize(true) - assert.equal(other.accountId, null) - assert.equal(other.preference, 'zh-CN') -}) - -test('refreshing the same account does not cancel a pending save', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '0') - let finish - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - finish = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(7, 'zh-CN', '0') - finish({ locale: 'en-US', revision: '1' }) - await pending - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '1') -}) - -test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'auto', revision: '3' }), - }), - /timeout/ - ) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.preferenceRevision, '3') -}) - -test('invalid profile snapshots leave the current account and its revision intact', () => { - const runtime = setup() - runtime.setAccount(7, 'en-US', '4') - assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/) - assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/) - assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/) - assert.equal(runtime.accountId, '7') - assert.equal(runtime.preferenceRevision, '4') - assert.equal(runtime.preference, 'en-US') -}) - -test('dynamic names keep the database source when an application uses English source catalogs', async () => { - const expanded = { - ...meta, - sourceLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - const translations = { 'en-US': 'Users' } - await runtime.setPreference('en-US') - assert.equal(runtime.resolveText('用户管理', translations), 'Users') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), 'English') - assert.equal(runtime.resolveText('用户管理', translations), '用户管理') -}) - -test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => { - const warn = ctx.mock.method(console, 'warn', () => {}) - const runtime = setup(undefined, { - appVersion: '2.0.0', - resources: { - ...resources, - 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, - }, - }) - const t = runtime.engine.getFixedT('en-US', 'layout') - const options = { name: 'Private name' } - assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name') - assert.equal(t('missing', options), 'Text unavailable') - assert.equal(warn.mock.callCount(), 1) - assert.deepEqual(warn.mock.calls[0].arguments, [ - 'Missing translation', - { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, - ]) -}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.ts b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.ts new file mode 100644 index 000000000..5d80cd1a7 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/protocol.test.ts @@ -0,0 +1,262 @@ +import { expect, test, vi } from 'vitest' +import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' + +import localeMetadata from '../../src/i18n/locale-meta.json' +const resources = { + 'zh-CN': { common: { sample: '中文' } }, + 'en-US': { common: { sample: 'English' } }, +} +type RuntimeOptions = Parameters[0] +function setup( + storage: RuntimeOptions['storage'] = { get: () => null, set: () => {} }, + extra: Partial = {} +) { + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'contract:api', + storage, + ...extra, + }) +} +const key = 'contract:api:locale:v2:user:7' + +test('declared language families preserve exact variants', () => { + const registry = createLocaleRegistry(localeMetadata, resources) + expect(registry.resolve('auto', ['en-GB'])).toBe('en-US') + expect(registry.resolve('auto', ['en-AU'])).toBe('en-US') + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'en-GB', + nativeName: 'British English', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: ['en-US'], + }, + ], + } + const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) + expect(precise.resolve('en-GB')).toBe('en-GB') + expect(precise.resolve('zh-TW')).toBe('en-US') + expect(() => + createLocaleRegistry({ ...localeMetadata, languageFallbacks: { en: 'missing' } }, resources) + ).toThrow(/Invalid language fallback/) +}) + +test('source language supplies missing text independently of the negotiation default', async () => { + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: [], + }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + expect(runtime.registry.resolve('unknown')).toBe('en-US') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('中文') + expect(runtime.resolveText('原始名称', { 'en-US': 'English name' })).toBe('原始名称') +}) + +test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { + const data = new Map() + const events: [string, string][] = [] + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => { + data.set(k, v) + events.push([k, v]) + }, + } + const a = setup(storage), + b = setup(storage) + a.setAccount(7, 'zh-CN', '0') + b.setAccount(7, 'zh-CN', '0') + const gate = Promise.withResolvers() + let server = { locale: 'zh-CN', revision: '0' } + const delayed = a.setPreference('en-US', { + save: async () => { + server = { locale: 'en-US', revision: '1' } + const response = { ...server } + await gate.promise + return response + }, + }) + await Promise.resolve() + await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) + a.acceptStorageEvent(key, data.get(key) ?? null) + const writes = events.length + gate.resolve() + await delayed + expect(server).toStrictEqual({ locale: 'auto', revision: '2' }) + expect(a.preference).toBe('auto') + expect(b.preference).toBe('auto') + expect(events.length).toBe(writes) + expect(JSON.parse(data.get(key) ?? 'null')).toStrictEqual(server) +}) + +test('out-of-order storage and profile reads preserve the latest decimal revision', () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '9007199254740993') + const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) + data.set(key, old) + runtime.acceptStorageEvent(key, old) + runtime.setAccount(7, 'zh-CN', '9007199254740992') + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('9007199254740993') + expect(JSON.parse(data.get(key) ?? 'null')?.revision).toBe('9007199254740993') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('9007199254740993') +}) + +test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'en-US', revision: '2' }), + }) + expect(runtime.preferenceRevision).toBe('2') + await expect( + runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }) + ).rejects.toThrow(/Invalid locale snapshot/) + expect(runtime.preference).toBe('en-US') +}) + +test('offline account snapshots and API instances are isolated', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '1') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('1') + restored.setAccount(8, 'zh-CN', '0') + restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) + expect(restored.preference).toBe('zh-CN') + restored.setAccount(null) + expect(restored.preference).toBe('zh-CN') + expect(restored.loginPreference).toBe(null) + const other = setup(storage, { scope: 'other:api' }) + other.initialize(true) + expect(other.accountId).toBe(null) + expect(other.preference).toBe('zh-CN') +}) + +test('refreshing the same account does not cancel a pending save', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '0') + const save = Promise.withResolvers<{ locale: string; revision: string }>() + const pending = runtime.setPreference('en-US', { + save: () => save.promise, + }) + await Promise.resolve() + runtime.setAccount(7, 'zh-CN', '0') + save.resolve({ locale: 'en-US', revision: '1' }) + await pending + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('1') +}) + +test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'auto', revision: '3' }), + }) + ).rejects.toThrow(/timeout/) + expect(runtime.preference).toBe('auto') + expect(runtime.preferenceRevision).toBe('3') +}) + +test('invalid profile snapshots leave the current account and its revision intact', () => { + const runtime = setup() + runtime.setAccount(7, 'en-US', '4') + expect(() => Reflect.apply(runtime.setAccount, runtime, [undefined, 'zh-CN', '4'])).toThrow( + /Missing locale account/ + ) + expect(() => Reflect.apply(runtime.setAccount, runtime, [8, 'zh-CN', 4])).toThrow( + /Invalid locale snapshot/ + ) + expect(() => runtime.setAccount(8, 'zh-CN')).toThrow(/Invalid locale snapshot/) + expect(runtime.accountId).toBe('7') + expect(runtime.preferenceRevision).toBe('4') + expect(runtime.preference).toBe('en-US') +}) + +test('dynamic names keep the database source when an application uses English source catalogs', async () => { + const expanded = { + ...localeMetadata, + sourceLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { code: 'ja-JP', nativeName: '日本語', direction: 'ltr', enabled: true, fallback: [] }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + const translations = { 'en-US': 'Users' } + await runtime.setPreference('en-US') + expect(runtime.resolveText('用户管理', translations)).toBe('Users') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('English') + expect(runtime.resolveText('用户管理', translations)).toBe('用户管理') +}) + +test('a missing key keeps explicit fallback text or uses a safe label and reports only once', ({ + onTestFinished, +}) => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) + onTestFinished(() => warn.mockRestore()) + const runtime = setup(undefined, { + appVersion: '2.0.0', + resources: { + ...resources, + 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, + }, + }) + const t = runtime.engine.getFixedT('en-US', 'layout') + const options = { name: 'Private name' } + expect(t('missing', { ...options, defaultValue: 'Hello {{name}}' })).toBe('Hello Private name') + expect(t('missing', options)).toBe('Text unavailable') + expect(warn.mock.calls.length).toBe(1) + expect(warn.mock.calls[0]).toStrictEqual([ + 'Missing translation', + { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.ts similarity index 52% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.ts index 3cf100322..f8cb922c1 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/runtime.test.ts @@ -1,46 +1,46 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { readFileSync } from 'node:fs' import { createLocaleRuntime, createLocaleRegistry, normalizeLocale, } from '../../src/i18n/runtime.ts' -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) +import localeMetadata from '../../src/i18n/locale-meta.json' const resources = Object.fromEntries( - meta.locales.map(({ code }) => [ + localeMetadata.locales.map(({ code }) => [ code, { common: JSON.parse( - readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url)) + readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url), 'utf8') ), }, ]) ) -function setup(extra = {}) { - const data = new Map() +type RuntimeOptions = Parameters[0] +function setup(extra: Partial = {}) { + const data = new Map() return createLocaleRuntime({ - meta, + meta: localeMetadata, resources, scope: 'test:api', - storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }, + storage: { get: (k) => data.get(k) ?? null, set: (k, v) => data.set(k, v) }, ...extra, }) } test('canonical locales, explicit aliases, and precise region fallback', () => { const runtime = setup() - assert.equal(normalizeLocale('en_us'), 'en-US') - assert.equal(normalizeLocale('../en'), null) - assert.equal(normalizeLocale('x-acme'), 'x-acme') - assert.equal(runtime.registry.resolve('en'), 'en-US') - assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN') - assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US') + expect(normalizeLocale('en_us')).toBe('en-US') + expect(normalizeLocale('../en')).toBe(null) + expect(normalizeLocale('x-acme')).toBe('x-acme') + expect(runtime.registry.resolve('en')).toBe('en-US') + expect(runtime.registry.resolve('zh-TW')).toBe('zh-CN') + expect(runtime.registry.resolve('auto', ['ja-JP', 'en-US'])).toBe('en-US') }) test('third language is configured, not a two-language branch', async () => { const expanded = { - ...meta, + ...localeMetadata, locales: [ - ...meta.locales, + ...localeMetadata.locales, { code: 'ja-JP', nativeName: '日本語', @@ -56,76 +56,76 @@ test('third language is configured, not a two-language branch', async () => { resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, }) await runtime.setPreference('ja-JP') - assert.equal(runtime.locale, 'ja-JP') - assert.equal(runtime.t('common:language'), '言語') - assert.equal(runtime.headers['Accept-Language'], 'ja-JP') - assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name') + expect(runtime.locale).toBe('ja-JP') + expect(runtime.t('common:language')).toBe('言語') + expect(runtime.headers['Accept-Language']).toBe('ja-JP') + expect(runtime.resolveText('原名', { 'en-US': 'Fallback name' })).toBe('Fallback name') }) test('save failure leaves active language and preference intact', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - await assert.rejects( + await expect( runtime.setPreference('en-US', { save: async () => { throw Error('network') }, }) - ) - assert.equal(runtime.locale, 'zh-CN') - assert.equal(runtime.preference, 'zh-CN') + ).rejects.toThrow() + expect(runtime.locale).toBe('zh-CN') + expect(runtime.preference).toBe('zh-CN') }) test('an old save cannot overwrite a new account', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - let done + const save = Promise.withResolvers() const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - done = resolve - }), + save: () => save.promise, }) await Promise.resolve() runtime.setAccount(2, 'zh-CN', '0') - done() - await assert.rejects(pending) - assert.equal(runtime.accountId, '2') - assert.equal(runtime.locale, 'zh-CN') + save.resolve() + await expect(pending).rejects.toThrow() + expect(runtime.accountId).toBe('2') + expect(runtime.locale).toBe('zh-CN') }) test('an explicit login choice survives reload and is consumed only by a matching login', async () => { - const data = new Map() - const storage = { get: (key) => data.get(key), set: (key, value) => data.set(key, value) } + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (key) => data.get(key) ?? null, + set: (key, value) => data.set(key, value), + } const runtime = setup({ storage }) await runtime.setPreference('en-US') const submitted = runtime.loginPreference await runtime.setPreference('auto') runtime.confirmLoginPreference(submitted) - assert.equal(runtime.loginPreference, 'auto') + expect(runtime.loginPreference).toBe('auto') const reloaded = setup({ storage }) reloaded.initialize(false) - assert.equal(reloaded.preference, 'auto') - assert.equal(reloaded.loginPreference, 'auto') + expect(reloaded.preference).toBe('auto') + expect(reloaded.loginPreference).toBe('auto') reloaded.confirmLoginPreference('auto') reloaded.setAccount(1, 'auto', '1') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.loginPreference).toBe(null) await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) reloaded.setAccount(null) - assert.equal(reloaded.preference, 'en-US') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.preference).toBe('en-US') + expect(reloaded.loginPreference).toBe(null) const next = setup({ storage }) next.initialize(false) - assert.equal(next.preference, 'en-US') - assert.equal(next.loginPreference, null) + expect(next.preference).toBe('en-US') + expect(next.loginPreference).toBe(null) next.setAccount(2, 'fr-CA', '0') - assert.equal(next.preference, 'fr-CA') - assert.equal(next.locale, 'zh-CN') + expect(next.preference).toBe('fr-CA') + expect(next.locale).toBe('zh-CN') }) test('auto follows changed device locale without changing the preference', async () => { let device = 'en-US' const runtime = setup({ deviceLocales: () => [device] }) - const languages = [] - const preferences = [] + const languages: string[] = [] + const preferences: string[] = [] runtime.engine.on('languageChanged', (code) => languages.push(code)) runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) await runtime.setPreference('auto') @@ -135,17 +135,17 @@ test('auto follows changed device locale without changing the preference', async device = 'zh-CN' runtime.refreshDeviceLocale() runtime.refreshDeviceLocale() - assert.deepEqual(languages, ['en-US', 'zh-CN']) - assert.deepEqual(preferences, ['auto']) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.locale, 'zh-CN') - assert.equal(oldHeaders['Accept-Language'], 'en-US') + expect(languages).toStrictEqual(['en-US', 'zh-CN']) + expect(preferences).toStrictEqual(['auto']) + expect(runtime.preference).toBe('auto') + expect(runtime.locale).toBe('zh-CN') + expect(oldHeaders['Accept-Language']).toBe('en-US') }) test('preference switches are serialized and recover after failed requests', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - const seen = [] - const save = async (value) => { + const seen: string[] = [] + const save = async (value: string) => { seen.push(value) return { locale: value, revision: String(seen.length) } } @@ -153,17 +153,18 @@ test('preference switches are serialized and recover after failed requests', asy runtime.setPreference('en-US', { save }), runtime.setPreference('zh-CN', { save }), ]) - assert.deepEqual(seen, ['en-US', 'zh-CN']) - assert.equal(runtime.locale, 'zh-CN') + expect(seen).toStrictEqual(['en-US', 'zh-CN']) + expect(runtime.locale).toBe('zh-CN') }) test('fallback cycles and missing resources fail at registration', () => { - assert.throws( - () => - createLocaleRegistry( - { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, - resources - ), - /cycle/ - ) - assert.throws(() => createLocaleRegistry(meta, {}), /Missing/) + expect(() => + createLocaleRegistry( + { + ...localeMetadata, + locales: localeMetadata.locales.map((item) => ({ ...item, fallback: [item.code] })), + }, + resources + ) + ).toThrow(/cycle/) + expect(() => createLocaleRegistry(localeMetadata, {})).toThrow(/Missing/) }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.ts similarity index 71% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.ts index c5a32834c..f332d5f36 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -15,7 +15,7 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a items_one: '{{count}} item', items_other: '{{count}} items', } - async function catalog(code, values) { + async function catalog(code: string, values: Record) { const dir = join(root, 'locales', code) await mkdir(dir, { recursive: true }) await writeFile(join(dir, 'common.json'), JSON.stringify(values)) @@ -24,7 +24,8 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -47,23 +48,27 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a await catalog('en-US', english) await catalog('ja-JP', { greeting: 'こんにちは、{{name}}', items_other: '{{count}} 件' }) let result = check() - assert.equal(result.status, 0, JSON.stringify(result.report.errors)) - assert.equal(result.report.data.projects[0].coverage.length, 3) - assert.ok( + expect(result.status, JSON.stringify(result.report.errors)).toBe(0) + expect(result.report.data.projects[0].coverage.length).toBe(3) + expect( result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0) - ) - assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key')) + ).toBeTruthy() + expect(!result.report.diagnostics.some((item) => item.code === 'unused-key')).toBeTruthy() await catalog('en-US', { items_one: english.items_one, items_other: english.items_other }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'missing-translation') + ).toBeTruthy() await catalog('en-US', { ...english, greeting: 'Hello' }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch') + ).toBeTruthy() await writeFile(join(root, 'src/missing.js'), "t('common:missing')") result = check() - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key')) + expect(result.report.diagnostics.some((item) => item.code === 'missing-key')).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.cjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.ts similarity index 68% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.cjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.ts index 9021c3830..999cfe016 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/time-bundle.test.ts @@ -1,18 +1,21 @@ -const assert = require('node:assert/strict') -const fs = require('node:fs') -const os = require('node:os') -const path = require('node:path') -const vm = require('node:vm') -const test = require('node:test') -const webpack = require('webpack') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +import fs from 'node:fs' +import path from 'node:path' +import vm from 'node:vm' +import webpack from 'webpack' -const appRoot = path.resolve(__dirname, '..') +const require = createRequire(import.meta.url) +const appRoot = path.resolve(import.meta.dirname, '..') // Node can resolve a leaked require; a browser cannot. Execute the real bundled // time module without Node globals and without native Intl to cover both paths. -for (const mode of ['development', 'production']) { +for (const mode of ['development', 'production'] as const) { test(`H5 ${mode} time bundle runs without require or native Intl`, async () => { - const outputPath = fs.mkdtempSync(path.join(os.tmpdir(), 'ruoyi-time-bundle-')) + // Webpack treats an exclamation mark in the system temp path as a loader separator. + const cacheDir = path.join(appRoot, '.cache') + fs.mkdirSync(cacheDir, { recursive: true }) + const outputPath = fs.mkdtempSync(path.join(cacheDir, 'time-bundle-')) const filename = path.join(outputPath, 'time-bundle.js') const previousPlatform = process.env.UNI_PLATFORM const previousMode = process.env.NODE_ENV @@ -50,10 +53,11 @@ for (const mode of ['development', 'production']) { ], }, }) - await new Promise((resolve, reject) => { + await new Promise((resolve, reject) => { compiler.run((error, stats) => { compiler.close((closeError) => { if (error || closeError) return reject(error || closeError) + if (!stats) return reject(new Error('Webpack did not return build statistics')) if (stats.hasErrors()) return reject(new Error(stats.toString({ all: false, errors: true }))) resolve() @@ -62,13 +66,13 @@ for (const mode of ['development', 'production']) { }) const sandbox = { Intl: undefined, console, setTimeout, clearTimeout } vm.runInNewContext(fs.readFileSync(filename, 'utf8'), sandbox, { timeout: 20000 }) - assert.equal(sandbox.require, undefined) - const time = sandbox.TimeBundle - assert.equal( - time.formatBusinessTime('2026-01-01T00:00:00Z', 'YYYY-MM-DD HH:mm:ss', 'America/New_York'), - '2025-12-31 19:00:00' - ) - assert.equal(time.getWallTimeCandidates('2026-11-01 01:30:00', 'America/New_York').length, 2) + expect(sandbox).not.toHaveProperty('require') + const time = (sandbox as typeof sandbox & { TimeBundle: typeof import('../src/utils/time') }) + .TimeBundle + expect( + time.formatBusinessTime('2026-01-01T00:00:00Z', 'YYYY-MM-DD HH:mm:ss', 'America/New_York') + ).toBe('2025-12-31 19:00:00') + expect(time.getWallTimeCandidates('2026-11-01 01:30:00', 'America/New_York').length).toBe(2) } finally { if (previousPlatform === undefined) delete process.env.UNI_PLATFORM else process.env.UNI_PLATFORM = previousPlatform diff --git a/ruoyi-fastapi-frontend/react/mobile/tests/time-polyfill.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/time-polyfill.test.ts similarity index 54% rename from ruoyi-fastapi-frontend/react/mobile/tests/time-polyfill.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/time-polyfill.test.ts index bff51277e..1b75e1518 100644 --- a/ruoyi-fastapi-frontend/react/mobile/tests/time-polyfill.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/time-polyfill.test.ts @@ -1,5 +1,6 @@ -import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mjs' +import { test } from 'vitest' +import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mts' // 在独立测试进程中模拟缺少原生 Intl 的运行时,再加载 App 时间工具。 -globalThis.Intl = undefined +Object.defineProperty(globalThis, 'Intl', { value: undefined, configurable: true }) const time = await import('../src/utils/time.ts') -testTimeContract(time) +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/react/mobile/tests/time.test.mjs b/ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.ts similarity index 55% rename from ruoyi-fastapi-frontend/react/mobile/tests/time.test.mjs rename to ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.ts index 4944f1178..9fd694b0c 100644 --- a/ruoyi-fastapi-frontend/react/mobile/tests/time.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.ts @@ -1,3 +1,4 @@ +import { test } from 'vitest' import * as time from '../src/utils/time.ts' -import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mjs' -testTimeContract(time) +import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mts' +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/vitest/response.test.ts b/ruoyi-fastapi-frontend/vue2/mobile/tests/vitest/response.test.ts new file mode 100644 index 000000000..732f46ae0 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/tests/vitest/response.test.ts @@ -0,0 +1,29 @@ +import { expect, it, vi } from 'vitest' +import { getRequestErrorDetails, getResponseStatus } from '@/utils/response' + +vi.mock('@/i18n', () => ({ t: (key: string) => key })) + +it('uses the HTTP failure and extracts validation details from the response body', () => { + const body = { code: 200, detail: [{ msg: 'Missing email' }, null, { msg: 'Invalid name' }] } + expect(getResponseStatus({ statusCode: 422 }, body)).toEqual({ + code: 422, + msg: 'Missing email;Invalid name', + }) +}) + +it('translates a business error with no message after a successful HTTP request', () => { + expect(getResponseStatus({ status: 200 }, { code: 403 })).toEqual({ + code: 403, + msg: 'common:network.forbidden', + }) +}) + +it('retains both platform and business error information for failed uploads', () => { + const response = { statusCode: 429, data: { code: 'quota', msg: 'Try again later' } } + expect(getRequestErrorDetails({ message: 'Upload failed', response })).toEqual({ + message: 'Upload failed', + responseStatus: 429, + responseCode: 'quota', + responseMsg: 'Try again later', + }) +}) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tsconfig.tests.json b/ruoyi-fastapi-frontend/vue2/mobile/tsconfig.tests.json new file mode 100644 index 000000000..e5e16bc82 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/tsconfig.tests.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true, + "types": ["node", "webpack-env", "@dcloudio/types", "miniprogram-api-typings", "mini-types"], + "lib": ["ES2024", "DOM", "DOM.Iterable"], + "paths": { + "@/*": ["./src/*"], + "vuex": ["./node_modules/vuex/types/index.d.ts"], + "vitest": ["./node_modules/vitest"] + } + }, + "include": [ + "tests/**/*.ts", + "tests/**/*.cts", + "tests/**/*.tsx", + "vitest.config.mts", + "src/**/*.d.ts" + ] +} diff --git a/ruoyi-fastapi-frontend/vue2/mobile/vitest.config.mts b/ruoyi-fastapi-frontend/vue2/mobile/vitest.config.mts new file mode 100644 index 000000000..714aee2de --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/mobile/vitest.config.mts @@ -0,0 +1,12 @@ +import { fileURLToPath } from 'node:url' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, + test: { + include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + execArgv: ['--experimental-vm-modules'], + maxWorkers: 4, + testTimeout: 60_000, + }, +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/eslint.config.mjs b/ruoyi-fastapi-frontend/vue2/web/eslint.config.mjs new file mode 100644 index 000000000..13364f405 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/eslint.config.mjs @@ -0,0 +1,69 @@ +import vue from 'eslint-plugin-vue' +import tseslint from 'typescript-eslint' +import vueParser from 'vue-eslint-parser' + +// Rule reference: https://github.com/vuejs/core/blob/main/eslint.config.js +export default [ + { + ignores: [ + '**/{dist,coverage,.cache,.vite,target,playwright-report,test-results}/**', + '**/*.min.js', + '**/*.config.*.timestamp-*.{mjs,cjs}', + 'tests/plugins/fixtures/bridge-b0d16a3e/pluginBridge.js', + ], + }, + { + files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'], + rules: { + 'no-debugger': 'error', + 'no-dupe-keys': 'error', + 'no-unsafe-finally': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + }, + }, + { + files: ['{src,plugins}/**/*.{js,jsx,ts,tsx,vue}'], + rules: { 'no-console': ['error', { allow: ['warn', 'error', 'info'] }] }, + }, + { + files: ['**/*.{ts,cts,mts,tsx,vue}'], + plugins: { '@typescript-eslint': tseslint.plugin }, + languageOptions: { parser: tseslint.parser }, + rules: { + '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 0 }], + '@typescript-eslint/no-import-type-side-effects': 'error', + }, + }, + { + files: ['**/*.vue'], + plugins: { vue }, + languageOptions: { + parser: vueParser, + parserOptions: { + parser: { + js: tseslint.parser, + ts: tseslint.parser, + // A .vue filename alone doesn't tell TypeScript to parse JSX. + tsx: { + parseForESLint(code, options) { + return tseslint.parser.parseForESLint(code, { + ...options, + ecmaFeatures: { ...options.ecmaFeatures, jsx: true }, + }) + }, + }, + }, + }, + }, + rules: { + 'vue/no-duplicate-attributes': 'error', + 'vue/no-parsing-error': 'error', + 'vue/no-multiple-template-root': 'error', + 'vue/valid-v-else': 'error', + 'vue/valid-v-else-if': 'error', + 'vue/valid-v-if': 'error', + }, + }, +] diff --git a/ruoyi-fastapi-frontend/vue2/web/package.json b/ruoyi-fastapi-frontend/vue2/web/package.json index fb2caebd8..5afce913f 100644 --- a/ruoyi-fastapi-frontend/vue2/web/package.json +++ b/ruoyi-fastapi-frontend/vue2/web/package.json @@ -9,20 +9,25 @@ "build:prod": "pnpm run typecheck && vue-cli-service build", "build:docker": "pnpm run typecheck && vue-cli-service build --mode docker", "build:stage": "pnpm run typecheck && vue-cli-service build --mode staging", - "test:plugin": "node tests/plugins/run-plugin-tests.js", + "test:plugin": "vitest run tests/plugins/", "preview": "node build/index.js --preview", - "test:time": "node --test tests/time/time.test.mjs", - "test:job": "node --test tests/job/job-form.test.mjs tests/job/vue2-components.test.cjs", + "test:time": "vitest run tests/time/", + "test:job": "vitest run tests/job/", "format": "prettier --write .", "format:check": "prettier --check .", - "test:auth-center": "node --test tests/auth-center/*.test.cjs", - "test:unit": "pnpm run test:auth-center && pnpm run test:plugin && pnpm run test:job && pnpm run test:session", - "test:contract": "pnpm run test:time", - "test": "pnpm run test:unit && pnpm run test:contract", - "test:session": "node --experimental-vm-modules --test tests/security/logout.test.mjs", + "test:auth-center": "vitest run tests/auth-center/", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test:vitest": "vitest run", + "test:watch": "vitest watch", + "test:unit": "vitest run tests/auth-center/ tests/plugins/ tests/job/ tests/security/ tests/vitest/", + "test:contract": "vitest run tests/time/", + "test": "vitest run", + "test:session": "vitest run tests/security/", "i18n:check": "node scripts/check-i18n.mjs && x18n --root . check --json", - "test:i18n": "node --test tests/i18n/*.test.mjs", - "typecheck": "vue-tsc --noEmit" + "test:i18n": "vitest run tests/i18n", + "typecheck": "vue-tsc --noEmit", + "typecheck:tests": "tsc --noEmit -p tsconfig.tests.json" }, "keywords": [ "vue", @@ -96,6 +101,8 @@ "compression-webpack-plugin": "12.0.0", "connect": "3.7.0", "copy-webpack-plugin": "14.0.0", + "eslint": "9.39.1", + "eslint-plugin-vue": "10.6.2", "less": "4.9.1", "less-loader": "13.0.0", "memory-fs": "0.5.0", @@ -104,6 +111,9 @@ "sass-loader": "17.0.1", "svg-sprite-loader": "6.0.11", "typescript": "5.9.3", + "typescript-eslint": "8.48.1", + "vitest": "5.0.5", + "vue-eslint-parser": "10.2.0", "vue-template-compiler": "2.7.16", "vue-tsc": "3.0.8", "webpack-theme-color-replacer": "1.5.10" diff --git a/ruoyi-fastapi-frontend/vue2/web/pnpm-lock.yaml b/ruoyi-fastapi-frontend/vue2/web/pnpm-lock.yaml index c97dc37c2..5d3e5bd58 100644 --- a/ruoyi-fastapi-frontend/vue2/web/pnpm-lock.yaml +++ b/ruoyi-fastapi-frontend/vue2/web/pnpm-lock.yaml @@ -152,19 +152,19 @@ importers: version: 1.18.8 '@vue/cli-plugin-babel': specifier: 5.0.9 - version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue@2.7.16) + version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue@2.7.16) '@vue/cli-plugin-typescript': specifier: 5.0.9 - version: 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(loader-utils@2.0.4)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16) + version: 5.0.9(51564da8bd4f0ec5836bec3e75799ce1) '@vue/cli-service': specifier: 5.0.9 - version: 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) + version: 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) '@x18n/builtins': specifier: 0.1.14 - version: 0.1.14(typescript@5.9.3) + version: 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/cli': specifier: 0.1.14 - version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) babel-plugin-import: specifier: 1.13.8 version: 1.13.8(supports-color@8.1.1) @@ -173,19 +173,25 @@ importers: version: 4.1.2 compression-webpack-plugin: specifier: 12.0.0 - version: 12.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + version: 12.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) connect: specifier: 3.7.0 version: 3.7.0(supports-color@8.1.1) copy-webpack-plugin: specifier: 14.0.0 - version: 14.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + version: 14.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + eslint: + specifier: 9.39.1 + version: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-plugin-vue: + specifier: 10.6.2 + version: 10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)) less: specifier: 4.9.1 version: 4.9.1(supports-color@8.1.1) less-loader: specifier: 13.0.0 - version: 13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + version: 13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) memory-fs: specifier: 0.5.0 version: 0.5.0 @@ -197,13 +203,22 @@ importers: version: 1.105.2 sass-loader: specifier: 17.0.1 - version: 17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + version: 17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) svg-sprite-loader: specifier: 6.0.11 version: 6.0.11(supports-color@8.1.1) typescript: specifier: 5.9.3 version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + vitest: + specifier: 5.0.5 + version: 5.0.5(@types/node@26.6.5)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) + vue-eslint-parser: + specifier: 10.2.0 + version: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vue-template-compiler: specifier: 2.7.16 version: 2.7.16 @@ -212,7 +227,7 @@ importers: version: 3.0.8(typescript@5.9.3) webpack-theme-color-replacer: specifier: 1.5.10 - version: 1.5.10 + version: 1.5.10(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) packages: @@ -901,6 +916,44 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@floating-ui/core@1.8.0': resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} @@ -916,6 +969,26 @@ packages: '@hapi/topo@5.1.0': resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -1115,6 +1188,9 @@ packages: '@oxc-project/types@0.155.0': resolution: {integrity: sha512-SeE8JPwW1xs1tHeNycjUtUBdhorRa8o4jlvjwk49R7/Z291i+4DQa7JJIgOm/TaYQZx+QrPQbVJ/9c8dMIZN8Q==} + '@oxc-project/types@0.160.0': + resolution: {integrity: sha512-gw4k9syEmnckbOgw2A2FU1TBDdX9hfwV9jEn/uio65pguPzwWiXQS3OIJDMEhv9m06tj9XiEe6RoD0YA+LgreA==} + '@parcel/watcher-android-arm64@2.6.0': resolution: {integrity: sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==} engines: {node: '>= 10.0.0'} @@ -1244,6 +1320,110 @@ packages: peerDependencies: vue: ^2.2.0 + '@rolldown/binding-android-arm-eabi@1.3.4': + resolution: {integrity: sha512-xCW8CkL/ualx/SbYqeG9iK87lJCZGDQ0soE+kaORJ0Bd+pHALyE4qK7BStmEAyYWLEzZ3/biSIpA6/7GDFvzIg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@rolldown/binding-android-arm64@1.3.4': + resolution: {integrity: sha512-5lifIO+b/prcM9sx/bkPN4w6UEToEfQ3gjhx0+0neuL+dkYskI792CfAq03T51jc8JFcaYXs2hi3l8RjiH/VWQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@rolldown/binding-darwin-arm64@1.3.4': + resolution: {integrity: sha512-RCgxTI4AJQxhVF//BI3ImQOsXTHrF4Eg+f99jBy8WoETA2kSEGFxpnrVmW0leQq/2aBR4R5AC6csmy3rc66e3Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@rolldown/binding-darwin-x64@1.3.4': + resolution: {integrity: sha512-zNPJVVPUaDEj+L0lImoK3rFv2b+Z5gNijI6DWu/fcD3/1TfmRXKb9ZyxbSN+2AhlctqjbNzUvCsMa+EBhnEM4Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@rolldown/binding-freebsd-x64@1.3.4': + resolution: {integrity: sha512-upP6g7ZIRy5by1RDQ/EphHIdJ5xK0eUD7sUgfZFWJ49s4XdbYsIvIlAPtrFpayR70Hhf9J22lb4Pm8/9FhrZmg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + resolution: {integrity: sha512-SAX5C5+poMLCxu8dkPF6h5yst40rkzs+9Y3cbPn2OFSydmHjAEprrGi64zGgnYyPIVZfdGUFqJ2fJbfbnHI+mA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + resolution: {integrity: sha512-nwHqdlRZS6GWBef3dG5/pMY6RNTBBUjj7s0Da+m6xsFpe7jx6IC46SLZcCu8f46JOfCovZmwnrz51EzGE+7Fyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-arm64-musl@1.3.4': + resolution: {integrity: sha512-Gr78X2ur/AgLCkmZgHffk/FerIX8S5zb/eII4bCcvJo0ANzeXhTShahdNbpnY6bpiszIAgIfiuKS9ziziWsamw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + resolution: {integrity: sha512-o9Wcn8nWrsQasaBRYM4d//FwhlBsTJYWkPVlhlt6FwzpwEoovY4IopRZjk5Fq3+ntRuSDORJjF/nA8sFeF2q6w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + resolution: {integrity: sha512-UDWu4jkVcx2kiBKm3Ec//4lVCbeTWj8gmJ9SyLWCdLWtTlyq7fQVeVV/14nXvRtSLErvJ2+yA/Ux5taS31Y17Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-gnu@1.3.4': + resolution: {integrity: sha512-W9mGtTa0w4fWh8RLMNPyaEhhcuqUfO07Q4I1bBc4PDMNg7gQSw0yPQNQ3D0qwbkXwxbyL4YrIzc8n6k1vuFExQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rolldown/binding-linux-x64-musl@1.3.4': + resolution: {integrity: sha512-8B+ofyQZ7/aCmkqnyMonPr5zKLqMVNczhRGFNtdIuItiwNn8iQWJawMq2E58r7bxD1XEbtRRsULY/eCWwZQ01Q==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rolldown/binding-openharmony-arm64@1.3.4': + resolution: {integrity: sha512-TlD0FSZaC7o2B4NCe9V5N11ugTnhzTM9ksj4sgRLvrKosDzjEkvlsTX3ehkw4ZlPv8AADimZZTvJGEa16pfXug==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.3.4': + resolution: {integrity: sha512-jwO8P3o53ygo7b5061B7BeaJ1BGv3BKZ6jroFdw/01qWry7Z+qNBlDvulzbTle5s/A0Fc1FRgsTxrke9DvsSbA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + cpu: [wasm32] + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + resolution: {integrity: sha512-8adGMrNtrdzi2WD1ozhYapER59gD8Q/DV6SCKJlyG2HqULPdeQUBvMa33lTsiEYwIqTZUaIU2MmvPp5f1wbtXA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@rolldown/binding-win32-x64-msvc@1.3.4': + resolution: {integrity: sha512-rIMjtESdXJCIoOiUTroQ1Y1rjVDZkuUVRUxs3APX2vNv175D7TDWvzdELiIhzGq9cUNUFat+co+PTmPHPqSREg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@rolldown/pluginutils@1.1.1': + resolution: {integrity: sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==} + '@shikijs/core@3.23.0': resolution: {integrity: sha512-NSWQz0riNb67xthdm5br6lAkvpDJRTgB36fxlo37ZzM2yq0PQFFzbd8psqC2XMPgCzo1fW6cVi18+ArJ44wqgA==} @@ -1316,6 +1496,9 @@ packages: '@types/bonjour@3.5.13': resolution: {integrity: sha512-z9fJ5Im06zvUL548KvYNecEVlA7cVDkGUi6kZusb04mpyEFKCIZJvloCcmpmLaIahDpOQGHaHmG6imtPMmPXGQ==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + '@types/connect-history-api-fallback@1.5.4': resolution: {integrity: sha512-n6Cr2xS1h4uAulPRdlw6Jl6s1oG8KrVilPN2yUITEs+K48EzMJJ3W1xy8K5eWuFvjp3R74AOIGSmp2UfBJ8HFw==} @@ -1418,6 +1601,9 @@ packages: '@types/d3@7.4.3': resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -1529,6 +1715,65 @@ packages: '@types/ws@8.18.2': resolution: {integrity: sha512-67MQl+fpWKVTT1NYdnmo3U4sc/xPo/zQBncVnI74qmQa0z/b+1g6iYqNmGCPbxO+zz2aklb08a0oHfegiVd0/w==} + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.4.0': resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} @@ -1540,6 +1785,20 @@ packages: peerDependencies: valibot: ^1.5.0 + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + '@volar/language-core@2.4.23': resolution: {integrity: sha512-hEEd5ET/oSmBC6pi1j6NaNYRWoAiDhINbT8rmwtINugR39loROSlufGdYMF9TaKGfz+ViGs1Idi3mAhnuPcoGQ==} @@ -1808,6 +2067,11 @@ packages: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} engines: {node: '>= 0.6'} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@8.3.5: resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} engines: {node: '>=0.4.0'} @@ -1915,6 +2179,9 @@ packages: arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-query@5.3.1: resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} engines: {node: '>= 0.4'} @@ -1953,6 +2220,10 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} @@ -2165,6 +2436,10 @@ packages: resolution: {integrity: sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==} engines: {node: '>=0.10.0'} + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -2952,6 +3227,9 @@ packages: resolution: {integrity: sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==} engines: {node: '>= 0.4'} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@1.3.2: resolution: {integrity: sha512-qjMjTrk+RKv/sp4RPDpV5CnKhxjFI9p+GkLBOls5A8EEElldYWCWA9zceAkmfd0xIo2aU1nxiaLFoiya2sb6Cg==} engines: {node: '>=0.10.0'} @@ -3294,9 +3572,54 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + eslint-plugin-vue@10.6.2: + resolution: {integrity: sha512-nA5yUs/B1KmKzvC42fyD0+l9Yd+LtEpVhWRbXuDj0e+ZURcTtyRbMDWUeJmTAh2wC6jC83raS63anNM2YT3NPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@stylistic/eslint-plugin': ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + '@typescript-eslint/parser': ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 + peerDependenciesMeta: + '@stylistic/eslint-plugin': + optional: true + '@typescript-eslint/parser': + optional: true + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + esm-env@1.2.2: resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + esrap@2.4.0: resolution: {integrity: sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==} peerDependencies: @@ -3305,9 +3628,20 @@ packages: '@typescript-eslint/types': optional: true + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + 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'} @@ -3347,6 +3681,10 @@ packages: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + express@4.22.3: resolution: {integrity: sha512-Bdcs4+3qlpVlx2NRn6fgX2Ue2/gGRaPeawebgclM0ERSCqDpA+owF1fdPwjJUTAJWMTuAaxjDf+hzb0/4eKvvw==} engines: {node: '>= 0.10.0'} @@ -3376,6 +3714,9 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.1.8: resolution: {integrity: sha512-GZMtZUTNRpOVIECoXwLNZS5xUGE+mVNbTB8h/7Rwh2TFWcBQiPzTgyZi05BF9UMZKkLJv8XBRJTlU7zg8+ZfMg==} @@ -3408,6 +3749,10 @@ packages: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} @@ -3435,10 +3780,21 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true + flatted@3.6.0: + resolution: {integrity: sha512-1Szo+c/GCm/cKBovrfT0Wpqw7fiqZg/xzlZtLtvWlYyvT4zUGZTS8Qo3sXPQ0nWqMg3N4nEFL2Ukzrjnsopwbg==} + flru@1.0.2: resolution: {integrity: sha512-kWyh8ADvHBFz6ua5xYOPnUroZTT/bwWfrCeL0Wj1dzG4/YOmOcfJ99W8dOVyyynJN35rZ9aCOtHChqQovV7yog==} engines: {node: '>=6'} @@ -3588,6 +3944,10 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -3606,6 +3966,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphlib@2.1.8: resolution: {integrity: sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==} @@ -3845,6 +4208,10 @@ packages: import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -4153,6 +4520,10 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + jsencrypt@3.5.4: resolution: {integrity: sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA==} @@ -4161,6 +4532,9 @@ packages: engines: {node: '>=6'} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} @@ -4173,6 +4547,9 @@ packages: json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json2module@0.0.3: resolution: {integrity: sha512-qYGxqrRrt4GbB8IEOy1jJGypkNsjWoIMlZt4bAsmUScCA507Hbc2p1JOhBzqn45u3PWafUgH2OnzyNU7udO/GA==} hasBin: true @@ -4203,6 +4580,9 @@ packages: resolution: {integrity: sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==} hasBin: true + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + khroma@2.1.0: resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} @@ -4260,6 +4640,84 @@ packages: engines: {node: '>=18'} hasBin: true + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-android-arm64@1.33.0: + resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.33.0: + resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.33.0: + resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] + + lightningcss-freebsd-x64@1.33.0: + resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] + + lightningcss-linux-arm-gnueabihf@1.33.0: + resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] + + lightningcss-linux-arm64-gnu@1.33.0: + resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + + lightningcss-linux-arm64-musl@1.33.0: + resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + + lightningcss-linux-x64-gnu@1.33.0: + resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + + lightningcss-linux-x64-musl@1.33.0: + resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] + + lightningcss-win32-arm64-msvc@1.33.0: + resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] + + lightningcss-win32-x64-msvc@1.33.0: + resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] + + lightningcss@1.33.0: + resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==} + engines: {node: '>= 12.0.0'} + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -4298,6 +4756,10 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash-es@4.18.1: resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} @@ -4370,6 +4832,9 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -4700,6 +5165,15 @@ packages: nanopop@2.4.2: resolution: {integrity: sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==} + napi-windows-process-start-time@0.1.0: + resolution: {integrity: sha512-zHxhzKsIFu3elch3eFw69WEUGc79DFhbc3nD/WEOzWL/pFFLZRW13EHnuO0c+0YjncE5uCaS9ICHxOBXkb6vPw==} + engines: {node: '>=20'} + cpu: [x64, arm64] + os: [win32] + + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + needle@2.9.1: resolution: {integrity: sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==} engines: {node: '>= 4.4.x'} @@ -4828,6 +5302,10 @@ packages: obuf@1.1.2: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + omit.js@1.0.2: resolution: {integrity: sha512-/QPc6G2NS+8d4L/cQhbk6Yit1WTB6Us2g84A7A/1+w9d/eRGHyEqC5kkQtHVoHZ5NFWGG7tUGgrhVZwgZanKrQ==} @@ -4868,6 +5346,10 @@ packages: resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} hasBin: true + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + ora@5.4.1: resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} engines: {node: '>=10'} @@ -4888,10 +5370,18 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-retry@4.6.2: resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} engines: {node: '>=8'} @@ -5249,6 +5739,10 @@ packages: resolution: {integrity: sha512-zkd+e9S1AQHhmaBKye9zlFHWjOwVgqXl1q3ECYy8561K7qxR2cREf/STLskulBFd78k6AOFeA+ff1TtEzk9bAA==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.34: + resolution: {integrity: sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==} + engines: {node: ^10 || ^12 || >=14} + posthtml-parser@0.2.1: resolution: {integrity: sha512-nPC53YMqJnc/+1x4fRYFfm81KV2V+G9NZY+hTohpYg64Ay7NemWWcV4UWuy/SgMupqQ3kJ88M/iRfZmSnxT+pw==} @@ -5266,6 +5760,10 @@ packages: resolution: {integrity: sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q==} engines: {node: '>=0.10.0'} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -5498,6 +5996,11 @@ packages: robust-predicates@3.0.3: resolution: {integrity: sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==} + rolldown@1.3.4: + resolution: {integrity: sha512-p2rq4bfBmF0M6yaR8+A89fbkBQynZI2fxUW4G07eq9kpctAkpo7q5BZ4X4Mo4XZ7HHROu33cX9PeopUFN6u+2Q==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + rollup@0.25.8: resolution: {integrity: sha512-a2S4Bh3bgrdO4BhKr2E4nZkjTvrJ2m2bWjMTzVYtoqSCn0HnuxosXnaJUHrMEziOWr3CzL9GjilQQKcyCQpJoA==} hasBin: true @@ -5742,6 +6245,10 @@ packages: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + source-map-js@1.3.0: + resolution: {integrity: sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==} + engines: {node: '>=6.0.0'} + source-map-resolve@0.5.3: resolution: {integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==} deprecated: See https://github.com/lydell/source-map-resolve#deprecated @@ -5826,6 +6333,9 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} @@ -5911,6 +6421,10 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + stylehacks@5.1.1: resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} engines: {node: ^10 || ^12 || >=14.0} @@ -6049,6 +6563,10 @@ packages: tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} @@ -6094,6 +6612,12 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-dedent@2.3.0: resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} @@ -6118,6 +6642,10 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + type-fest@0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} @@ -6150,6 +6678,13 @@ packages: resolution: {integrity: sha512-r+7YvGfM5TkTiDQ5EqWi/Z4L4KP3jUI+YCmTtWg1tmTHUw6xladLJqzR2heMaHBIM0TTFLZmn/EkIaEHYs/bIA==} engines: {node: '>= 0.4'} + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -6302,18 +6837,102 @@ packages: viser@2.4.9: resolution: {integrity: sha512-DKsqtMa3TZYQHEZ7jp4kpNp1Iqomda7d+3IkkIjIdKQvfL8OeksXfy/ECZUY1hTrGoOe7cq85+6PMS+MPn4mgQ==} - vscode-uri@3.2.0: - resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} - - vue-count-to@1.0.13: - resolution: {integrity: sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ==} - - vue-cropper@0.5.11: - resolution: {integrity: sha512-UeA3qL2BLCTGkOEAxEsxSNFO+qLYAn6YRHv4oS32cP9lMhF1vFmnAf/z+ZamtR0/Fh3sbZeZUCLVR2Ol2/dpTQ==} - - vue-demi@0.14.10: - resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} - engines: {node: '>=12'} + vite@8.4.1: + resolution: {integrity: sha512-2bl8n3+GkKBKQQR8CZC+t+3NvjWCBNh9S0Dbfu7hr7+Jjeg71jcZk7uKF6mo8GZXjIws+Nl6jhvAfHUO320VuQ==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.7.1 || ^0.8.0 + esbuild: ^0.27.0 || ^0.28.0 + jiti: '>=1.21.0' + less: ^4.0.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true + jiti: + optional: true + less: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true + + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.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.2.0: + resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} + + vue-count-to@1.0.13: + resolution: {integrity: sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ==} + + vue-cropper@0.5.11: + resolution: {integrity: sha512-UeA3qL2BLCTGkOEAxEsxSNFO+qLYAn6YRHv4oS32cP9lMhF1vFmnAf/z+ZamtR0/Fh3sbZeZUCLVR2Ol2/dpTQ==} + + vue-demi@0.14.10: + resolution: {integrity: sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==} + engines: {node: '>=12'} hasBin: true peerDependencies: '@vue/composition-api': ^1.0.0-rc.1 @@ -6322,6 +6941,12 @@ packages: '@vue/composition-api': optional: true + vue-eslint-parser@10.2.0: + resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vue-hot-reload-api@2.3.4: resolution: {integrity: sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==} @@ -6507,6 +7132,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + wildcard@2.0.1: resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} @@ -6517,6 +7147,10 @@ packages: wolfy87-eventemitter@5.1.0: resolution: {integrity: sha512-VakY4+17DbamV2VW4nZERrSuilclCRcYtfchPWe6jlma8k0AeLJxBR+C5OSFFtICArDFdXk0yw67HUGrTCdrEg==} + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@0.0.2: resolution: {integrity: sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==} engines: {node: '>=0.4.0'} @@ -6560,6 +7194,10 @@ packages: utf-8-validate: optional: true + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -6593,6 +7231,10 @@ packages: yargs@3.10.0: resolution: {integrity: sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zimmerframe@1.1.5: resolution: {integrity: sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==} @@ -7618,6 +8260,52 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))': + dependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@8.1.1)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@8.1.1)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + '@floating-ui/core@1.8.0': dependencies: '@floating-ui/utils': 0.2.12 @@ -7635,6 +8323,22 @@ snapshots: dependencies: '@hapi/hoek': 9.3.0 + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + '@iconify/types@2.0.0': {} '@iconify/utils@3.1.7': @@ -7786,6 +8490,8 @@ snapshots: '@oxc-project/types@0.155.0': {} + '@oxc-project/types@0.160.0': {} + '@parcel/watcher-android-arm64@2.6.0': optional: true @@ -7880,6 +8586,58 @@ snapshots: vue: 2.7.16 watch-size: 2.0.0 + '@rolldown/binding-android-arm-eabi@1.3.4': + optional: true + + '@rolldown/binding-android-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-arm64@1.3.4': + optional: true + + '@rolldown/binding-darwin-x64@1.3.4': + optional: true + + '@rolldown/binding-freebsd-x64@1.3.4': + optional: true + + '@rolldown/binding-linux-arm-gnueabihf@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-arm64-musl@1.3.4': + optional: true + + '@rolldown/binding-linux-ppc64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-s390x-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-gnu@1.3.4': + optional: true + + '@rolldown/binding-linux-x64-musl@1.3.4': + optional: true + + '@rolldown/binding-openharmony-arm64@1.3.4': + optional: true + + '@rolldown/binding-wasm32-wasi@1.3.4': + dependencies: + '@oxc-project/types': 0.160.0 + optional: true + + '@rolldown/binding-win32-arm64-msvc@1.3.4': + optional: true + + '@rolldown/binding-win32-x64-msvc@1.3.4': + optional: true + + '@rolldown/pluginutils@1.1.1': {} + '@shikijs/core@3.23.0': dependencies: '@shikijs/types': 3.23.0 @@ -7950,13 +8708,13 @@ snapshots: core-js: 3.50.0 nanopop: 2.4.2 - '@soda/friendly-errors-webpack-plugin@1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29))': + '@soda/friendly-errors-webpack-plugin@1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29))': dependencies: chalk: 3.0.0 error-stack-parser: 2.1.4 string-width: 4.2.3 strip-ansi: 6.0.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) '@soda/get-current-script@1.0.2': {} @@ -7975,6 +8733,11 @@ snapshots: dependencies: '@types/node': 26.6.5 + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.1.3 @@ -8103,6 +8866,8 @@ snapshots: '@types/d3-transition': 3.0.9 '@types/d3-zoom': 3.0.9 + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.9': {} '@types/express-serve-static-core@4.19.9': @@ -8218,6 +8983,98 @@ snapshots: dependencies: '@types/node': 26.6.5 + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + graphemer: 1.4.0 + ignore: 7.0.14 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.48.1': {} + + '@typescript-eslint/typescript-estree@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 9.0.9 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + '@ungap/structured-clone@1.4.0': {} '@upsetjs/venn.js@2.0.0': @@ -8229,6 +9086,17 @@ snapshots: dependencies: valibot: 1.5.0(typescript@5.9.3) + '@vitest/mocker@5.0.5(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) + + '@vitest/spy@5.0.5': {} + '@volar/language-core@2.4.23': dependencies: '@volar/source-map': 2.4.23 @@ -8368,15 +9236,15 @@ snapshots: '@vue/cli-overlay@5.0.9': {} - '@vue/cli-plugin-babel@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue@2.7.16)': + '@vue/cli-plugin-babel@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(core-js@3.50.0)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue@2.7.16)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@vue/babel-preset-app': 5.0.9(@babel/core@7.29.7(supports-color@8.1.1))(core-js@3.50.0)(supports-color@8.1.1)(vue@2.7.16) - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 - babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) transitivePeerDependencies: - '@minify-html/node' - '@napi-rs/image' @@ -8400,27 +9268,27 @@ snapshots: - vue - webpack-cli - '@vue/cli-plugin-router@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))': + '@vue/cli-plugin-router@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))': dependencies: - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 transitivePeerDependencies: - encoding - '@vue/cli-plugin-typescript@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(loader-utils@2.0.4)(postcss@5.2.18)(supports-color@8.1.1)(svgo@2.8.4)(typescript@5.9.3)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)': + '@vue/cli-plugin-typescript@5.0.9(51564da8bd4f0ec5836bec3e75799ce1)': dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) '@types/webpack-env': 1.18.8 - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) '@vue/cli-shared-utils': 5.0.9 - babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - fork-ts-checker-webpack-plugin: 6.5.3(typescript@5.9.3)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + babel-loader: 8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + fork-ts-checker-webpack-plugin: 6.5.3(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(typescript@5.9.3)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) globby: 11.1.0 - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - ts-loader: 9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + ts-loader: 9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) typescript: 5.9.3 vue: 2.7.16 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: vue-template-compiler: 2.7.16 transitivePeerDependencies: @@ -8446,22 +9314,22 @@ snapshots: - uglify-js - webpack-cli - '@vue/cli-plugin-vuex@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))': + '@vue/cli-plugin-vuex@5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0))': dependencies: - '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) + '@vue/cli-service': 5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0) - '@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)': + '@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)': dependencies: '@babel/helper-compilation-targets': 7.29.7 - '@soda/friendly-errors-webpack-plugin': 1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + '@soda/friendly-errors-webpack-plugin': 1.8.1(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) '@soda/get-current-script': 1.0.2 '@types/minimist': 1.2.5 '@vue/cli-overlay': 5.0.9 - '@vue/cli-plugin-router': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)) - '@vue/cli-plugin-vuex': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)) + '@vue/cli-plugin-router': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)) + '@vue/cli-plugin-vuex': 5.0.9(@vue/cli-service@5.0.9(@vue/compiler-sfc@3.5.44)(clean-css@5.3.3)(csso@4.2.0)(html-minifier-terser@6.1.0)(less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lightningcss@1.33.0)(lodash@4.18.1)(prettier@3.9.10)(sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(supports-color@8.1.1)(svgo@2.8.4)(uglify-js@2.8.29)(vue-template-compiler@2.7.16)(vue@2.7.16)(webpack-sources@3.6.0)) '@vue/cli-shared-utils': 5.0.9 '@vue/component-compiler-utils': 3.3.0(lodash@4.18.1) - '@vue/vue-loader-v15': vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + '@vue/vue-loader-v15': vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) '@vue/web-component-wrapper': 1.3.0 acorn: 8.19.0 acorn-walk: 8.3.5 @@ -8472,9 +9340,9 @@ snapshots: cli-highlight: 2.1.11 clipboardy: 2.3.0 cliui: 7.0.4 - copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - css-minimizer-webpack-plugin: 3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + copy-webpack-plugin: 9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + css-minimizer-webpack-plugin: 3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) cssnano: 5.1.15(postcss@8.5.30) debug: 4.4.3(supports-color@8.1.1) default-gateway: 6.0.3 @@ -8483,33 +9351,33 @@ snapshots: fs-extra: 9.1.0 globby: 11.1.0 hash-sum: 2.0.0 - html-webpack-plugin: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + html-webpack-plugin: 5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) is-file-esm: 1.0.0 launch-editor-middleware: 2.14.2 lodash.defaultsdeep: 4.6.1 lodash.mapvalues: 4.6.0 - mini-css-extract-plugin: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + mini-css-extract-plugin: 2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) minimist: 1.2.8 module-alias: 2.3.4 portfinder: 1.0.38(supports-color@8.1.1) postcss: 8.5.30 - postcss-loader: 6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - progress-webpack-plugin: 1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + postcss-loader: 6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + progress-webpack-plugin: 1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) ssri: 8.0.1 - terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - vue-loader: 17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + terser-webpack-plugin: 5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + thread-loader: 3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + vue-loader: 17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) vue-style-loader: 4.1.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29) webpack-bundle-analyzer: 4.10.2 webpack-chain: 6.5.1 - webpack-dev-server: 4.15.2(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + webpack-dev-server: 4.15.2(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) webpack-merge: 5.10.0 webpack-virtual-modules: 0.4.6 whatwg-fetch: 3.6.20 optionalDependencies: - less-loader: 13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) - sass-loader: 17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + less-loader: 13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + sass-loader: 17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) vue-template-compiler: 2.7.16 webpack-sources: 3.6.0 transitivePeerDependencies: @@ -8811,25 +9679,25 @@ snapshots: '@webassemblyjs/ast': 1.14.1 '@xtuc/long': 4.2.2 - '@x18n/builtins@0.1.14(typescript@5.9.3)': + '@x18n/builtins@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: '@vue/compiler-sfc': 3.5.44 '@x18n/core': 0.1.14(typescript@5.9.3) json5: 2.2.3 jsonc-parser: 3.3.1 oxc-parser: 0.155.0 - svelte: 5.57.3 + svelte: 5.57.3(@typescript-eslint/types@8.48.1) yaml: 2.9.1 transitivePeerDependencies: - '@typescript-eslint/types' - typescript - '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) - '@x18n/node': 0.1.14(typescript@5.9.3) - '@x18n/ui': 0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + '@x18n/node': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) + '@x18n/ui': 0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) cac: 7.1.0 devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) nostics: 1.3.0 @@ -8849,9 +9717,9 @@ snapshots: transitivePeerDependencies: - typescript - '@x18n/node@0.1.14(typescript@5.9.3)': + '@x18n/node@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) chokidar: 6.0.0 ignore: 7.0.14 @@ -8863,11 +9731,11 @@ snapshots: - '@typescript-eslint/types' - typescript - '@x18n/ui@0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/ui@0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: '@devframes/agentic': 1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6) '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@5.9.3)) - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) valibot: 1.5.0(typescript@5.9.3) @@ -8890,6 +9758,10 @@ snapshots: mime-types: 2.1.35 negotiator: 0.6.3 + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + acorn-walk@8.3.5: dependencies: acorn: 8.19.0 @@ -9013,6 +9885,8 @@ snapshots: arch@2.2.0: {} + argparse@2.0.1: {} + aria-query@5.3.1: {} arr-diff@4.0.0: {} @@ -9044,6 +9918,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + assertion-error@2.0.1: {} + assign-symbols@1.0.0: {} async-function@1.0.0: {} @@ -9089,14 +9965,14 @@ snapshots: babel-helper-vue-jsx-merge-props@2.0.3: {} - babel-loader@8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + babel-loader@8.4.1(@babel/core@7.29.7(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@babel/core': 7.29.7(supports-color@8.1.1) find-cache-dir: 3.3.2 loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) babel-plugin-dynamic-import-node@2.3.3: dependencies: @@ -9306,6 +10182,8 @@ snapshots: align-text: 0.1.4 lazy-cache: 1.0.4 + chai@6.3.0: {} + chalk@1.1.3: dependencies: ansi-styles: 2.2.1 @@ -9475,11 +10353,11 @@ snapshots: dependencies: mime-db: 1.54.0 - compression-webpack-plugin@12.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + compression-webpack-plugin@12.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: schema-utils: 4.5.0 serialize-javascript: 7.1.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) compression@1.8.2(supports-color@8.1.1): dependencies: @@ -9538,16 +10416,16 @@ snapshots: copy-descriptor@0.1.1: {} - copy-webpack-plugin@14.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + copy-webpack-plugin@14.0.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: glob-parent: 6.0.2 normalize-path: 3.0.0 schema-utils: 4.5.0 serialize-javascript: 7.1.2 tinyglobby: 0.2.17 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) - copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + copy-webpack-plugin@9.1.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: fast-glob: 3.3.3 glob-parent: 6.0.2 @@ -9555,7 +10433,7 @@ snapshots: normalize-path: 3.0.0 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) core-js-compat@3.50.0: dependencies: @@ -9613,7 +10491,7 @@ snapshots: dependencies: postcss: 8.5.30 - css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: icss-utils: 5.1.0(postcss@8.5.30) postcss: 8.5.30 @@ -9624,9 +10502,9 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.8.5 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) - css-minimizer-webpack-plugin@3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + css-minimizer-webpack-plugin@3.4.1(clean-css@5.3.3)(csso@4.2.0)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: cssnano: 5.1.15(postcss@8.5.30) jest-worker: 27.5.1 @@ -9634,7 +10512,7 @@ snapshots: schema-utils: 4.5.0 serialize-javascript: 6.0.2 source-map: 0.6.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: clean-css: 5.3.3 csso: 4.2.0 @@ -10010,6 +10888,8 @@ snapshots: object-keys: 1.1.1 regexp.prototype.flags: 1.5.4 + deep-is@0.1.4: {} + deepmerge@1.3.2: {} deepmerge@1.5.2: {} @@ -10071,8 +10951,7 @@ snapshots: detect-browser@5.3.0: {} - detect-libc@2.1.2: - optional: true + detect-libc@2.1.2: {} detect-node@2.1.0: {} @@ -10393,14 +11272,99 @@ snapshots: escape-string-regexp@4.0.0: {} + eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 7.1.6 + semver: 7.8.5 + vue-eslint-parser: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + xml-name-validator: 4.0.0 + optionalDependencies: + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@8.1.1) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@8.1.1) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 + transitivePeerDependencies: + - supports-color + esm-env@1.2.2: {} - esrap@2.4.0: + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrap@2.4.0(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + optionalDependencies: + '@typescript-eslint/types': 8.48.1 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.9 + esutils@2.0.3: {} etag@1.8.1: {} @@ -10451,6 +11415,8 @@ snapshots: transitivePeerDependencies: - supports-color + expect-type@1.4.0: {} + express@4.22.3(supports-color@8.1.1): dependencies: accepts: 1.3.8 @@ -10523,6 +11489,8 @@ snapshots: fast-json-stable-stringify@2.1.0: {} + fast-levenshtein@2.0.6: {} + fast-uri@3.1.8: {} fastdom@1.0.12: @@ -10549,6 +11517,10 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + file-saver@2.0.5: {} fill-range@4.0.0: @@ -10597,8 +11569,20 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.6.0 + keyv: 4.5.4 + flat@5.0.2: {} + flatted@3.6.0: {} + flru@1.0.2: {} fmin@0.0.2: @@ -10624,7 +11608,7 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 - fork-ts-checker-webpack-plugin@6.5.3(typescript@5.9.3)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + fork-ts-checker-webpack-plugin@6.5.3(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(typescript@5.9.3)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@babel/code-frame': 7.29.7 '@types/json-schema': 7.0.15 @@ -10640,8 +11624,9 @@ snapshots: semver: 7.8.5 tapable: 1.1.3 typescript: 5.9.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) vue-template-compiler: 2.7.16 form-data@4.0.6: @@ -10762,6 +11747,8 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + globals@14.0.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -10784,6 +11771,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + graphlib@2.1.8: dependencies: lodash: 4.18.1 @@ -10911,7 +11900,7 @@ snapshots: html-void-elements@3.0.0: {} - html-webpack-plugin@5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + html-webpack-plugin@5.6.8(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -10919,7 +11908,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.3.3 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) htmlparser2@10.1.0: dependencies: @@ -11025,6 +12014,8 @@ snapshots: import-meta-resolve@4.2.0: {} + imurmurhash@0.1.4: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -11308,10 +12299,16 @@ snapshots: js-tokens@4.0.0: {} + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + jsencrypt@3.5.4: {} jsesc@3.1.0: {} + json-buffer@3.0.1: {} + json-parse-better-errors@1.0.2: {} json-parse-even-better-errors@2.3.1: {} @@ -11320,6 +12317,8 @@ snapshots: json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} + json2module@0.0.3: dependencies: rw: 1.3.3 @@ -11350,6 +12349,10 @@ snapshots: dependencies: commander: 8.3.0 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + khroma@2.1.0: {} kind-of@3.2.2: @@ -11381,12 +12384,12 @@ snapshots: lazy-cache@1.0.4: {} - less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + less-loader@13.0.0(less@4.9.1(supports-color@8.1.1))(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@types/less': 3.0.8 less: 4.9.1(supports-color@8.1.1) optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) less@4.9.1(supports-color@8.1.1): dependencies: @@ -11403,6 +12406,60 @@ snapshots: transitivePeerDependencies: - supports-color + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + + lightningcss-android-arm64@1.33.0: + optional: true + + lightningcss-darwin-arm64@1.33.0: + optional: true + + lightningcss-darwin-x64@1.33.0: + optional: true + + lightningcss-freebsd-x64@1.33.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.33.0: + optional: true + + lightningcss-linux-arm64-gnu@1.33.0: + optional: true + + lightningcss-linux-arm64-musl@1.33.0: + optional: true + + lightningcss-linux-x64-gnu@1.33.0: + optional: true + + lightningcss-linux-x64-musl@1.33.0: + optional: true + + lightningcss-win32-arm64-msvc@1.33.0: + optional: true + + lightningcss-win32-x64-msvc@1.33.0: + optional: true + + lightningcss@1.33.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.33.0 + lightningcss-darwin-arm64: 1.33.0 + lightningcss-darwin-x64: 1.33.0 + lightningcss-freebsd-x64: 1.33.0 + lightningcss-linux-arm-gnueabihf: 1.33.0 + lightningcss-linux-arm64-gnu: 1.33.0 + lightningcss-linux-arm64-musl: 1.33.0 + lightningcss-linux-x64-gnu: 1.33.0 + lightningcss-linux-x64-musl: 1.33.0 + lightningcss-win32-arm64-msvc: 1.33.0 + lightningcss-win32-x64-msvc: 1.33.0 + lilconfig@2.1.0: {} lines-and-columns@1.2.4: {} @@ -11439,6 +12496,10 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash-es@4.18.1: {} lodash.clonedeep@4.5.0: {} @@ -11455,8 +12516,7 @@ snapshots: lodash.memoize@4.1.2: {} - lodash.merge@4.6.2: - optional: true + lodash.merge@4.6.2: {} lodash.uniq@4.5.0: {} @@ -11504,6 +12564,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -11684,11 +12748,11 @@ snapshots: mimic-fn@2.1.0: {} - mini-css-extract-plugin@2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + mini-css-extract-plugin@2.10.2(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: schema-utils: 4.5.0 tapable: 2.3.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) minimalistic-assert@1.0.1: {} @@ -11702,34 +12766,36 @@ snapshots: minimist@1.2.8: {} - minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.5.0 terser: 5.51.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: clean-css: 5.3.3 cssnano: 5.1.15(postcss@8.5.30) csso: 4.2.0 html-minifier-terser: 6.1.0 + lightningcss: 1.33.0 postcss: 5.2.18 svgo: 2.8.4 uglify-js: 2.8.29 - minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + minimizer-webpack-plugin@5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.5.0 terser: 5.51.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: clean-css: 5.3.3 cssnano: 5.1.15(postcss@8.5.30) csso: 4.2.0 html-minifier-terser: 6.1.0 + lightningcss: 1.33.0 postcss: 8.5.30 svgo: 2.8.4 uglify-js: 2.8.29 @@ -11825,6 +12891,11 @@ snapshots: nanopop@2.4.2: {} + napi-windows-process-start-time@0.1.0: + optional: true + + natural-compare@1.4.0: {} + needle@2.9.1(supports-color@8.1.1): dependencies: debug: 3.2.7(supports-color@8.1.1) @@ -11943,6 +13014,8 @@ snapshots: obuf@1.1.2: {} + obug@3.0.0: {} + omit.js@1.0.2: dependencies: babel-runtime: 6.26.0 @@ -11985,6 +13058,15 @@ snapshots: opener@1.5.2: {} + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + ora@5.4.1: dependencies: bl: 4.1.0 @@ -12034,10 +13116,18 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-retry@4.6.2: dependencies: '@types/retry': 0.12.0 @@ -12183,13 +13273,13 @@ snapshots: dependencies: postcss: 8.5.30 - postcss-loader@6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + postcss-loader@6.2.1(postcss@8.5.30)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: cosmiconfig: 7.1.0 klona: 2.0.6 postcss: 8.5.30 semver: 7.8.5 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) postcss-merge-longhand@5.1.7(postcss@8.5.30): dependencies: @@ -12358,6 +13448,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.2 + postcss@8.5.34: + dependencies: + nanoid: 3.3.20 + picocolors: 1.1.1 + source-map-js: 1.3.0 + posthtml-parser@0.2.1: dependencies: htmlparser2: 3.10.1 @@ -12381,6 +13477,8 @@ snapshots: posthtml-parser: 0.2.1 posthtml-render: 1.4.0 + prelude-ls@1.2.1: {} + prettier@2.8.8: optional: true @@ -12402,12 +13500,12 @@ snapshots: process-nextick-args@2.0.1: {} - progress-webpack-plugin@1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + progress-webpack-plugin@1.0.16(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: chalk: 2.4.2 figures: 2.0.0 log-update: 2.3.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) property-information@7.2.0: {} @@ -12629,6 +13727,28 @@ snapshots: robust-predicates@3.0.3: {} + rolldown@1.3.4: + dependencies: + '@oxc-project/types': 0.160.0 + '@rolldown/pluginutils': 1.1.1 + optionalDependencies: + '@rolldown/binding-android-arm-eabi': 1.3.4 + '@rolldown/binding-android-arm64': 1.3.4 + '@rolldown/binding-darwin-arm64': 1.3.4 + '@rolldown/binding-darwin-x64': 1.3.4 + '@rolldown/binding-freebsd-x64': 1.3.4 + '@rolldown/binding-linux-arm-gnueabihf': 1.3.4 + '@rolldown/binding-linux-arm64-gnu': 1.3.4 + '@rolldown/binding-linux-arm64-musl': 1.3.4 + '@rolldown/binding-linux-ppc64-gnu': 1.3.4 + '@rolldown/binding-linux-s390x-gnu': 1.3.4 + '@rolldown/binding-linux-x64-gnu': 1.3.4 + '@rolldown/binding-linux-x64-musl': 1.3.4 + '@rolldown/binding-openharmony-arm64': 1.3.4 + '@rolldown/binding-wasm32-wasi': 1.3.4 + '@rolldown/binding-win32-arm64-msvc': 1.3.4 + '@rolldown/binding-win32-x64-msvc': 1.3.4 + rollup@0.25.8: dependencies: chalk: 1.1.3 @@ -12681,10 +13801,10 @@ snapshots: safer-buffer@2.1.2: {} - sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + sass-loader@17.0.1(sass@1.105.2)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): optionalDependencies: sass: 1.105.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) sass@1.105.2: dependencies: @@ -12924,6 +14044,8 @@ snapshots: source-map-js@1.2.2: {} + source-map-js@1.3.0: {} + source-map-resolve@0.5.3: dependencies: atob: 2.1.2 @@ -13013,6 +14135,8 @@ snapshots: statuses@2.0.2: {} + std-env@4.3.0: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -13125,6 +14249,8 @@ snapshots: strip-final-newline@2.0.0: {} + strip-json-comments@3.1.1: {} + stylehacks@5.1.1(postcss@8.5.30): dependencies: browserslist: 4.29.3 @@ -13153,7 +14279,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.57.3: + svelte@5.57.3(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.6.0 @@ -13165,7 +14291,7 @@ snapshots: clsx: 2.1.1 devalue: 5.9.4 esm-env: 1.2.2 - esrap: 2.4.0 + esrap: 2.4.0(@typescript-eslint/types@8.48.1) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -13247,18 +14373,19 @@ snapshots: resolve: 1.22.13 string.prototype.trim: 1.2.11 - terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + terser-webpack-plugin@5.6.1(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@jridgewell/trace-mapping': 0.3.31 jest-worker: 27.5.1 schema-utils: 4.5.0 terser: 5.51.2 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: clean-css: 5.3.3 cssnano: 5.1.15(postcss@8.5.30) csso: 4.2.0 html-minifier-terser: 6.1.0 + lightningcss: 1.33.0 postcss: 8.5.30 uglify-js: 2.8.29 @@ -13277,14 +14404,14 @@ snapshots: dependencies: any-promise: 1.3.0 - thread-loader@3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + thread-loader@3.0.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: json-parse-better-errors: 1.0.2 loader-runner: 4.3.2 loader-utils: 2.0.4 neo-async: 2.6.2 schema-utils: 3.3.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) throttle-debounce@1.1.0: {} @@ -13292,6 +14419,8 @@ snapshots: tiny-emitter@2.1.0: {} + tinybench@6.2.5: {} + tinycolor2@1.6.0: {} tinyexec@1.3.1: {} @@ -13337,15 +14466,19 @@ snapshots: trim-lines@3.0.1: {} + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + ts-dedent@2.3.0: {} - ts-loader@9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + ts-loader@9.6.2(loader-utils@2.0.4)(typescript@5.9.3)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: chalk: 4.1.2 picomatch: 4.0.7 source-map: 0.7.6 typescript: 5.9.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: loader-utils: 2.0.4 @@ -13355,6 +14488,10 @@ snapshots: tslib@2.8.1: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + type-fest@0.6.0: {} type-fest@0.8.1: {} @@ -13407,6 +14544,17 @@ snapshots: typed-array-buffer: 1.0.3 typed-array-byte-offset: 1.0.5 + typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + typescript@5.9.3: {} uc.micro@3.0.0: {} @@ -13561,6 +14709,44 @@ snapshots: d3-format: 1.4.5 lodash: 4.18.1 + vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1): + dependencies: + lightningcss: 1.33.0 + picomatch: 4.0.7 + postcss: 8.5.34 + rolldown: 1.3.4 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 26.6.5 + fsevents: 2.3.3 + jiti: 2.7.0 + less: 4.9.1(supports-color@8.1.1) + napi-windows-process-start-time: 0.1.0 + sass: 1.105.2 + terser: 5.51.2 + yaml: 2.9.1 + + vitest@5.0.5(@types/node@26.6.5)(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 26.6.5 + transitivePeerDependencies: + - msw + vscode-uri@3.2.0: {} vue-count-to@1.0.13: {} @@ -13571,17 +14757,29 @@ snapshots: dependencies: vue: 2.7.16 + vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + vue-hot-reload-api@2.3.4: {} - vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + vue-loader@15.11.1(@vue/compiler-sfc@3.5.44)(css-loader@6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)))(lodash@4.18.1)(prettier@3.9.10)(vue-template-compiler@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@vue/component-compiler-utils': 3.3.0(lodash@4.18.1) - css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + css-loader: 6.11.0(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) hash-sum: 1.0.2 loader-utils: 1.4.2 vue-hot-reload-api: 2.3.4 vue-style-loader: 4.1.3 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: '@vue/compiler-sfc': 3.5.44 prettier: 3.9.10 @@ -13641,12 +14839,12 @@ snapshots: - walrus - whiskers - vue-loader@17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + vue-loader@17.4.2(@vue/compiler-sfc@3.5.44)(vue@2.7.16)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.6.1 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) optionalDependencies: '@vue/compiler-sfc': 3.5.44 vue: 2.7.16 @@ -13731,16 +14929,16 @@ snapshots: deepmerge: 1.5.2 javascript-stringify: 2.1.0 - webpack-dev-middleware@5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + webpack-dev-middleware@5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: colorette: 2.0.20 memfs: 3.5.3 mime-types: 2.1.35 range-parser: 1.3.0 schema-utils: 4.5.0 - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) - webpack-dev-server@4.15.2(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): + webpack-dev-server@4.15.2(supports-color@8.1.1)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -13770,10 +14968,10 @@ snapshots: serve-index: 1.9.2(supports-color@8.1.1) sockjs: 0.3.24 spdy: 4.0.2(supports-color@8.1.1) - webpack-dev-middleware: 5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + webpack-dev-middleware: 5.3.4(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) ws: 8.22.0 optionalDependencies: - webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) + webpack: 5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29) transitivePeerDependencies: - bufferutil - supports-color @@ -13787,11 +14985,13 @@ snapshots: webpack-sources@3.6.0: {} - webpack-theme-color-replacer@1.5.10: {} + webpack-theme-color-replacer@1.5.10(vite@8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1)): + optionalDependencies: + vite: 8.4.1(@types/node@26.6.5)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass@1.105.2)(terser@5.51.2)(yaml@2.9.1) webpack-virtual-modules@0.4.6: {} - webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29): + webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -13805,7 +15005,7 @@ snapshots: events: 3.3.0 graceful-fs: 4.2.11 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) schema-utils: 4.5.0 tapable: 2.3.3 watchpack: 2.6.1 @@ -13828,7 +15028,7 @@ snapshots: - svgo - uglify-js - webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29): + webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29): dependencies: '@types/estree': 1.0.9 '@types/json-schema': 7.0.15 @@ -13842,7 +15042,7 @@ snapshots: events: 3.3.0 graceful-fs: 4.2.11 mime-db: 1.54.0 - minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) + minimizer-webpack-plugin: 5.13.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@8.5.30)(svgo@2.8.4)(uglify-js@2.8.29)(webpack@5.112.0(clean-css@5.3.3)(cssnano@5.1.15(postcss@8.5.30))(csso@4.2.0)(html-minifier-terser@6.1.0)(lightningcss@1.33.0)(postcss@5.2.18)(svgo@2.8.4)(uglify-js@2.8.29)) schema-utils: 4.5.0 tapable: 2.3.3 watchpack: 2.6.1 @@ -13929,12 +15129,16 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@3.2.1: {} + wildcard@2.0.1: {} window-size@0.1.0: {} wolfy87-eventemitter@5.1.0: {} + word-wrap@1.2.5: {} + wordwrap@0.0.2: {} wrap-ansi@3.0.1: @@ -13960,6 +15164,8 @@ snapshots: ws@8.22.0: {} + xml-name-validator@4.0.0: {} + y18n@5.0.8: {} yallist@2.1.2: {} @@ -13991,6 +15197,8 @@ snapshots: decamelize: 1.2.0 window-size: 0.1.0 + yocto-queue@0.1.0: {} + zimmerframe@1.1.5: {} zod@4.6.7: {} diff --git a/ruoyi-fastapi-frontend/vue2/web/src/components/Crontab/index.vue b/ruoyi-fastapi-frontend/vue2/web/src/components/Crontab/index.vue index 60ca0d1fa..b05e369b3 100644 --- a/ruoyi-fastapi-frontend/vue2/web/src/components/Crontab/index.vue +++ b/ruoyi-fastapi-frontend/vue2/web/src/components/Crontab/index.vue @@ -237,7 +237,6 @@ export default defineComponent({ updateCrontabValue(name: CronField, value: string, from?: CronField) { this.crontabValueObj[name] = value if (from && from !== name) { - console.log(`来自组件 ${from} 改变了 ${name} ${value}`) this.changeRadio(name, value) } }, diff --git a/ruoyi-fastapi-frontend/vue2/web/src/utils/dict/DictOptions.ts b/ruoyi-fastapi-frontend/vue2/web/src/utils/dict/DictOptions.ts index 0a10c5b3d..308622d4b 100644 --- a/ruoyi-fastapi-frontend/vue2/web/src/utils/dict/DictOptions.ts +++ b/ruoyi-fastapi-frontend/vue2/web/src/utils/dict/DictOptions.ts @@ -13,10 +13,7 @@ export const options: { /** * 字典请求,方法签名为function(dictMeta: DictMeta): Promise */ - request: (dictMeta) => { - console.log(`load dict ${dictMeta.type}`) - return Promise.resolve([]) - }, + request: () => Promise.resolve([]), /** * 字典响应数据转换器,方法签名为function(response: Object, dictMeta: DictMeta): DictData */ diff --git a/ruoyi-fastapi-frontend/vue2/web/src/utils/request.ts b/ruoyi-fastapi-frontend/vue2/web/src/utils/request.ts index 0850bb55c..de175c42f 100644 --- a/ruoyi-fastapi-frontend/vue2/web/src/utils/request.ts +++ b/ruoyi-fastapi-frontend/vue2/web/src/utils/request.ts @@ -123,7 +123,7 @@ service.interceptors.request.use( return config }, (error: unknown) => { - console.log(error) + console.error(error) return Promise.reject(error) } ) @@ -204,7 +204,7 @@ service.interceptors.response.use( resetTransportRequestConfig(config) return service.request(config) } - console.log('err' + error) + console.error(error) const response = axiosError?.response const responseStatus = response?.status const responseCode = response?.data?.code diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.ts similarity index 53% rename from ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.ts index c1ebefc8c..0611a7943 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/availability.test.ts @@ -1,9 +1,10 @@ -const assert = require('node:assert/strict') -const test = require('node:test') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) const path = require('node:path') -const { loadModule } = require('../support/load-module.cjs') +const { loadModule } = require('../support/load-module.cts') const { checkAuthCenterAccess } = loadModule( - path.resolve(__dirname, '../../src/utils/authCenterAccess.ts') + path.resolve(import.meta.dirname, '../../src/utils/authCenterAccess.ts') ) test('公共认证页面按最新开关准入,故障拒绝进入且错误页保持可访问', async () => { @@ -19,21 +20,21 @@ test('公共认证页面按最新开关准入,故障拒绝进入且错误页 calls++ return { data: { enabled } } } - assert.equal(await checkAuthCenterAccess(route, loadStatus), undefined) + expect(await checkAuthCenterAccess(route, loadStatus)).toBe(undefined) enabled = false - assert.deepEqual(await checkAuthCenterAccess(route, loadStatus), { + expect(await checkAuthCenterAccess(route, loadStatus)).toStrictEqual({ path: '/auth-center/error', query: { reason: 'disabled' }, replace: true, }) enabled = true - assert.equal(await checkAuthCenterAccess(route, loadStatus), undefined) - assert.equal(calls, 3, '每次进入都检查开关,不沿用上次结果') + expect(await checkAuthCenterAccess(route, loadStatus)).toBe(undefined) + expect(calls, '每次进入都检查开关,不沿用上次结果').toBe(3) for (const path of ['/auth-center/error', '/login', '/system/user']) { - assert.equal(await checkAuthCenterAccess({ path, meta: {} }, loadStatus), undefined) + expect(await checkAuthCenterAccess({ path, meta: {} }, loadStatus)).toBe(undefined) } - assert.equal(calls, 3, '错误说明页与普通页面不请求认证状态') + expect(calls, '错误说明页与普通页面不请求认证状态').toBe(3) const unavailable = { path: '/auth-center/error', @@ -41,12 +42,11 @@ test('公共认证页面按最新开关准入,故障拒绝进入且错误页 replace: true, } for (const response of [{}, { data: {} }, { data: { enabled: 'false' } }, null]) { - assert.deepEqual(await checkAuthCenterAccess(route, async () => response), unavailable) + expect(await checkAuthCenterAccess(route, async () => response)).toStrictEqual(unavailable) } - assert.deepEqual( + expect( await checkAuthCenterAccess(route, async () => { throw new Error('network unavailable') - }), - unavailable - ) + }) + ).toStrictEqual(unavailable) }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.cjs deleted file mode 100644 index 74a6d0e33..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.cjs +++ /dev/null @@ -1,27 +0,0 @@ -const assert = require('node:assert/strict') -const { loadModule } = require('../support/load-module.cjs') - -const { interactionRouteLocation, readInteractionCsrf, trustedCompletionUrl } = loadModule( - require('node:path').resolve(__dirname, '../../src/views/auth-center/interactionSecurity.ts') -) - -assert.equal(readInteractionCsrf('#csrf=token%2Bvalue&ignored=1'), 'token+value') -assert.equal(readInteractionCsrf('#ignored=1'), '') -assert.equal(readInteractionCsrf(null), '') -assert.equal( - interactionRouteLocation('/auth-center/login', 'id/with space'), - '/auth-center/login?interaction=id%2Fwith%20space' -) - -const origin = 'https://auth.example.com' -const interactionId = 'interaction-1' -assert.equal( - trustedCompletionUrl('/auth/interaction/interaction-1/complete', origin, interactionId)?.origin, - origin -) -assert.equal(trustedCompletionUrl('https://evil.example/complete', origin, interactionId), null) -assert.equal(trustedCompletionUrl('/auth/interaction/other/complete', origin, interactionId), null) -assert.equal( - trustedCompletionUrl('/auth/interaction/interaction-1/complete.evil', origin, interactionId), - null -) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.ts new file mode 100644 index 000000000..43ee9c12a --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/interactionSecurity.test.ts @@ -0,0 +1,31 @@ +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) +const { loadModule } = require('../support/load-module.cts') + +const { interactionRouteLocation, readInteractionCsrf, trustedCompletionUrl } = loadModule( + require('node:path').resolve( + import.meta.dirname, + '../../src/views/auth-center/interactionSecurity.ts' + ) +) + +test('validates interaction route and trusted completion URL', () => { + expect(readInteractionCsrf('#csrf=token%2Bvalue&ignored=1')).toBe('token+value') + expect(readInteractionCsrf('#ignored=1')).toBe('') + expect(readInteractionCsrf(null)).toBe('') + expect(interactionRouteLocation('/auth-center/login', 'id/with space')).toBe( + '/auth-center/login?interaction=id%2Fwith%20space' + ) + + const origin = 'https://auth.example.com' + const interactionId = 'interaction-1' + expect( + trustedCompletionUrl('/auth/interaction/interaction-1/complete', origin, interactionId)?.origin + ).toBe(origin) + expect(trustedCompletionUrl('https://evil.example/complete', origin, interactionId)).toBe(null) + expect(trustedCompletionUrl('/auth/interaction/other/complete', origin, interactionId)).toBe(null) + expect( + trustedCompletionUrl('/auth/interaction/interaction-1/complete.evil', origin, interactionId) + ).toBe(null) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.cjs deleted file mode 100644 index 369ec6b14..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.cjs +++ /dev/null @@ -1,45 +0,0 @@ -const assert = require('node:assert/strict') -const { loadModule } = require('../support/load-module.cjs') - -const { splitRegisteredUris, validateRegisteredUri, validateRegisteredUriList } = loadModule( - require('node:path').resolve(__dirname, '../../src/utils/oauthUri.ts') -) - -assert.deepEqual(splitRegisteredUris('https://one.example/cb,\nhttps://two.example/cb'), [ - 'https://one.example/cb', - 'https://two.example/cb', -]) -assert.equal( - validateRegisteredUri('https://portal.example/callback?tenant=one', 'redirect'), - 'https://portal.example/callback?tenant=one' -) -assert.equal( - validateRegisteredUri('http://localhost:8080/callback', 'redirect'), - 'http://localhost:8080/callback' -) -assert.equal( - validateRegisteredUri('https://portal.example', 'cors_origin'), - 'https://portal.example' -) -assert.equal( - validateRegisteredUri('https://portal.example:443', 'cors_origin'), - 'https://portal.example:443' -) -assert.throws(() => validateRegisteredUri('http://portal.example/callback', 'redirect'), /本地开发/) -assert.throws( - () => validateRegisteredUri('https://user@portal.example/callback', 'redirect'), - /用户信息/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/callback#fragment', 'redirect'), - /Fragment/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/logout?token=1', 'backchannel_logout'), - /查询参数/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/', 'cors_origin'), - /协议、主机和端口/ -) -assert.throws(() => validateRegisteredUriList('', 'redirect', true), /至少填写/) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.ts new file mode 100644 index 000000000..3aa324550 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/oauthUri.test.ts @@ -0,0 +1,43 @@ +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) +const { loadModule } = require('../support/load-module.cts') + +const { splitRegisteredUris, validateRegisteredUri, validateRegisteredUriList } = loadModule( + require('node:path').resolve(import.meta.dirname, '../../src/utils/oauthUri.ts') +) + +test('validates OAuth URI registration', () => { + expect(splitRegisteredUris('https://one.example/cb,\nhttps://two.example/cb')).toStrictEqual([ + 'https://one.example/cb', + 'https://two.example/cb', + ]) + expect(validateRegisteredUri('https://portal.example/callback?tenant=one', 'redirect')).toBe( + 'https://portal.example/callback?tenant=one' + ) + expect(validateRegisteredUri('http://localhost:8080/callback', 'redirect')).toBe( + 'http://localhost:8080/callback' + ) + expect(validateRegisteredUri('https://portal.example', 'cors_origin')).toBe( + 'https://portal.example' + ) + expect(validateRegisteredUri('https://portal.example:443', 'cors_origin')).toBe( + 'https://portal.example:443' + ) + expect(() => validateRegisteredUri('http://portal.example/callback', 'redirect')).toThrow( + /本地开发/ + ) + expect(() => validateRegisteredUri('https://user@portal.example/callback', 'redirect')).toThrow( + /用户信息/ + ) + expect(() => + validateRegisteredUri('https://portal.example/callback#fragment', 'redirect') + ).toThrow(/Fragment/) + expect(() => + validateRegisteredUri('https://portal.example/logout?token=1', 'backchannel_logout') + ).toThrow(/查询参数/) + expect(() => validateRegisteredUri('https://portal.example/', 'cors_origin')).toThrow( + /协议、主机和端口/ + ) + expect(() => validateRegisteredUriList('', 'redirect', true)).toThrow(/至少填写/) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.ts similarity index 63% rename from ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.ts index e84dfeb5d..1569a17d2 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/auth-center/vue2-components.test.ts @@ -1,16 +1,20 @@ -const assert = require('node:assert/strict') -const test = require('node:test') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) const path = require('node:path') const Vue = require('vue') const Router = require('vue-router') -const { createLoader } = require('../support/load-module.cjs') +const { createLoader } = require('../support/load-module.cts') -const root = path.resolve(__dirname, '../../src') +const root = path.resolve(import.meta.dirname, '../../src') const settle = async () => { await Vue.nextTick() await new Promise((resolve) => setImmediate(resolve)) } -const component = (load, file) => load(path.join(root, file)).default +const component = ( + load: (file: string) => { default: import('vue').ComponentOptions }, + file: string +) => load(path.join(root, file)).default const notices = { msgSuccess() {}, msgError() {}, confirm: async () => {} } Vue.use(Router) @@ -21,18 +25,18 @@ test('URI 列表使用 Vue 2 input 事件更新父表单,删除最后一行保 propsData: { value: ['https://one.example/cb'] }, }) const state = vm._setupProxy - const values = [] - vm.$on('input', (value) => values.push(value)) + const values: unknown[] = [] + vm.$on('input', (value: unknown) => values.push(value)) state.localItems = [' https://two.example/cb ', ' '] state.emitValue() - assert.deepEqual(values[0], ['https://two.example/cb']) + expect(values[0]).toStrictEqual(['https://two.example/cb']) state.remove(1) state.remove(0) - assert.deepEqual(values.at(-1), []) - assert.deepEqual(Array.from(state.localItems), ['']) + expect(values.at(-1)).toStrictEqual([]) + expect(Array.from(state.localItems)).toStrictEqual(['']) vm.value = ['https://new.example/cb'] await settle() - assert.equal(state.localItems[0], 'https://new.example/cb') + expect(state.localItems[0]).toBe('https://new.example/cb') vm.$destroy() }) @@ -43,25 +47,25 @@ test('密钥弹窗关闭通过 input 同步,重新打开必须重新确认已 propsData: { value: true, secret: {} }, }) const state = vm._setupProxy - const emitted = [] - vm.$on('input', (value) => emitted.push(value)) + const emitted: unknown[] = [] + vm.$on('input', (value: unknown) => emitted.push(value)) state.confirmed = true state.close() - assert.deepEqual(emitted, [false]) + expect(emitted).toStrictEqual([false]) vm.value = false await settle() vm.value = true await settle() - assert.equal(state.confirmed, false) + expect(state.confirmed).toBe(false) vm.$destroy() }) test('独立访问策略可在首次授权前创建,关闭弹层会通知父组件', async () => { - const calls = [] + const calls: unknown[][] = [] const load = createLoader({ '@/api/system/oauthSession': { listOAuthAccessPolicies: async () => ({ rows: [], total: 0 }), - setOAuthClientAccess: async (...args) => { + setOAuthClientAccess: async (...args: unknown[]) => { calls.push(args) }, }, @@ -84,23 +88,25 @@ test('独立访问策略可在首次授权前创建,关闭弹层会通知父 state.accessForm.clientId = ' demo-client ' state.accessForm.reason = ' 验证首次访问控制 ' await state.saveAccess() - assert.deepEqual(calls, [['42', 'demo-client', { blocked: true, reason: '验证首次访问控制' }]]) - assert.equal(changes, 1) - assert.equal(state.accessOpen, false) - const visibility = [] - vm.$on('input', (value) => visibility.push(value)) + expect(calls).toStrictEqual([ + ['42', 'demo-client', { blocked: true, reason: '验证首次访问控制' }], + ]) + expect(changes).toBe(1) + expect(state.accessOpen).toBe(false) + const visibility: boolean[] = [] + vm.$on('input', (value: boolean) => visibility.push(value)) state.visible = false - assert.deepEqual(visibility, [false]) + expect(visibility).toStrictEqual([false]) vm.$destroy() }) test('撤销已过期会话仍提交精确 sid 和原因', async () => { - const calls = [] + const calls: unknown[][] = [] const load = createLoader({ '@/components/OAuthWorkspace/PageFrame.vue': {}, '@/api/system/oauthSession': { listOAuthSessions: async () => ({ rows: [], total: 0 }), - revokeOAuthSessions: async (...args) => { + revokeOAuthSessions: async (...args: unknown[]) => { calls.push(args) }, }, @@ -112,25 +118,25 @@ test('撤销已过期会话仍提交精确 sid 和原因', async () => { }, }) const state = vm._setupProxy - assert.equal(vm.$options.name, 'OAuthSession') + expect(vm.$options.name).toBe('OAuthSession') state.openRevoke({ sid: 'expired-sid', status: 'expired' }) state.reason = ' 结束离线访问 ' await state.revoke() - assert.deepEqual(calls, [['expired-sid', { reason: '结束离线访问' }]]) - assert.equal(state.revokeOpen, false) + expect(calls).toStrictEqual([['expired-sid', { reason: '结束离线访问' }]]) + expect(state.revokeOpen).toBe(false) vm.$destroy() }) test('认证交互恢复已完成流程,失败保留凭据并拒绝非当前交互的完成地址', async () => { - const completed = [], - assigned = [], - replaced = [] + const completed: unknown[][] = [], + assigned: string[] = [], + replaced: unknown[][] = [] const storage = new Map() - let completionError = new Error('完成认证暂时失败') + let completionError: Error | null = new Error('完成认证暂时失败') const load = createLoader( { '@/api/authCenter': { - completeInteraction: async (...args) => { + completeInteraction: async (...args: unknown[]) => { completed.push(args) if (completionError) throw completionError return { data: { redirectUrl: 'https://app.example/callback?code=opaque' } } @@ -139,17 +145,17 @@ test('认证交互恢复已完成流程,失败保留凭据并拒绝非当前 }, { sessionStorage: { - getItem: (key) => storage.get(key), - setItem: (key, value) => storage.set(key, value), - removeItem: (key) => storage.delete(key), + getItem: (key: string) => storage.get(key), + setItem: (key: string, value: string) => storage.set(key, value), + removeItem: (key: string) => storage.delete(key), }, window: { location: { hash: '#csrf=csrf-1', origin: 'https://issuer.example', - assign: (url) => assigned.push(url), + assign: (url: string) => assigned.push(url), }, - history: { state: {}, replaceState: (...args) => replaced.push(args) }, + history: { state: {}, replaceState: (...args: unknown[]) => replaced.push(args) }, }, } ) @@ -159,25 +165,25 @@ test('认证交互恢复已完成流程,失败保留凭据并拒绝非当前 path.join(root, 'views/auth-center/useInteraction.ts') ).useInteractionContext const vm = new Vue({ router, setup: () => useContext() }) - assert.equal(vm.interactionId, 'one') - assert.equal(vm.csrfToken(), 'csrf-1') - assert.equal(replaced[0][2], '/auth-center/login?interaction=one') - await assert.rejects(vm.followServerRedirect('/auth/interaction/other/complete')) - assert.equal(completed.length, 0) - await assert.rejects(vm.goToAction('redirect'), /完成认证暂时失败/) - assert.equal(vm.csrfToken(), 'csrf-1') - assert.equal(assigned.length, 0) + expect(vm.interactionId).toBe('one') + expect(vm.csrfToken()).toBe('csrf-1') + expect(replaced[0][2]).toBe('/auth-center/login?interaction=one') + await expect(vm.followServerRedirect('/auth/interaction/other/complete')).rejects.toThrow() + expect(completed.length).toBe(0) + await expect(vm.goToAction('redirect')).rejects.toThrow(/完成认证暂时失败/) + expect(vm.csrfToken()).toBe('csrf-1') + expect(assigned.length).toBe(0) completionError = null await vm.goToAction('redirect') - assert.deepEqual(completed, [ + expect(completed).toStrictEqual([ ['one', 'csrf-1'], ['one', 'csrf-1'], ]) - assert.equal(assigned.length, 1) - assert.equal(vm.csrfToken(), '') + expect(assigned.length).toBe(1) + expect(vm.csrfToken()).toBe('') await router.replace('/auth-center/login?interaction=two') await settle() - assert.equal(vm.interactionId, 'two') + expect(vm.interactionId).toBe('two') vm.$destroy() }) @@ -215,16 +221,16 @@ test('服务应用切换用户登录方式时同步保存所需响应类型', as state.form.redirectUris = ['https://app.example/callback'] await settle() const withLogin = state.payload() - assert.deepEqual(withLogin.responseTypes, ['code']) - assert.deepEqual(withLogin.grantTypes, ['client_credentials', 'authorization_code']) - assert.deepEqual(withLogin.redirectUris, ['https://app.example/callback']) + expect(withLogin.responseTypes).toStrictEqual(['code']) + expect(withLogin.grantTypes).toStrictEqual(['client_credentials', 'authorization_code']) + expect(withLogin.redirectUris).toStrictEqual(['https://app.example/callback']) Object.assign(state.form, state.toEditor(withLogin)) state.form.grantTypes = ['client_credentials'] await settle() - assert.deepEqual(state.payload().responseTypes, []) + expect(state.payload().responseTypes).toStrictEqual([]) state.form.grantTypes = ['authorization_code', 'refresh_token'] await settle() - assert.deepEqual(state.payload().responseTypes, ['code']) + expect(state.payload().responseTypes).toStrictEqual(['code']) } finally { vm.$destroy() } @@ -234,13 +240,12 @@ test('Vue 2 密码规则保留原有 mixin,同时向认证页提供相同校 const load = createLoader({ '@/plugins/cache': { session: { get: () => '3' } } }) const rule = load(path.join(root, 'utils/passwordRule.ts')) const state = rule.usePasswordRule() - assert.equal(state.pwdChrType.value, '3') + expect(state.pwdChrType.value).toBe('3') const mixin = new Vue(rule.default) - assert.equal( - state.infoPwdValidator.value[2].pattern.source, + expect(state.infoPwdValidator.value[2].pattern.source).toBe( mixin.infoPwdValidator[2].pattern.source ) - assert.equal(state.infoPwdValidator.value[2].pattern.test('onlyletters'), false) - assert.equal(state.infoPwdValidator.value[2].pattern.test('valid123'), true) + expect(state.infoPwdValidator.value[2].pattern.test('onlyletters')).toBe(false) + expect(state.infoPwdValidator.value[2].pattern.test('valid123')).toBe(true) mixin.$destroy() }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.ts similarity index 52% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.ts index f8324e6f1..97a51177e 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/charts.test.ts @@ -1,14 +1,13 @@ -import assert from 'node:assert/strict' import { fileURLToPath } from 'node:url' import { createRequire } from 'node:module' -import { test } from 'node:test' +import { expect, test } from 'vitest' const require = createRequire(import.meta.url) const Vue = require('vue') -const { i18n } = require('./test-runtime.cjs') +const { i18n } = require('./test-runtime.ts') -function loadChart(name) { - const { createLoader } = require('../support/load-module.cjs') +function loadChart(name: string) { + const { createLoader } = require('../support/load-module.cts') const load = createLoader({ './mixins/resize': {}, echarts: {}, 'echarts/theme/macarons': {} }) return load(fileURLToPath(new URL(`../../src/views/dashboard/${name}.vue`, import.meta.url))) .default @@ -17,35 +16,41 @@ function loadChart(name) { test('mounted charts refresh translated labels and preserve numeric series', async () => { for (const name of ['LineChart', 'RaddarChart', 'PieChart', 'BarChart']) { await i18n.setPreference('zh-CN') - const options = [] + type ChartAxis = { data: string[] } + type ChartOptions = { + xAxis: ChartAxis | ChartAxis[] + radar: { indicator: { name: string }[] } + series: { name: string; data: (number | { value: number[] })[] }[] + } + const options: ChartOptions[] = [] const definition = loadChart(name) const vm = new Vue({ ...definition, propsData: { chartData: { expectedData: [1, 2], actualData: [3, 4] } }, }) - vm.chart = { setOption: (option) => options.push(option), dispose() {} } + vm.chart = { setOption: (option: ChartOptions) => options.push(option), dispose() {} } if (name === 'LineChart') vm.setOptions(vm.chartData) else vm.setOptions() - const initial = options.at(-1) + const initial = options[options.length - 1] await i18n.setPreference('en-US') await Vue.nextTick() - assert.equal(options.length, 2, name) - const translated = options.at(-1) - const values = (option) => + expect(options.length, name).toBe(2) + const translated = options[options.length - 1] + const values = (option: ChartOptions) => option.series.map((series) => series.data.map((entry) => (typeof entry === 'number' ? entry : entry.value)) ) - assert.deepEqual(values(translated), values(initial), name) + expect(values(translated), name).toStrictEqual(values(initial)) if (name === 'RaddarChart') { - assert.equal(initial.radar.indicator[0].name, '销售') - assert.equal(translated.radar.indicator[0].name, 'Sales') + expect(initial.radar.indicator[0].name).toBe('销售') + expect(translated.radar.indicator[0].name).toBe('Sales') } else if (name === 'PieChart') { - assert.equal(initial.series[0].name, '每周文章') - assert.equal(translated.series[0].name, 'Weekly articles') + expect(initial.series[0].name).toBe('每周文章') + expect(translated.series[0].name).toBe('Weekly articles') } else { const axis = Array.isArray(translated.xAxis) ? translated.xAxis[0] : translated.xAxis - assert.equal(axis.data[0], 'Mon') - assert.notEqual(initial.series[0].name, translated.series[0].name) + expect(axis.data[0]).toBe('Mon') + expect(initial.series[0].name).not.toBe(translated.series[0].name) } vm.$destroy() } diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.ts similarity index 62% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.ts index ae081a2ad..9c4b00d1b 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/code-preview.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import hljs from 'highlight.js/lib/core' import json from 'highlight.js/lib/languages/json' import python from 'highlight.js/lib/languages/python' @@ -17,23 +16,22 @@ test('generated JSON locale files have distinct readable tabs and valid highligh 'frontend/src/i18n/locales/zh-CN/demo.json', 'frontend/src/i18n/locales/en-US/demo.json', ] - assert.notEqual(previewFileLabel(paths[0]), previewFileLabel(paths[1])) - assert.equal(previewFileLabel(paths[0]), paths[0]) + expect(previewFileLabel(paths[0])).not.toBe(previewFileLabel(paths[1])) + expect(previewFileLabel(paths[0])).toBe(paths[0]) const highlighted = highlightPreviewCode( '{"title":""}', paths[0], hljs ) - assert.match(highlighted, /<img/) - assert.doesNotMatch(highlighted, / { for (const locale of ['zh-CN', 'en-US']) { - assert.equal( - previewFileLabel(`backend/i18n/catalogs/${locale}/LC_MESSAGES/core/generated.demo.item.po`), - `${locale}/core/generated.demo.item.po` - ) + expect( + previewFileLabel(`backend/i18n/catalogs/${locale}/LC_MESSAGES/core/generated.demo.item.po`) + ).toBe(`${locale}/core/generated.demo.item.po`) } }) @@ -42,20 +40,18 @@ test('Python template remains the initial tab with its actual unique key', () => 'frontend/src/i18n/locales/en-US/demo.json': '{}', 'python/do.py.jinja2': 'class Demo: pass', } - assert.equal(initialPreviewFile(files), 'python/do.py.jinja2') - assert.equal(previewFileLabel('python/do.py.jinja2'), 'do.py') - assert.match( - highlightPreviewCode(files['python/do.py.jinja2'], 'python/do.py.jinja2', hljs), + expect(initialPreviewFile(files)).toBe('python/do.py.jinja2') + expect(previewFileLabel('python/do.py.jinja2')).toBe('do.py') + expect(highlightPreviewCode(files['python/do.py.jinja2'], 'python/do.py.jinja2', hljs)).toMatch( /class/ ) - assert.equal(initialPreviewFile({ 'new/README.md': 'text' }), 'new/README.md') - assert.equal(initialPreviewFile({}), '') + expect(initialPreviewFile({ 'new/README.md': 'text' })).toBe('new/README.md') + expect(initialPreviewFile({})).toBe('') }) test('unsupported preview formats render escaped text without throwing or injecting HTML', () => { for (const path of ['README.md', 'README.constructor', 'README.__proto__']) { - assert.equal( - highlightPreviewCode('', path, hljs), + expect(highlightPreviewCode('', path, hljs)).toBe( '<script>&</script>' ) } diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.ts similarity index 68% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.ts index 460d6b9cc..f7405d033 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/dict-cache.test.ts @@ -1,31 +1,30 @@ -import assert from 'node:assert/strict' import { fileURLToPath } from 'node:url' import { createRequire } from 'node:module' -import { test } from 'node:test' +import { expect, test } from 'vitest' const require = createRequire(import.meta.url) const Vue = require('vue') const Vuex = require('vuex') Vue.use(Vuex) -const { createLoader } = require('../support/load-module.cjs') -const source = (path) => fileURLToPath(new URL(`../../src/${path}`, import.meta.url)) +const { createLoader } = require('../support/load-module.cts') +const source = (path: string) => fileURLToPath(new URL(`../../src/${path}`, import.meta.url)) test('dictionary consumers retain their array and ignore late responses after invalidation or logout', async () => { - let token = 'account-one' - const requests = [] + let token: string | null = 'account-one' + const requests: Array<(value: unknown) => void> = [] const load = createLoader({ '@/api/system/dict/data': { getDicts: () => new Promise((resolve) => requests.push(resolve)) }, '@/utils/auth': { getToken: () => token }, - '@/i18n/adapter': { resolveText: (text) => text }, + '@/i18n/adapter': { resolveText: (text: string) => text }, }) const module = load(source('store/modules/dict.ts')).default const store = new Vuex.Store({ modules: { dict: module } }) const DictData = load(source('utils/dict/DictData.ts')).default const DictMeta = { - parse: (type) => ({ + parse: (type: string) => ({ type, request: () => store.dispatch('dict/loadDict', type), - responseConverter: (rows) => + responseConverter: (rows: Array<{ dictLabel: string; dictValue: string }>) => rows.map((row) => new DictData(row.dictLabel, row.dictValue, row)), }), } @@ -33,7 +32,7 @@ test('dictionary consumers retain their array and ignore late responses after in './DictOptions': { mergeOptions() {} }, './DictData': { __esModule: true, default: DictData }, './DictMeta': { __esModule: true, default: DictMeta }, - '@/utils/ruoyi': { mergeRecursive: (_defaults, options) => options }, + '@/utils/ruoyi': { mergeRecursive: (_defaults: unknown, options: unknown) => options }, }) const install = loadDict(source('utils/dict/index.ts')).default const LocalVue = Vue.extend() @@ -41,18 +40,18 @@ test('dictionary consumers retain their array and ignore late responses after in const first = new LocalVue({ store, dicts: ['status'] }) const second = new LocalVue({ store, dicts: ['status'] }) const held = first.dict.type.status - assert.equal(requests.length, 1) + expect(requests.length).toBe(1) store.commit('dict/REMOVE_DICT', 'status') await Vue.nextTick() - assert.equal(requests.length, 2) + expect(requests.length).toBe(2) requests[1]({ data: [{ dictLabel: 'new', dictLabelI18n: { 'en-US': 'New' }, dictValue: '1' }] }) await new Promise(setImmediate) - assert.equal(held[0].label, 'new') - assert.equal(second.dict.type.status[0].label, 'new') + expect(held[0].label).toBe('new') + expect(second.dict.type.status[0].label).toBe('new') requests[0]({ data: [{ dictLabel: 'old', dictLabelI18n: {}, dictValue: '1' }] }) await new Promise(setImmediate) - assert.equal(held[0].label, 'new') - assert.equal(first.dict.type.status, held, 'existing consumer references stay attached') + expect(held[0].label).toBe('new') + expect(first.dict.type.status, 'existing consumer references stay attached').toBe(held) store.commit('dict/REMOVE_DICT', 'status') await Vue.nextTick() token = null @@ -60,8 +59,8 @@ test('dictionary consumers retain their array and ignore late responses after in await Vue.nextTick() requests[2]({ data: [{ dictLabel: 'old account', dictValue: '1' }] }) await new Promise(setImmediate) - assert.equal(held.length, 0) - assert.equal(requests.length, 3) + expect(held.length).toBe(0) + expect(requests.length).toBe(3) first.$destroy() second.$destroy() }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/message-shapes.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.ts similarity index 79% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/message-shapes.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.ts index e24dbafc8..47f2ed281 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/message-shapes.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/message-shapes.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { mkdtemp, mkdir, writeFile, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { dirname, join, sep } from 'node:path' @@ -9,12 +8,12 @@ import { checkLocaleRegistration } from '../../scripts/check-i18n.mjs' async function fixture() { const root = await mkdtemp(join(tmpdir(), 'ruoyi-message-shapes-')) const url = pathToFileURL(root + sep) - const write = async (file, content) => { + const write = async (file: string, content: string) => { const path = join(root, file) await mkdir(dirname(path), { recursive: true }) await writeFile(path, content) } - const metadata = (codes) => ({ + const metadata = (codes: string[]) => ({ sourceLocale: 'zh-CN', defaultLocale: 'zh-CN', locales: codes.map((code) => ({ @@ -53,7 +52,7 @@ const dynamic = 'common:' + name; t(dynamic);` ` ` ) - assert.deepEqual(await checkLocaleRegistration(url), [ + expect(await checkLocaleRegistration(url)).toStrictEqual([ { name: 'host', locales: ['zh-CN', 'en-US'] }, { name: 'plugin.example', locales: ['zh-CN'] }, ]) @@ -81,12 +80,14 @@ for (const locale of ['zh-CN', 'en-US']) { 'src/views/tool/build/Example.vue', `` ) - await assert.rejects(checkLocaleRegistration(url), (error) => { - assert.match(error.message, /Invalid translation message shape/) - assert.ok(error.message.includes(`common:invalid resolves to ${shape} in ${locale}`)) - assert.ok(error.message.includes('src/script.js:1')) - assert.ok(error.message.includes('src/views/tool/build/Example.vue:1')) - assert.equal(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN'), false) + await expect(checkLocaleRegistration(url)).rejects.toSatisfy((error) => { + expect(error.message).toMatch(/Invalid translation message shape/) + expect( + error.message.includes(`common:invalid resolves to ${shape} in ${locale}`) + ).toBeTruthy() + expect(error.message.includes('src/script.js:1')).toBeTruthy() + expect(error.message.includes('src/views/tool/build/Example.vue:1')).toBeTruthy() + expect(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN')).toBe(false) return true }) } finally { diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.ts similarity index 69% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.ts index 22fb21172..24677c73a 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/navigation.test.ts @@ -1,7 +1,6 @@ -import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' import { createRequire } from 'node:module' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { withLocalePatch } from '../../src/utils/localePayload.ts' import { restoreVisitedViews, serializeVisitedViews } from '../../src/utils/tagsView.ts' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' @@ -11,7 +10,9 @@ const require = createRequire(import.meta.url) const Vue = require('vue') const VueRouter = require('vue-router') Vue.use(VueRouter) -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) +const meta = JSON.parse( + readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url), 'utf8') +) const i18n = createLocaleRuntime({ meta, resources: { @@ -22,7 +23,7 @@ const i18n = createLocaleRuntime({ scope: 'test', deviceLocales: () => ['zh-CN'], }) -const { createLoader } = require('../support/load-module.cjs') +const { createLoader } = require('../support/load-module.cts') const { fileURLToPath } = require('node:url') const load = createLoader({ './index': { i18n } }) const adapter = load(fileURLToPath(new URL('../../src/i18n/adapter.ts', import.meta.url))) @@ -61,22 +62,22 @@ test('route and dictionary labels react without changing the route, input or val title() { return adapter.resolveRouteTitle(route) }, - label() { + label(this: { option: { label: string } }) { return this.option.label }, }, }) - assert.equal(vm.title, '菜单') - assert.equal(vm.label, '正常') + expect(vm.title).toBe('菜单') + expect(vm.label).toBe('正常') await i18n.setPreference('en-US') await Vue.nextTick() - assert.equal(vm.title, 'Menu') - assert.equal(vm.label, 'Active') - assert.equal(option.value, '0') - assert.equal(route.query.tab, 'profile') - assert.equal(vm.input, '未保存') + expect(vm.title).toBe('Menu') + expect(vm.label).toBe('Active') + expect(option.value).toBe('0') + expect(route.query.tab).toBe('profile') + expect(vm.input).toBe('未保存') await i18n.setPreference('zh-CN') - assert.equal(vm.label, '正常') + expect(vm.label).toBe('正常') vm.$destroy() }) @@ -87,48 +88,47 @@ test('persisted tabs restore current metadata and explicit custom titles', () => instance.resolve('/index').route, { ...original, customTitle: 'User title' }, ]) - assert.equal(snapshot.views.length, 1) - assert.ok(!('title' in snapshot.views[0]) && !('meta' in snapshot.views[0])) + expect(snapshot.views.length).toBe(1) + expect(!('title' in snapshot.views[0]) && !('meta' in snapshot.views[0])).toBeTruthy() const restored = restoreVisitedViews(snapshot, (location) => instance.resolve(location).route) - assert.equal(restored[0].customTitle, 'User title') - assert.equal(restored[0].params.id, '7') - assert.equal(restored[0].hash, '#details') + expect(restored[0].customTitle).toBe('User title') + expect(restored[0].params.id).toBe('7') + expect(restored[0].hash).toBe('#details') }) test('locale patches preserve omitted languages and distinguish updates from deletion', () => { - assert.deepEqual( - withLocalePatch({ menuName: '菜单', menuNameI18n: { 'en-US': 'Old', ja: '旧' } }), - { menuName: '菜单' } - ) - assert.deepEqual( + expect( + withLocalePatch({ menuName: '菜单', menuNameI18n: { 'en-US': 'Old', ja: '旧' } }) + ).toStrictEqual({ menuName: '菜单' }) + expect( withLocalePatch({ dictLabel: '正常', dictLabelI18n: { 'en-US': 'Active', ja: '有効' }, dictLabelI18nPatch: { 'en-US': 'Enabled', ja: null }, - }), - { dictLabel: '正常', dictLabelI18n: { 'en-US': 'Enabled', ja: null } } - ) + }) + ).toStrictEqual({ dictLabel: '正常', dictLabelI18n: { 'en-US': 'Enabled', ja: null } }) }) test('a locale change revalidates only fields already displaying errors', () => { - let mixin + type LocaleMixin = { watch: { '$locale.locale': (this: typeof form) => void } } + let mixin!: LocaleMixin LocaleForms.install({ - mixin(value) { + mixin(value: LocaleMixin) { mixin = value }, - }) - const calls = [] + } as unknown as Parameters[0]) + const calls: string[] = [] const form = { $options: { name: 'ElForm' }, - $nextTick: (fn) => fn(), + $nextTick: (fn: () => void) => fn(), fields: [ - { validateState: 'error', validate: (...args) => calls.push(args[0]) }, - { validateState: '', validate: () => assert.fail('untouched field validated') }, - { validateState: 'success', validate: () => assert.fail('valid field validated') }, + { validateState: 'error', validate: (trigger: string) => calls.push(trigger) }, + { validateState: '', validate: () => expect.fail('untouched field validated') }, + { validateState: 'success', validate: () => expect.fail('valid field validated') }, ], } mixin.watch['$locale.locale'].call(form) - assert.deepEqual(calls, ['']) + expect(calls).toStrictEqual(['']) }) test('a plugin translator tracks Vue computed text without replacing its draft', async () => { @@ -146,11 +146,11 @@ test('a plugin translator tracks Vue computed text without replacing its draft', }) await i18n.setPreference('zh-CN') await Vue.nextTick() - assert.equal(vm.title, '插件标题') + expect(vm.title).toBe('插件标题') await i18n.setPreference('en-US') await Vue.nextTick() - assert.equal(vm.title, 'Plugin title') - assert.equal(vm.draft, 'unsaved') + expect(vm.title).toBe('Plugin title') + expect(vm.draft).toBe('unsaved') plugin.removePluginLocales() vm.$destroy() }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.ts similarity index 60% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.ts index f6763d17e..ce6198c94 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.ts @@ -1,12 +1,12 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' import { createPluginLocaleRuntime } from '../../src/i18n/plugin.ts' -const entry = (code, fallback = []) => ({ +const entry = (code: string, fallback: string[] = []) => ({ code, + nativeName: code, enabled: true, - direction: 'ltr', + direction: 'ltr' as const, aliases: [], fallback, }) @@ -21,11 +21,11 @@ function hostRuntime() { resources: Object.fromEntries( hostMeta.locales.map(({ code }) => [code, { common: { hello: code } }]) ), - storage: { get() {}, set() {} }, + storage: { get: () => null, set() {} }, scope: 'plugin-test', }) } -function plugin(host, namespace = 'plugin.demo') { +function plugin(host: ReturnType, namespace = 'plugin.demo') { return createPluginLocaleRuntime({ host, namespace, @@ -46,18 +46,18 @@ test('source plugins resolve the host language using only their own defaults and const host = hostRuntime() const first = plugin(host) const second = plugin(host, 'plugin.other') - assert.equal(first.t('hello'), '你好') + expect(first.t('hello')).toBe('你好') await host.setPreference('en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('hello')).toBe('Hello') + expect(first.t('sourceOnly')).toBe('源语言') await host.setPreference('ja-JP') - assert.equal(host.locale, 'ja-JP') - assert.equal(host.headers['Accept-Language'], 'ja-JP') - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(host.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.other'), false) - assert.equal(second.t('hello'), 'Hello') + expect(host.locale).toBe('ja-JP') + expect(host.headers['Accept-Language']).toBe('ja-JP') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') + expect(host.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(first.engine.hasResourceBundle('en-US', 'plugin.other')).toBe(false) + expect(second.t('hello')).toBe('Hello') }) test('unregistering and registering a plugin changes only its instance and preserves its catalogs', async () => { @@ -66,15 +66,15 @@ test('unregistering and registering a plugin changes only its instance and prese const second = plugin(host, 'plugin.other') first.removePluginLocales() await host.setPreference('en-US') - assert.equal(first.locale, 'zh-CN') - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(second.t('hello'), 'Hello') - assert.equal(host.t('common:hello'), 'en-US') + expect(first.locale).toBe('zh-CN') + expect(first.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(second.t('hello')).toBe('Hello') + expect(host.t('common:hello')).toBe('en-US') first.registerPluginLocales() first.registerPluginLocales() - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') first.removePluginLocales() first.registerPluginLocales() - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('sourceOnly')).toBe('源语言') }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.ts similarity index 84% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.ts index 21dbc85c3..8770e8107 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/project-tooling.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, mkdir, writeFile, readFile, access, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -12,11 +12,11 @@ const plugin = new URL('../../scripts/x18n-project.mjs', import.meta.url).href test('the CLI creates isolated plugin catalogs and scans the form designer source directory', async () => { const root = await mkdtemp(join(tmpdir(), 'vue2-x18n-project-')) - const run = (...args) => { + const run = (...args: string[]) => { const result = spawnSync(process.execPath, [cli, '--root', root, ...args, '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + return { status: result.status, report: JSON.parse(result.stdout) as CliReport } } try { await writeFile( @@ -50,27 +50,26 @@ export default { }) ) const applied = run('apply', payload) - assert.equal(applied.status, 0, JSON.stringify(applied.report.errors)) - assert.deepEqual( - JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')), - { reply: 'Reply' } - ) - await assert.rejects(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))) + expect(applied.status, JSON.stringify(applied.report.errors)).toBe(0) + expect( + JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')) + ).toStrictEqual({ reply: 'Reply' }) + await expect(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))).rejects.toThrow() const checked = run('check') - assert.equal(checked.status, 1) - assert.ok( + expect(checked.status).toBe(1) + expect( checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'common:designerMissing' && item.file === 'src/views/tool/build/Example.vue' ) - ) - assert.ok( + ).toBeTruthy() + expect( !checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'plugin.ai:reply' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs deleted file mode 100644 index 55e80954e..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readFileSync } from 'node:fs' -import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' - -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) -const resources = { - 'zh-CN': { common: { sample: '中文' } }, - 'en-US': { common: { sample: 'English' } }, -} -function setup(storage = { get: () => null, set: () => {} }, extra = {}) { - return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra }) -} -const key = 'contract:api:locale:v2:user:7' - -test('declared language families preserve exact variants', () => { - const registry = createLocaleRegistry(meta, resources) - assert.equal(registry.resolve('auto', ['en-GB']), 'en-US') - assert.equal(registry.resolve('auto', ['en-AU']), 'en-US') - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }], - } - const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) - assert.equal(precise.resolve('en-GB'), 'en-GB') - assert.equal(precise.resolve('zh-TW'), 'en-US') - assert.throws( - () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources), - /Invalid language fallback/ - ) -}) - -test('source language supplies missing text independently of the negotiation default', async () => { - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - assert.equal(runtime.registry.resolve('unknown'), 'en-US') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), '中文') - assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称') -}) - -test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { - const data = new Map() - const events = [] - const storage = { - get: (k) => data.get(k), - set: (k, v) => { - data.set(k, v) - events.push([k, v]) - }, - } - const a = setup(storage), - b = setup(storage) - a.setAccount(7, 'zh-CN', '0') - b.setAccount(7, 'zh-CN', '0') - let release - let server = { locale: 'zh-CN', revision: '0' } - const delayed = a.setPreference('en-US', { - save: async () => { - server = { locale: 'en-US', revision: '1' } - const response = { ...server } - await new Promise((resolve) => { - release = resolve - }) - return response - }, - }) - await Promise.resolve() - await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) - a.acceptStorageEvent(key, data.get(key)) - const writes = events.length - release() - await delayed - assert.deepEqual(server, { locale: 'auto', revision: '2' }) - assert.equal(a.preference, 'auto') - assert.equal(b.preference, 'auto') - assert.equal(events.length, writes) - assert.deepEqual(JSON.parse(data.get(key)), server) -}) - -test('out-of-order storage and profile reads preserve the latest decimal revision', () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '9007199254740993') - const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) - data.set(key, old) - runtime.acceptStorageEvent(key, old) - runtime.setAccount(7, 'zh-CN', '9007199254740992') - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '9007199254740993') - assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '9007199254740993') -}) - -test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'en-US', revision: '2' }), - }) - assert.equal(runtime.preferenceRevision, '2') - await assert.rejects( - runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }), - /Invalid locale snapshot/ - ) - assert.equal(runtime.preference, 'en-US') -}) - -test('offline account snapshots and API instances are isolated', async () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '1') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '1') - restored.setAccount(8, 'zh-CN', '0') - restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) - assert.equal(restored.preference, 'zh-CN') - restored.setAccount(null) - assert.equal(restored.preference, 'zh-CN') - assert.equal(restored.loginPreference, null) - const other = setup(storage, { scope: 'other:api' }) - other.initialize(true) - assert.equal(other.accountId, null) - assert.equal(other.preference, 'zh-CN') -}) - -test('refreshing the same account does not cancel a pending save', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '0') - let finish - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - finish = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(7, 'zh-CN', '0') - finish({ locale: 'en-US', revision: '1' }) - await pending - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '1') -}) - -test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'auto', revision: '3' }), - }), - /timeout/ - ) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.preferenceRevision, '3') -}) - -test('invalid profile snapshots leave the current account and its revision intact', () => { - const runtime = setup() - runtime.setAccount(7, 'en-US', '4') - assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/) - assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/) - assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/) - assert.equal(runtime.accountId, '7') - assert.equal(runtime.preferenceRevision, '4') - assert.equal(runtime.preference, 'en-US') -}) - -test('dynamic names keep the database source when an application uses English source catalogs', async () => { - const expanded = { - ...meta, - sourceLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - const translations = { 'en-US': 'Users' } - await runtime.setPreference('en-US') - assert.equal(runtime.resolveText('用户管理', translations), 'Users') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), 'English') - assert.equal(runtime.resolveText('用户管理', translations), '用户管理') -}) - -test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => { - const warn = ctx.mock.method(console, 'warn', () => {}) - const runtime = setup(undefined, { - appVersion: '2.0.0', - resources: { - ...resources, - 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, - }, - }) - const t = runtime.engine.getFixedT('en-US', 'layout') - const options = { name: 'Private name' } - assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name') - assert.equal(t('missing', options), 'Text unavailable') - assert.equal(warn.mock.callCount(), 1) - assert.deepEqual(warn.mock.calls[0].arguments, [ - 'Missing translation', - { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, - ]) -}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.ts new file mode 100644 index 000000000..5d80cd1a7 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/protocol.test.ts @@ -0,0 +1,262 @@ +import { expect, test, vi } from 'vitest' +import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' + +import localeMetadata from '../../src/i18n/locale-meta.json' +const resources = { + 'zh-CN': { common: { sample: '中文' } }, + 'en-US': { common: { sample: 'English' } }, +} +type RuntimeOptions = Parameters[0] +function setup( + storage: RuntimeOptions['storage'] = { get: () => null, set: () => {} }, + extra: Partial = {} +) { + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'contract:api', + storage, + ...extra, + }) +} +const key = 'contract:api:locale:v2:user:7' + +test('declared language families preserve exact variants', () => { + const registry = createLocaleRegistry(localeMetadata, resources) + expect(registry.resolve('auto', ['en-GB'])).toBe('en-US') + expect(registry.resolve('auto', ['en-AU'])).toBe('en-US') + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'en-GB', + nativeName: 'British English', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: ['en-US'], + }, + ], + } + const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) + expect(precise.resolve('en-GB')).toBe('en-GB') + expect(precise.resolve('zh-TW')).toBe('en-US') + expect(() => + createLocaleRegistry({ ...localeMetadata, languageFallbacks: { en: 'missing' } }, resources) + ).toThrow(/Invalid language fallback/) +}) + +test('source language supplies missing text independently of the negotiation default', async () => { + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: [], + }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + expect(runtime.registry.resolve('unknown')).toBe('en-US') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('中文') + expect(runtime.resolveText('原始名称', { 'en-US': 'English name' })).toBe('原始名称') +}) + +test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { + const data = new Map() + const events: [string, string][] = [] + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => { + data.set(k, v) + events.push([k, v]) + }, + } + const a = setup(storage), + b = setup(storage) + a.setAccount(7, 'zh-CN', '0') + b.setAccount(7, 'zh-CN', '0') + const gate = Promise.withResolvers() + let server = { locale: 'zh-CN', revision: '0' } + const delayed = a.setPreference('en-US', { + save: async () => { + server = { locale: 'en-US', revision: '1' } + const response = { ...server } + await gate.promise + return response + }, + }) + await Promise.resolve() + await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) + a.acceptStorageEvent(key, data.get(key) ?? null) + const writes = events.length + gate.resolve() + await delayed + expect(server).toStrictEqual({ locale: 'auto', revision: '2' }) + expect(a.preference).toBe('auto') + expect(b.preference).toBe('auto') + expect(events.length).toBe(writes) + expect(JSON.parse(data.get(key) ?? 'null')).toStrictEqual(server) +}) + +test('out-of-order storage and profile reads preserve the latest decimal revision', () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '9007199254740993') + const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) + data.set(key, old) + runtime.acceptStorageEvent(key, old) + runtime.setAccount(7, 'zh-CN', '9007199254740992') + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('9007199254740993') + expect(JSON.parse(data.get(key) ?? 'null')?.revision).toBe('9007199254740993') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('9007199254740993') +}) + +test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'en-US', revision: '2' }), + }) + expect(runtime.preferenceRevision).toBe('2') + await expect( + runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }) + ).rejects.toThrow(/Invalid locale snapshot/) + expect(runtime.preference).toBe('en-US') +}) + +test('offline account snapshots and API instances are isolated', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '1') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('1') + restored.setAccount(8, 'zh-CN', '0') + restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) + expect(restored.preference).toBe('zh-CN') + restored.setAccount(null) + expect(restored.preference).toBe('zh-CN') + expect(restored.loginPreference).toBe(null) + const other = setup(storage, { scope: 'other:api' }) + other.initialize(true) + expect(other.accountId).toBe(null) + expect(other.preference).toBe('zh-CN') +}) + +test('refreshing the same account does not cancel a pending save', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '0') + const save = Promise.withResolvers<{ locale: string; revision: string }>() + const pending = runtime.setPreference('en-US', { + save: () => save.promise, + }) + await Promise.resolve() + runtime.setAccount(7, 'zh-CN', '0') + save.resolve({ locale: 'en-US', revision: '1' }) + await pending + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('1') +}) + +test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'auto', revision: '3' }), + }) + ).rejects.toThrow(/timeout/) + expect(runtime.preference).toBe('auto') + expect(runtime.preferenceRevision).toBe('3') +}) + +test('invalid profile snapshots leave the current account and its revision intact', () => { + const runtime = setup() + runtime.setAccount(7, 'en-US', '4') + expect(() => Reflect.apply(runtime.setAccount, runtime, [undefined, 'zh-CN', '4'])).toThrow( + /Missing locale account/ + ) + expect(() => Reflect.apply(runtime.setAccount, runtime, [8, 'zh-CN', 4])).toThrow( + /Invalid locale snapshot/ + ) + expect(() => runtime.setAccount(8, 'zh-CN')).toThrow(/Invalid locale snapshot/) + expect(runtime.accountId).toBe('7') + expect(runtime.preferenceRevision).toBe('4') + expect(runtime.preference).toBe('en-US') +}) + +test('dynamic names keep the database source when an application uses English source catalogs', async () => { + const expanded = { + ...localeMetadata, + sourceLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { code: 'ja-JP', nativeName: '日本語', direction: 'ltr', enabled: true, fallback: [] }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + const translations = { 'en-US': 'Users' } + await runtime.setPreference('en-US') + expect(runtime.resolveText('用户管理', translations)).toBe('Users') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('English') + expect(runtime.resolveText('用户管理', translations)).toBe('用户管理') +}) + +test('a missing key keeps explicit fallback text or uses a safe label and reports only once', ({ + onTestFinished, +}) => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) + onTestFinished(() => warn.mockRestore()) + const runtime = setup(undefined, { + appVersion: '2.0.0', + resources: { + ...resources, + 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, + }, + }) + const t = runtime.engine.getFixedT('en-US', 'layout') + const options = { name: 'Private name' } + expect(t('missing', { ...options, defaultValue: 'Hello {{name}}' })).toBe('Hello Private name') + expect(t('missing', options)).toBe('Text unavailable') + expect(warn.mock.calls.length).toBe(1) + expect(warn.mock.calls[0]).toStrictEqual([ + 'Missing translation', + { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.ts similarity index 52% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.ts index 3cf100322..f8cb922c1 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/runtime.test.ts @@ -1,46 +1,46 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { readFileSync } from 'node:fs' import { createLocaleRuntime, createLocaleRegistry, normalizeLocale, } from '../../src/i18n/runtime.ts' -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) +import localeMetadata from '../../src/i18n/locale-meta.json' const resources = Object.fromEntries( - meta.locales.map(({ code }) => [ + localeMetadata.locales.map(({ code }) => [ code, { common: JSON.parse( - readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url)) + readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url), 'utf8') ), }, ]) ) -function setup(extra = {}) { - const data = new Map() +type RuntimeOptions = Parameters[0] +function setup(extra: Partial = {}) { + const data = new Map() return createLocaleRuntime({ - meta, + meta: localeMetadata, resources, scope: 'test:api', - storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }, + storage: { get: (k) => data.get(k) ?? null, set: (k, v) => data.set(k, v) }, ...extra, }) } test('canonical locales, explicit aliases, and precise region fallback', () => { const runtime = setup() - assert.equal(normalizeLocale('en_us'), 'en-US') - assert.equal(normalizeLocale('../en'), null) - assert.equal(normalizeLocale('x-acme'), 'x-acme') - assert.equal(runtime.registry.resolve('en'), 'en-US') - assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN') - assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US') + expect(normalizeLocale('en_us')).toBe('en-US') + expect(normalizeLocale('../en')).toBe(null) + expect(normalizeLocale('x-acme')).toBe('x-acme') + expect(runtime.registry.resolve('en')).toBe('en-US') + expect(runtime.registry.resolve('zh-TW')).toBe('zh-CN') + expect(runtime.registry.resolve('auto', ['ja-JP', 'en-US'])).toBe('en-US') }) test('third language is configured, not a two-language branch', async () => { const expanded = { - ...meta, + ...localeMetadata, locales: [ - ...meta.locales, + ...localeMetadata.locales, { code: 'ja-JP', nativeName: '日本語', @@ -56,76 +56,76 @@ test('third language is configured, not a two-language branch', async () => { resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, }) await runtime.setPreference('ja-JP') - assert.equal(runtime.locale, 'ja-JP') - assert.equal(runtime.t('common:language'), '言語') - assert.equal(runtime.headers['Accept-Language'], 'ja-JP') - assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name') + expect(runtime.locale).toBe('ja-JP') + expect(runtime.t('common:language')).toBe('言語') + expect(runtime.headers['Accept-Language']).toBe('ja-JP') + expect(runtime.resolveText('原名', { 'en-US': 'Fallback name' })).toBe('Fallback name') }) test('save failure leaves active language and preference intact', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - await assert.rejects( + await expect( runtime.setPreference('en-US', { save: async () => { throw Error('network') }, }) - ) - assert.equal(runtime.locale, 'zh-CN') - assert.equal(runtime.preference, 'zh-CN') + ).rejects.toThrow() + expect(runtime.locale).toBe('zh-CN') + expect(runtime.preference).toBe('zh-CN') }) test('an old save cannot overwrite a new account', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - let done + const save = Promise.withResolvers() const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - done = resolve - }), + save: () => save.promise, }) await Promise.resolve() runtime.setAccount(2, 'zh-CN', '0') - done() - await assert.rejects(pending) - assert.equal(runtime.accountId, '2') - assert.equal(runtime.locale, 'zh-CN') + save.resolve() + await expect(pending).rejects.toThrow() + expect(runtime.accountId).toBe('2') + expect(runtime.locale).toBe('zh-CN') }) test('an explicit login choice survives reload and is consumed only by a matching login', async () => { - const data = new Map() - const storage = { get: (key) => data.get(key), set: (key, value) => data.set(key, value) } + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (key) => data.get(key) ?? null, + set: (key, value) => data.set(key, value), + } const runtime = setup({ storage }) await runtime.setPreference('en-US') const submitted = runtime.loginPreference await runtime.setPreference('auto') runtime.confirmLoginPreference(submitted) - assert.equal(runtime.loginPreference, 'auto') + expect(runtime.loginPreference).toBe('auto') const reloaded = setup({ storage }) reloaded.initialize(false) - assert.equal(reloaded.preference, 'auto') - assert.equal(reloaded.loginPreference, 'auto') + expect(reloaded.preference).toBe('auto') + expect(reloaded.loginPreference).toBe('auto') reloaded.confirmLoginPreference('auto') reloaded.setAccount(1, 'auto', '1') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.loginPreference).toBe(null) await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) reloaded.setAccount(null) - assert.equal(reloaded.preference, 'en-US') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.preference).toBe('en-US') + expect(reloaded.loginPreference).toBe(null) const next = setup({ storage }) next.initialize(false) - assert.equal(next.preference, 'en-US') - assert.equal(next.loginPreference, null) + expect(next.preference).toBe('en-US') + expect(next.loginPreference).toBe(null) next.setAccount(2, 'fr-CA', '0') - assert.equal(next.preference, 'fr-CA') - assert.equal(next.locale, 'zh-CN') + expect(next.preference).toBe('fr-CA') + expect(next.locale).toBe('zh-CN') }) test('auto follows changed device locale without changing the preference', async () => { let device = 'en-US' const runtime = setup({ deviceLocales: () => [device] }) - const languages = [] - const preferences = [] + const languages: string[] = [] + const preferences: string[] = [] runtime.engine.on('languageChanged', (code) => languages.push(code)) runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) await runtime.setPreference('auto') @@ -135,17 +135,17 @@ test('auto follows changed device locale without changing the preference', async device = 'zh-CN' runtime.refreshDeviceLocale() runtime.refreshDeviceLocale() - assert.deepEqual(languages, ['en-US', 'zh-CN']) - assert.deepEqual(preferences, ['auto']) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.locale, 'zh-CN') - assert.equal(oldHeaders['Accept-Language'], 'en-US') + expect(languages).toStrictEqual(['en-US', 'zh-CN']) + expect(preferences).toStrictEqual(['auto']) + expect(runtime.preference).toBe('auto') + expect(runtime.locale).toBe('zh-CN') + expect(oldHeaders['Accept-Language']).toBe('en-US') }) test('preference switches are serialized and recover after failed requests', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - const seen = [] - const save = async (value) => { + const seen: string[] = [] + const save = async (value: string) => { seen.push(value) return { locale: value, revision: String(seen.length) } } @@ -153,17 +153,18 @@ test('preference switches are serialized and recover after failed requests', asy runtime.setPreference('en-US', { save }), runtime.setPreference('zh-CN', { save }), ]) - assert.deepEqual(seen, ['en-US', 'zh-CN']) - assert.equal(runtime.locale, 'zh-CN') + expect(seen).toStrictEqual(['en-US', 'zh-CN']) + expect(runtime.locale).toBe('zh-CN') }) test('fallback cycles and missing resources fail at registration', () => { - assert.throws( - () => - createLocaleRegistry( - { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, - resources - ), - /cycle/ - ) - assert.throws(() => createLocaleRegistry(meta, {}), /Missing/) + expect(() => + createLocaleRegistry( + { + ...localeMetadata, + locales: localeMetadata.locales.map((item) => ({ ...item, fallback: [item.code] })), + }, + resources + ) + ).toThrow(/cycle/) + expect(() => createLocaleRegistry(localeMetadata, {})).toThrow(/Missing/) }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.ts similarity index 67% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.ts index 746f74c5b..f580b24ba 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/test-runtime.ts @@ -1,10 +1,12 @@ +import { createRequire } from 'node:module' +const require = createRequire(import.meta.url) const fs = require('node:fs') const path = require('node:path') const Vue = require('vue') const { createLocaleRuntime } = require('../../src/i18n/runtime.ts') -const root = path.resolve(__dirname, '../../src/i18n') +const root = path.resolve(import.meta.dirname, '../../src/i18n') const meta = JSON.parse(fs.readFileSync(path.join(root, 'locale-meta.json'), 'utf8')) -const resources = {} +const resources: Record>> = {} for (const locale of meta.locales) { resources[locale.code] = {} const folder = path.join(root, 'locales', locale.code) @@ -28,13 +30,14 @@ const i18n = createLocaleRuntime({ deviceLocales: () => ['zh-CN'], }) const state = Vue.observable({ locale: i18n.locale }) -i18n.engine.on('languageChanged', (locale) => { +i18n.engine.on('languageChanged', (locale: string) => { state.locale = locale }) -const t = (key, options) => { +const t = (key: string, options?: import('i18next').TOptions) => { void state.locale return i18n.t(key, options) } Vue.prototype.$t = t Vue.prototype.$locale = state -module.exports = { i18n, t, localeState: state } +export { i18n, t, state as localeState } +export default { i18n, t, localeState: state } diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.ts similarity index 65% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.ts index 9d53a0bd9..cd1baacf9 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/uploads.test.ts @@ -1,14 +1,13 @@ -import assert from 'node:assert/strict' import { createRequire } from 'node:module' import { fileURLToPath } from 'node:url' -import { test } from 'node:test' +import { expect, test } from 'vitest' const require = createRequire(import.meta.url) const Vue = require('vue') -const { i18n, t } = require('./test-runtime.cjs') -const { loadModule, createLoader } = require('../support/load-module.cjs') +const { i18n, t } = require('./test-runtime.ts') +const { loadModule, createLoader } = require('../support/load-module.cts') -function component(name) { +function component(name: string) { const load = createLoader({ '@/utils/auth': { getToken: () => 'test-token' }, quill: {}, @@ -26,12 +25,12 @@ test('direct uploads use the selected locale without mutating an earlier request const definition = component(name) const vm = new Vue({ computed: { headers: definition.computed.headers } }) const previousHeaders = vm.headers - assert.equal(previousHeaders['Accept-Language'], 'zh-CN', name) + expect(previousHeaders['Accept-Language'], name).toBe('zh-CN') await i18n.setPreference('en-US') await Vue.nextTick() - assert.equal(vm.headers['Accept-Language'], 'en-US', name) - assert.equal(previousHeaders['Accept-Language'], 'zh-CN', name) - assert.equal(vm.headers.Authorization, 'Bearer test-token', name) + expect(vm.headers['Accept-Language'], name).toBe('en-US') + expect(previousHeaders['Accept-Language'], name).toBe('zh-CN') + expect(vm.headers.Authorization, name).toBe('Bearer test-token') vm.$destroy() } await i18n.setPreference('zh-CN') @@ -44,11 +43,11 @@ test('editor tooltips and picker text react without recreating editor content', data: { content: '

User content

' }, computed: { editorLocaleStyles: definition.computed.editorLocaleStyles }, }) - assert.equal(vm.editorLocaleStyles['--editor-save'], '"保存"') + expect(vm.editorLocaleStyles['--editor-save']).toBe('"保存"') await i18n.setPreference('en-US') await Vue.nextTick() - assert.equal(vm.editorLocaleStyles['--editor-save'], '"Save"') - assert.equal(vm.content, '

User content

') + expect(vm.editorLocaleStyles['--editor-save']).toBe('"Save"') + expect(vm.content).toBe('

User content

') vm.$destroy() await i18n.setPreference('zh-CN') }) @@ -56,14 +55,15 @@ test('editor tooltips and picker text react without recreating editor content', test('import feedback is a text node and preserves literal markup and newlines', () => { const vm = new Vue() const text = 'Row 1: example\nRow 2' - let message - vm.$alert = (node) => { + type AlertContent = { children: Array<{ tag?: string; text: string }> } + let message!: AlertContent + vm.$alert = (node: AlertContent) => { message = node } component('ExcelImportDialog').methods.handleSuccess.call(vm, { msg: text }) - assert.equal(message.children.length, 1) - assert.equal(message.children[0].tag, undefined) - assert.equal(message.children[0].text, text) + expect(message.children.length).toBe(1) + expect(message.children[0].tag).toBe(undefined) + expect(message.children[0].text).toBe(text) vm.$destroy() }) @@ -71,9 +71,9 @@ test('download errors retain server detail and have a translated string fallback const { getResponseMessage } = loadModule( fileURLToPath(new URL('../../src/utils/errorCode.ts', import.meta.url)) ) - assert.equal(getResponseMessage({ code: 403, msg: 'Specific message' }), 'Specific message') - assert.equal(typeof getResponseMessage({ code: 403 }), 'string') + expect(getResponseMessage({ code: 403, msg: 'Specific message' })).toBe('Specific message') + expect(typeof getResponseMessage({ code: 403 })).toBe('string') const fallback = getResponseMessage({ code: 999, msg: ' ' }) - assert.equal(typeof fallback, 'string') - assert.ok(fallback.trim()) + expect(typeof fallback).toBe('string') + expect(fallback.trim()).toBeTruthy() }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs deleted file mode 100644 index 20ad485f2..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.mjs +++ /dev/null @@ -1,58 +0,0 @@ -import assert from 'node:assert/strict' -import { createRequire } from 'node:module' -import { test } from 'node:test' -import LocaleForms from '../../src/i18n/forms.ts' -import { resolveRuleMessages } from '../../src/i18n/validation.ts' - -const require = createRequire(import.meta.url) -const elementRequire = createRequire(require.resolve('element-ui/package.json')) -const ValidatorModule = elementRequire('async-validator') -const Validator = ValidatorModule.default || ValidatorModule - -function errors(rules, model) { - return new Promise((resolve) => { - new Validator(rules).validate(model, (failures) => resolve(failures || [])) - }) -} - -test('Element UI receives translated error strings on every validation', async () => { - let locale = 'zh-CN' - const messages = { 'zh-CN': '请输入密钥编号', 'en-US': 'Enter a key ID' } - const rule = Object.freeze({ required: true, message: () => messages[locale], trigger: 'blur' }) - let mixin - LocaleForms.install({ mixin: (value) => (mixin = value) }) - const field = { $options: { name: 'ElFormItem' }, getRules: () => [rule] } - mixin.created.call(field) - assert.equal((await errors({ kid: field.getRules() }, { kid: '' }))[0].message, messages['zh-CN']) - locale = 'en-US' - assert.equal((await errors({ kid: field.getRules() }, { kid: '' }))[0].message, messages['en-US']) - assert.deepEqual(await errors({ kid: field.getRules() }, { kid: 'primary-2026' }), []) - assert.equal(typeof rule.message, 'function') - assert.equal(field.getRules()[0].trigger, 'blur') -}) - -test('nested and array rules keep validators and values while translating messages', async () => { - const pattern = /^[a-z]+$/ - const validator = (_rule, value, callback) => callback(value === 'kept' ? undefined : 'invalid') - const source = { - type: 'object', - fields: { - name: { pattern, message: () => 'Letters only' }, - tags: { type: 'array', defaultField: { required: true, message: () => 'Enter a tag' } }, - custom: { validator }, - }, - } - const normalized = resolveRuleMessages(source) - assert.equal(normalized.fields.name.pattern, pattern) - assert.equal(normalized.fields.custom.validator, validator) - assert.equal(typeof source.fields.name.message, 'function') - assert.equal(typeof source.fields.tags.defaultField.message, 'function') - const model = { profile: { name: '123', tags: [''], custom: 'kept' } } - const before = structuredClone(model) - const failures = await errors({ profile: normalized }, model) - assert.deepEqual(failures.map((failure) => failure.message).sort(), [ - 'Enter a tag', - 'Letters only', - ]) - assert.deepEqual(model, before) -}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.ts new file mode 100644 index 000000000..13e91994f --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/validation.test.ts @@ -0,0 +1,63 @@ +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +import LocaleForms from '../../src/i18n/forms.ts' +import { resolveRuleMessages } from '../../src/i18n/validation.ts' + +const require = createRequire(import.meta.url) +const elementRequire = createRequire(require.resolve('element-ui/package.json')) +const ValidatorModule = elementRequire('async-validator') +const Validator = ValidatorModule.default || ValidatorModule + +function errors(rules: Record, model: Record) { + return new Promise>((resolve) => { + new Validator(rules).validate(model, (failures: Array<{ message: string }> | null) => + resolve(failures || []) + ) + }) +} + +test('Element UI receives translated error strings on every validation', async () => { + let locale: 'zh-CN' | 'en-US' = 'zh-CN' + const messages = { 'zh-CN': '请输入密钥编号', 'en-US': 'Enter a key ID' } + const rule = Object.freeze({ required: true, message: () => messages[locale], trigger: 'blur' }) + type LocaleMixin = { created: (this: typeof field) => void } + let mixin!: LocaleMixin + LocaleForms.install({ mixin: (value: LocaleMixin) => (mixin = value) } as unknown as Parameters< + typeof LocaleForms.install + >[0]) + const field = { $options: { name: 'ElFormItem' }, getRules: () => [rule] } + mixin.created.call(field) + expect((await errors({ kid: field.getRules() }, { kid: '' }))[0].message).toBe(messages['zh-CN']) + locale = 'en-US' + expect((await errors({ kid: field.getRules() }, { kid: '' }))[0].message).toBe(messages['en-US']) + expect(await errors({ kid: field.getRules() }, { kid: 'primary-2026' })).toStrictEqual([]) + expect(typeof rule.message).toBe('function') + expect(field.getRules()[0].trigger).toBe('blur') +}) + +test('nested and array rules keep validators and values while translating messages', async () => { + const pattern = /^[a-z]+$/ + const validator = (_rule: unknown, value: string, callback: (error?: string) => void) => + callback(value === 'kept' ? undefined : 'invalid') + const source = { + type: 'object', + fields: { + name: { pattern, message: () => 'Letters only' }, + tags: { type: 'array', defaultField: { required: true, message: () => 'Enter a tag' } }, + custom: { validator }, + }, + } + const normalized = resolveRuleMessages(source) as typeof source + expect(normalized.fields.name.pattern).toBe(pattern) + expect(normalized.fields.custom.validator).toBe(validator) + expect(typeof source.fields.name.message).toBe('function') + expect(typeof source.fields.tags.defaultField.message).toBe('function') + const model = { profile: { name: '123', tags: [''], custom: 'kept' } } + const before = structuredClone(model) + const failures = await errors({ profile: normalized }, model) + expect(failures.map((failure) => failure.message).sort()).toStrictEqual([ + 'Enter a tag', + 'Letters only', + ]) + expect(model).toStrictEqual(before) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.ts similarity index 81% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.ts index 9f68ee735..513fd0cce 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, readFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { basename, join, dirname, sep } from 'node:path' @@ -14,12 +14,12 @@ const cli = join(dirname(require.resolve('@x18n/cli/package.json')), 'bin.mjs') test('host and plugin checks use independent declared language sets', async () => { const root = await mkdtemp(join(tmpdir(), 'ruoyi-plugin-locales-')) const rootUrl = pathToFileURL(root + sep) - const write = async (file, text) => { + const write = async (file: string, text: string) => { const path = join(root, file) await mkdir(dirname(path), { recursive: true }) await writeFile(path, text) } - const metadata = (codes) => ({ + const metadata = (codes: string[]) => ({ sourceLocale: 'zh-CN', defaultLocale: 'zh-CN', locales: codes.map((code) => ({ @@ -52,38 +52,34 @@ test('host and plugin checks use independent declared language sets', async () = await write('src/example.js', "t('common:greeting')") await write('plugins/ai/views/example.js', "t('plugin.ai:greeting')") const projects = await checkLocaleRegistration(rootUrl) - assert.deepEqual( - projects.map((project) => project.locales.length), - [3, 2] - ) + expect(projects.map((project) => project.locales.length)).toStrictEqual([3, 2]) const check = () => { const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + return { status: result.status, report: JSON.parse(result.stdout) as CliReport } } const valid = check() - assert.equal(valid.status, 0, JSON.stringify(valid.report)) - assert.deepEqual( - valid.report.data.projects.map((project) => [project.name, project.coverage.length]), - [ - ['plugins/ai', 2], - [basename(root), 3], - ] - ) + expect(valid.status, JSON.stringify(valid.report)).toBe(0) + expect( + valid.report.data.projects.map((project) => [project.name, project.coverage.length]) + ).toStrictEqual([ + ['plugins/ai', 2], + [basename(root), 3], + ]) await write( 'plugins/ai/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US', 'ja-JP'])) ) - await assert.rejects(checkLocaleRegistration(rootUrl), /ja-JP/) + await expect(checkLocaleRegistration(rootUrl)).rejects.toThrow(/ja-JP/) await write('plugins/ai/locales/ja-JP.json', JSON.stringify({ greeting: '' })) const missing = check() - assert.equal(missing.status, 1) - assert.ok( + expect(missing.status).toBe(1) + expect( missing.report.diagnostics.some( (item) => item.code === 'empty-translation' && item.locale === 'ja-JP' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.ts similarity index 71% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.ts index c5a32834c..f332d5f36 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/i18n/x18n.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/i18n/x18n.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -15,7 +15,7 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a items_one: '{{count}} item', items_other: '{{count}} items', } - async function catalog(code, values) { + async function catalog(code: string, values: Record) { const dir = join(root, 'locales', code) await mkdir(dir, { recursive: true }) await writeFile(join(dir, 'common.json'), JSON.stringify(values)) @@ -24,7 +24,8 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -47,23 +48,27 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a await catalog('en-US', english) await catalog('ja-JP', { greeting: 'こんにちは、{{name}}', items_other: '{{count}} 件' }) let result = check() - assert.equal(result.status, 0, JSON.stringify(result.report.errors)) - assert.equal(result.report.data.projects[0].coverage.length, 3) - assert.ok( + expect(result.status, JSON.stringify(result.report.errors)).toBe(0) + expect(result.report.data.projects[0].coverage.length).toBe(3) + expect( result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0) - ) - assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key')) + ).toBeTruthy() + expect(!result.report.diagnostics.some((item) => item.code === 'unused-key')).toBeTruthy() await catalog('en-US', { items_one: english.items_one, items_other: english.items_other }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'missing-translation') + ).toBeTruthy() await catalog('en-US', { ...english, greeting: 'Hello' }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch') + ).toBeTruthy() await writeFile(join(root, 'src/missing.js'), "t('common:missing')") result = check() - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key')) + expect(result.report.diagnostics.some((item) => item.code === 'missing-key')).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.js b/ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.ts similarity index 50% rename from ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.js rename to ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.ts index 84435f0d7..7e98bdffa 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.js +++ b/ruoyi-fastapi-frontend/vue2/web/tests/job/job-form.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import test from 'node:test' +import { expect, test } from 'vitest' import { buildJobPayload, parseJobParameter } from '../../src/utils/job.ts' test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为数组和对象', () => { @@ -13,16 +12,16 @@ test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为 jobStore: 'redis', } const payload = buildJobPayload(form) - assert.deepEqual(payload.jobArgs, ['tenant,a', 3, true, { nested: [null, 2] }]) - assert.deepEqual(payload.jobKwargs, { enabled: false, limit: 30 }) - assert.equal(payload.misfireGraceTime, null) - assert.equal(payload.jobGroup, '报表') - assert.equal(payload.jobStore, 'redis') - assert.equal(typeof form.jobArgs, 'string') + expect(payload.jobArgs).toStrictEqual(['tenant,a', 3, true, { nested: [null, 2] }]) + expect(payload.jobKwargs).toStrictEqual({ enabled: false, limit: 30 }) + expect(payload.misfireGraceTime).toBe(null) + expect(payload.jobGroup).toBe('报表') + expect(payload.jobStore).toBe('redis') + expect(typeof form.jobArgs).toBe('string') }) test('无参数使用空数组和空对象', () => { - assert.deepEqual(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' }), { + expect(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' })).toStrictEqual({ jobArgs: [], jobKwargs: {}, }) @@ -30,10 +29,10 @@ test('无参数使用空数组和空对象', () => { test('错误的JSON格式和参数结构返回对应字段提示', () => { for (const value of ['', 'a,b', '{broken', '{}', 'true', 'null']) { - assert.throws(() => parseJobParameter(value, 'jobArgs'), /位置参数必须是JSON数组/) + expect(() => parseJobParameter(value, 'jobArgs')).toThrow(/位置参数必须是JSON数组/) } for (const value of ['', '[1]', 'true', 'null', '{broken']) { - assert.throws(() => parseJobParameter(value, 'jobKwargs'), /关键字参数必须是JSON对象/) + expect(() => parseJobParameter(value, 'jobKwargs')).toThrow(/关键字参数必须是JSON对象/) } - assert.throws(() => parseJobParameter('[1e999]', 'jobArgs'), /数字超出可表示范围/) + expect(() => parseJobParameter('[1e999]', 'jobArgs')).toThrow(/数字超出可表示范围/) }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.ts similarity index 65% rename from ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.ts index a35e365ca..eb8955b8a 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/job/vue2-components.test.ts @@ -1,20 +1,21 @@ -const assert = require('node:assert/strict') -const test = require('node:test') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) const path = require('node:path') const Vue = require('vue') -const { createLoader: createModuleLoader } = require('../support/load-module.cjs') +const { createLoader: createModuleLoader } = require('../support/load-module.cts') -const sourceRoot = path.resolve(__dirname, '../../src') +const sourceRoot = path.resolve(import.meta.dirname, '../../src') const settle = async () => { await Vue.nextTick() await new Promise((resolve) => setImmediate(resolve)) } -const normalize = (value) => JSON.parse(JSON.stringify(value)) +const normalize = (value: unknown) => JSON.parse(JSON.stringify(value)) // Exercise real Vue 2 instances; API and browser resources are isolated per test. function createLoader(mocks = {}, globals = {}) { const load = createModuleLoader(mocks, globals) - return (relative) => { + return (relative: string) => { const result = load(path.join(sourceRoot, relative)) return result.default || result } @@ -22,18 +23,18 @@ function createLoader(mocks = {}, globals = {}) { function fakeTimers() { let id = 0 - const pending = new Map() + const pending = new Map unknown>() return { pending, - setTimeout(callback) { + setTimeout(callback: () => unknown) { pending.set(++id, callback) return id }, - clearTimeout(timer) { + clearTimeout(timer: number) { pending.delete(timer) }, runNext() { - const [timer, callback] = pending.entries().next().value + const [timer, callback] = pending.entries().next().value! pending.delete(timer) return callback() }, @@ -41,7 +42,7 @@ function fakeTimers() { } function deferred() { - let resolve + let resolve!: (value: unknown) => void const promise = new Promise((done) => { resolve = done }) @@ -58,20 +59,22 @@ test('Vue 2 computed date text reacts immediately to account timezone changes', }, }, }) - assert.equal(instance.display, '2025-12-31 19:00:00') + expect(instance.display).toBe('2025-12-31 19:00:00') time.setUserTimezone('UTC') await settle() - assert.equal(instance.display, '2026-01-01 00:00:00') + expect(instance.display).toBe('2026-01-01 00:00:00') instance.$destroy() }) test('Cron preview cancels obsolete requests and ignores responses after destruction', async () => { const timers = fakeTimers() - const requests = [] + const requests: Array< + ReturnType & { payload: { cronExpression: string }; signal: AbortSignal } + > = [] const component = createLoader( { '@/api/monitor/job': { - previewJob(payload, signal) { + previewJob(payload: { cronExpression: string }, signal: AbortSignal) { const response = deferred() requests.push({ payload, signal, ...response }) return response.promise @@ -84,27 +87,29 @@ test('Cron preview cancels obsolete requests and ignores responses after destruc ...component, propsData: { ex: '0 0 9 * * ?', timeZone: 'Asia/Shanghai' }, }) - assert.equal(timers.pending.size, 1) + expect(timers.pending.size).toBe(1) const first = timers.runNext() instance.ex = '0 0 10 * * ?' await settle() - assert.equal(requests[0].signal.aborted, true) + expect(requests[0].signal.aborted).toBe(true) requests[0].resolve({ data: { nextRunTimes: ['stale'], timeZone: 'UTC' } }) await first - assert.deepEqual(normalize(instance.resultList), []) + expect(normalize(instance.resultList)).toStrictEqual([]) const second = timers.runNext() - assert.equal(requests[1].payload.cronExpression, '0 0 10 * * ?') + expect(requests[1].payload.cronExpression).toBe('0 0 10 * * ?') instance.$destroy() - assert.equal(requests[1].signal.aborted, true) + expect(requests[1].signal.aborted).toBe(true) requests[1].resolve({ data: { nextRunTimes: ['late'], timeZone: 'UTC' } }) await second - assert.deepEqual(normalize(instance.resultList), []) - assert.equal(timers.pending.size, 0) + expect(normalize(instance.resultList)).toStrictEqual([]) + expect(timers.pending.size).toBe(0) }) test('Runtime dialog applies initial filters, cancels changed requests and stops on destroy', async () => { - const requests = [] - const fetch = (query, options) => { + const requests: Array< + ReturnType & { query: Record; signal: AbortSignal } + > = [] + const fetch = (query: Record, options: { signal: AbortSignal }) => { const response = deferred() requests.push({ query, ...options, ...response }) return response.promise @@ -119,30 +124,30 @@ test('Runtime dialog applies initial filters, cancels changed requests and stops ...component, propsData: { visible: true, initialTab: 'executions', jobId: '7', executionId: 'exec-1' }, }) - assert.equal(requests[0].query.jobId, 7) - assert.equal(requests[0].query.executionId, 'exec-1') + expect(requests[0].query.jobId).toBe(7) + expect(requests[0].query.executionId).toBe('exec-1') instance.initialTab = 'sync' await settle() - assert.equal(requests[0].signal.aborted, true) - assert.equal(requests[1].query.executionId, undefined) + expect(requests[0].signal.aborted).toBe(true) + expect(requests[1].query.executionId).toBe(undefined) requests[0].resolve({ rows: [{ status: 'running' }], total: 1 }) requests[1].resolve({ rows: [{ syncStatus: 'applied' }], total: 1 }) await settle() - assert.equal(instance.rows[0].syncStatus, 'applied') - const visibility = [] - instance.$on('update:visible', (value) => visibility.push(value)) + expect(instance.rows[0].syncStatus).toBe('applied') + const visibility: boolean[] = [] + instance.$on('update:visible', (value: boolean) => visibility.push(value)) instance.dialogVisible = false - assert.deepEqual(visibility, [false]) + expect(visibility).toStrictEqual([false]) instance.$destroy() - assert.equal(requests[1].signal.aborted, true) + expect(requests[1].signal.aborted).toBe(true) }) test('Job log initializes from stable IDs and follows route and display timezone changes', async () => { - const queries = [] + const queries: Array<{ jobId: string; executionId?: string }> = [] const load = createLoader({ './detail': {}, '@/api/monitor/jobLog': { - listJobLog: async (query) => { + listJobLog: async (query: { jobId: string; executionId?: string }) => { queries.push(query) return { rows: [], total: 0 } }, @@ -157,29 +162,29 @@ test('Job log initializes from stable IDs and follows route and display timezone beforeCreate() { this.$route = route }, - methods: { ...component.methods, addDateRange: (query) => query }, + methods: { ...component.methods, addDateRange: (query: Record) => query }, }) await settle() - assert.equal(queries[0].jobId, '7') - assert.equal(queries[0].executionId, 'exec-1') + expect(queries[0].jobId).toBe('7') + expect(queries[0].executionId).toBe('exec-1') route.params.jobId = '8' route.query.executionId = '' await settle() - assert.equal(queries.at(-1).jobId, '8') - assert.equal(queries.at(-1).executionId, undefined) + expect(queries[queries.length - 1].jobId).toBe('8') + expect(queries[queries.length - 1].executionId).toBe(undefined) instance.dateRange = ['2026-01-01', '2026-01-02'] const before = queries.length time.setUserTimezone('Asia/Shanghai') await settle() - assert.equal(queries.length, before + 1) + expect(queries.length).toBe(before + 1) instance.$destroy() }) test('Plugin config dynamic fields stay reactive and JSON values submit with their original types', async () => { const component = createLoader({ - 'element-ui': { Message: { error: assert.fail } }, + 'element-ui': { Message: { error: expect.unreachable } }, '@/api/system/plugin': { - getPluginConfigStatus: () => assert.fail('Closed config status must not request data'), + getPluginConfigStatus: () => expect.fail('Closed config status must not request data'), }, })('views/system/plugin/components/PluginConfigDialog.vue') const instance = new Vue({ @@ -201,10 +206,10 @@ test('Plugin config dynamic fields stay reactive and JSON values submit with the ) state.configForm.values.enabled = true await settle() - assert.equal(updates, 1) + expect(updates).toBe(1) const values = state.buildConfigSubmitValues() - assert.equal(values.enabled, true) - assert.deepEqual(normalize(values.options), { limit: 3 }) + expect(values.enabled).toBe(true) + expect(normalize(values.options)).toStrictEqual({ limit: 3 }) stopWatchingEnabled() instance.items = [{ key: 'anotherKey', value: 'initial', type: 'string' }] await settle() @@ -214,8 +219,8 @@ test('Plugin config dynamic fields stay reactive and JSON values submit with the ) state.configForm.values.anotherKey = 'updated' await settle() - assert.equal(updates, 2) - assert.equal(state.configForm.values.enabled, undefined) + expect(updates).toBe(2) + expect(state.configForm.values.enabled).toBe(undefined) instance.$destroy() }) @@ -226,7 +231,7 @@ test('JSON editor uses Element UI validation and releases Monaco resources in be const model = { updateOptions() {}, getValue: () => text, - setValue: (value) => { + setValue: (value: string) => { text = value }, ...disposable(), @@ -270,16 +275,18 @@ test('JSON editor uses Element UI validation and releases Monaco resources in be }) instance.$refs.editorRef = {} await component.mounted.call(instance) - assert.equal(instance.editorReady, true) - assert.equal(editor.__ob__, undefined, 'Monaco editor must not be deeply observed by Vue') - const inputs = [] - instance.$on('input', (value) => inputs.push(value)) + expect(instance.editorReady).toBe(true) + expect(Reflect.get(editor, '__ob__'), 'Monaco editor must not be deeply observed by Vue').toBe( + undefined + ) + const inputs: unknown[] = [] + instance.$on('input', (value: string) => inputs.push(value)) instance.updateValue('[1]') await settle() - assert.equal(validations, 1) - assert.deepEqual(inputs, ['[1]']) + expect(validations).toBe(1) + expect(inputs).toStrictEqual(['[1]']) instance.$destroy() - assert.equal(disposals, 6) + expect(disposals).toBe(6) parent.$destroy() }) @@ -289,16 +296,16 @@ test('Business date input emits the Vue 2 v-model event with the selected wall t ...component, propsData: { value: '2026-01-01 09:00:00', timezone: 'Asia/Shanghai' }, }) - const values = [] - instance.$on('input', (value) => values.push(value)) + const values: unknown[] = [] + instance.$on('input', (value: unknown) => values.push(value)) instance.timeInput = '10:30' - assert.deepEqual(values, ['2026-01-01 10:30:00']) + expect(values).toStrictEqual(['2026-01-01 10:30:00']) instance.$destroy() }) test('Native job form uses callback validation, submits typed fields and retains More menu dispatch', async () => { - const payloads = [] - const notices = [] + const payloads: Array> = [] + const notices: string[] = [] const component = createLoader( { './detail': {}, @@ -308,7 +315,7 @@ test('Native job form uses callback validation, submits typed fields and retains '@/utils/permission': { checkPermi: () => true }, '@/api/monitor/job': { listJob: async () => ({ rows: [], total: 0 }), - addJob: async (payload) => { + addJob: async (payload: Record) => { payloads.push(payload) return { msg: '配置已保存,等待同步', data: { syncStatus: 'pending' } } }, @@ -319,16 +326,19 @@ test('Native job form uses callback validation, submits typed fields and retains const instance = new Vue({ ...component, beforeCreate: [ - function () { + function (this: { + $store: unknown + $modal: { msg(message: string): void; msgSuccess(message: string): void } + }) { this.$store = { state: { user: { appTimezone: 'Asia/Shanghai' } } } - this.$modal = { msg: (message) => notices.push(message), msgSuccess: assert.fail } + this.$modal = { msg: (message) => notices.push(message), msgSuccess: expect.unreachable } }, ...(component.beforeCreate ? [component.beforeCreate] : []), ], methods: { ...component.methods, resetForm() {} }, }) instance.reset() - assert.equal(instance.form.status, '1') + expect(instance.form.status).toBe('1') instance.form.jobName = 'native form' instance.form.invokeTarget = 'module_task.scheduler_test.job' instance.form.cronExpression = '0 0 9 * * ?' @@ -337,32 +347,32 @@ test('Native job form uses callback validation, submits typed fields and retains instance.unlimitedDelay = true let valid = false instance.$refs.form = { - validate(callback) { + validate(callback: (valid: boolean) => void) { callback(valid) }, } instance.submitForm() - assert.equal(payloads.length, 0) + expect(payloads.length).toBe(0) valid = true instance.submitForm() instance.submitForm() await settle() - assert.equal(payloads.length, 1) - assert.deepEqual(normalize(payloads[0].jobArgs), ['tenant,a', 3, true]) - assert.deepEqual(normalize(payloads[0].jobKwargs), { enabled: false }) - assert.equal(payloads[0].misfireGraceTime, null) - assert.equal(payloads[0].timeZone, 'Asia/Shanghai') - assert.equal('misfirePolicy' in payloads[0], false) - assert.equal(instance.submitting, false) - assert.deepEqual(notices, ['配置已保存,等待同步']) - const commands = [] - instance.handleRun = (row) => commands.push(['run', row.jobId]) - instance.handleJobLog = (row) => commands.push(['log', row.jobId]) - instance.handleRuntime = (tab, row) => commands.push([tab, row.jobId]) + expect(payloads.length).toBe(1) + expect(normalize(payloads[0].jobArgs)).toStrictEqual(['tenant,a', 3, true]) + expect(normalize(payloads[0].jobKwargs)).toStrictEqual({ enabled: false }) + expect(payloads[0].misfireGraceTime).toBe(null) + expect(payloads[0].timeZone).toBe('Asia/Shanghai') + expect('misfirePolicy' in payloads[0]).toBe(false) + expect(instance.submitting).toBe(false) + expect(notices).toStrictEqual(['配置已保存,等待同步']) + const commands: Array<[string, number]> = [] + instance.handleRun = (row: { jobId: number }) => commands.push(['run', row.jobId]) + instance.handleJobLog = (row: { jobId: number }) => commands.push(['log', row.jobId]) + instance.handleRuntime = (tab: string, row: { jobId: number }) => commands.push([tab, row.jobId]) for (const command of ['handleRun', 'handleJobLog', 'handleExecutions', 'handleSync']) { instance.handleCommand(command, { jobId: 7 }) } - assert.deepEqual(commands, [ + expect(commands).toStrictEqual([ ['run', 7], ['log', 7], ['executions', 7], diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.js b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.ts similarity index 57% rename from ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.js rename to ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.ts index c20e5e31c..af4889a83 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.js +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/json-only-host.ts @@ -1,11 +1,31 @@ -import assert from 'node:assert/strict' +import { expect } from 'vitest' // 最小 bridge v1 JSON 宿主协议夹具,不是历史宿主实现的源码快照。 // 固定旧消息形状;可传入未知能力版本,验证新客户端不会据此发起未协商请求。 -export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabilities }) { +interface JsonHostOptions { + hostWindow: Window + childWindow: Window + origin: string + capabilities?: unknown +} +interface JsonBridgeMessage { + namespace: string + version: number + pluginId: string + type: string + id?: string + instance: string + payload: Record +} +export function createJsonOnlyHost({ + hostWindow, + childWindow, + origin, + capabilities, +}: JsonHostOptions) { const instance = 'json-host-protocol-v1' - const calls = [] - const send = (type, payload, id) => { + const calls: Array<{ type: string }> = [] + const send = (type: string, payload: unknown, id?: string) => { childWindow.postMessage( { namespace: 'ruoyi.plugin', @@ -19,21 +39,21 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti origin ) } - const listener = (event) => { - assert.equal(event.origin, origin) - assert.equal(event.source, childWindow) + const listener = (event: MessageEvent) => { + expect(event.origin).toBe(origin) + expect(event.source).toBe(childWindow) const message = event.data - assert.equal(message.namespace, 'ruoyi.plugin') - assert.equal(message.version, 1) - assert.equal(message.pluginId, 'demo') - assert.ok( + expect(message.namespace).toBe('ruoyi.plugin') + expect(message.version).toBe(1) + expect(message.pluginId).toBe('demo') + expect( Object.keys(message).every((key) => ['namespace', 'version', 'pluginId', 'type', 'instance', 'payload', 'id'].includes(key) ) - ) + ).toBe(true) if (message.type === 'ready') { - assert.equal(message.instance, '') - assert.deepEqual(Object.keys(message.payload), ['clientId']) + expect(message.instance).toBe('') + expect(Object.keys(message.payload)).toStrictEqual(['clientId']) send('initialize', { clientId: message.payload.clientId, uiBase: '/apps/demo/ui/', @@ -42,7 +62,7 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti }) return } - assert.equal(message.instance, instance) + expect(message.instance).toBe(instance) if (message.type === 'cancel') return calls.push(message) send( diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/messageWindows.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/messageWindows.ts new file mode 100644 index 000000000..f9c9311a2 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/fixtures/messageWindows.ts @@ -0,0 +1,55 @@ +import { expect } from 'vitest' + +interface BridgeMessage { + version: number + sdkVersion?: string + id?: string + type: string + instance: string + payload: Record +} + +interface MessageEventFixture { + data: unknown + source: unknown + origin: string +} + +function createWindow() { + const listeners = new Set<(event: MessageEventFixture) => void>() + const mock = { + listeners, + messages: [] as BridgeMessage[], + addEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.add(listener) + }, + removeEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.delete(listener) + }, + dispatch(event: MessageEventFixture) { + for (const listener of [...listeners]) listener(event) + }, + } + // The SDK requires a Window and only uses its messaging methods. + return mock as typeof mock & Window +} + +export function createMessageWindows(origin: string) { + const hostWindow = createWindow() + const childWindow = createWindow() + for (const [target, source] of [ + [hostWindow, childWindow], + [childWindow, hostWindow], + ]) { + target.postMessage = ( + message: BridgeMessage, + targetOrigin?: string | WindowPostMessageOptions + ) => { + expect(targetOrigin, 'all messages must name an exact origin').toBe(origin) + const data = structuredClone(message) + target.messages.push(data) + queueMicrotask(() => target.dispatch({ data, source, origin })) + } + } + return { hostWindow, childWindow } +} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.mjs deleted file mode 100644 index 3fd999c93..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.mjs +++ /dev/null @@ -1,950 +0,0 @@ -import assert from 'node:assert/strict' -import { - createPluginClient, - createPluginHostBridge, - normalizePluginBase, - PLUGIN_BRIDGE_MAX_BYTES, - PLUGIN_BRIDGE_MAX_FILE_BYTES, - validatePluginApiPath, - validatePluginRoute, - validatePluginSession, -} from '../../src/utils/pluginBridge.js' -import { normalizeTransportPath } from '../../src/utils/transportPath.ts' - -// 文件通过真实结构化克隆进入宿主,表单由宿主重建且仍使用受限会话。 -async function checkFileTransfers() { - const requests = [] - const events = [] - const pair = await setup({ - request: async (config) => { - requests.push(config) - if (config.responseType === 'blob') { - config.onDownloadProgress({ loaded: 6, total: 6 }) - return new Blob(['报告'], { type: 'text/plain' }) - } - assert.equal(config.data.get('category'), 'test') - const file = config.data.get('attachment') - assert.equal(file.name, '报告.txt') - assert.equal(await file.text(), '报告') - config.onUploadProgress({ loaded: 3, total: 6 }) - config.onUploadProgress({ loaded: 6, total: 6 }) - return { received: file.size } - }, - }) - try { - const result = await pair.child.upload( - { - path: 'files/upload', - file: new Blob(['报告']), - filename: '报告.txt', - fieldName: 'attachment', - fields: { category: 'test' }, - }, - { - onProgress: (event) => { - events.push(event) - throw new Error('插件回调错误') - }, - } - ) - assert.deepEqual(result, { received: 6 }) - assert.deepEqual(events.at(-1), { phase: 'upload', loaded: 6, total: 6 }) - const blob = await pair.child.download( - { path: 'files/report', params: { month: '10' } }, - { onProgress: (event) => events.push(event) } - ) - assert.equal(await blob.text(), '报告') - assert.equal(blob.type, 'text/plain') - assert.deepEqual(events.at(-1), { phase: 'download', loaded: 6, total: 6 }) - for (const config of requests) { - assert.equal(config.headers.isToken, false) - assert.equal(config.headers['X-Plugin-CSRF'], sessionData.csrfToken) - assert.equal(config.headers.Authorization, undefined) - assert.equal(config.headers.encrypt, false) - assert.equal(config.timeout, 120000) - assert.equal(config.pluginBridge, true) - } - assert.equal(requests[0].headers['Content-Type'], undefined) - assert.equal(requests[0].url, '/apps/demo/api/files/upload') - assert.equal(pair.child.context.capabilities.files.maxBytes, PLUGIN_BRIDGE_MAX_FILE_BYTES) - } finally { - pair.destroy() - } -} - -const ORIGIN = 'https://example.test' -const sessionData = { - pluginId: 'demo', - bridgeVersion: 1, - uiBase: '/apps/demo/ui/', - apiBase: '/apps/demo/api/', - csrfToken: 'csrf-token-for-tests-only', - expiresIn: 300, -} -const deferred = () => { - let resolve - let reject - const promise = new Promise((a, b) => { - resolve = a - reject = b - }) - return { promise, resolve, reject } -} -const flush = () => new Promise((resolve) => setImmediate(resolve)) - -function windowPair() { - const makeWindow = () => { - const listeners = new Set() - return { - messages: [], - listeners, - addEventListener(type, listener) { - if (type === 'message') listeners.add(listener) - }, - removeEventListener(type, listener) { - if (type === 'message') listeners.delete(listener) - }, - dispatch(event) { - for (const listener of [...listeners]) listener(event) - }, - } - } - const hostWindow = makeWindow() - const childWindow = makeWindow() - for (const [target, source] of [ - [hostWindow, childWindow], - [childWindow, hostWindow], - ]) { - target.postMessage = (data, targetOrigin) => { - assert.equal(targetOrigin, ORIGIN, 'all messages must name an exact origin') - data = structuredClone(data) - target.messages.push(data) - queueMicrotask(() => target.dispatch({ data, source, origin: ORIGIN })) - } - } - return { hostWindow, childWindow } -} - -async function setup({ - request = async () => ({ code: 200, data: 'ok' }), - now = Date.now, - timeoutMs = 15000, - transferTimeoutMs = 120000, - stream, - streamTimeoutMs = 300000, -} = {}) { - const { hostWindow, childWindow } = windowPair() - let target = childWindow - let theme = 'light' - const routes = [] - const host = createPluginHostBridge({ - pluginId: 'demo', - session: validatePluginSession(sessionData, 'demo', '', now()), - getTarget: () => target, - request, - stream, - getContext: () => ({ - theme: { mode: theme }, - language: 'zh-CN', - timeZone: 'Asia/Shanghai', - route: '/', - }), - onRoute: (route) => routes.push(route), - eventTarget: hostWindow, - origin: ORIGIN, - now, - timeoutMs, - transferTimeoutMs, - streamTimeoutMs, - }) - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: childWindow, - parentWindow: hostWindow, - origin: ORIGIN, - transferTimeoutMs, - streamTimeoutMs, - }) - await child.ready - return { - hostWindow, - childWindow, - host, - child, - routes, - replaceTarget: () => { - target = {} - }, - changeTheme: () => { - theme = 'dark' - host.updatePreferences() - }, - destroy: () => { - host.destroy() - child.destroy() - }, - } -} - -assert.equal(normalizePluginBase('/deployment/'), '/deployment') -for (const base of ['//evil.test', 'https://evil.test', '/a/../b', '/%2e', '/x\\y', '/x//y']) { - assert.throws(() => normalizePluginBase(base)) -} -assert.equal(validatePluginSession(sessionData, 'demo', '', 100).expiresAt, 300100) -assert.equal( - validatePluginSession( - { ...sessionData, uiBase: '/prefix/apps/demo/ui/', apiBase: '/prefix/apps/demo/api/' }, - 'demo', - '/prefix' - ).apiBase, - '/prefix/apps/demo/api/' -) -for (const changes of [ - { uiBase: '//evil.test/apps/demo/ui/' }, - { uiBase: 'https://example.test/apps/demo/ui/' }, - { apiBase: '/apps/other/api/' }, - { apiBase: '/prefix/apps/demo/api/' }, - { apiBase: '/apps/demo/api/../' }, - { pluginId: 'other' }, - { expiresIn: 0 }, - { expiresIn: 5000 }, - { bridgeVersion: 2 }, - { csrfToken: 'bad\nheader' }, -]) - assert.throws(() => validatePluginSession({ ...sessionData, ...changes }, 'demo')) -for (const path of ['', 'status', 'model/v1.2', 'reports/2026-10/']) - assert.equal(validatePluginApiPath(path), path) -for (const path of [ - '/status', - '//evil.test', - 'https://evil.test', - '..', - 'a/../b', - 'a/./b', - 'a//b', - 'a\\b', - '%2e%2e/admin', - '%252e%252e', - 'a%2fb', - 'a?x=1', - 'a#hash', - 'a\n', -]) { - assert.throws(() => validatePluginApiPath(path), path) -} -assert.equal(validatePluginRoute('/reports/today'), '/reports/today') -assert.throws(() => validatePluginRoute('//outside')) -assert.throws(() => validatePluginRoute('/../admin')) -assert.equal( - normalizeTransportPath('/root/apps/demo/api/status', '/dev-api', '/root'), - '/apps/demo/api/status' -) -assert.equal( - normalizeTransportPath('/root/plugin/runtime/demo/session', '/dev-api', '/root'), - '/plugin/runtime/demo/session' -) -assert.equal(normalizeTransportPath('/dev-api/system/user', '/dev-api'), '/system/user') -assert.equal(normalizeTransportPath('/dev-api-other/user', '/dev-api'), '/dev-api-other/user') -assert.equal( - normalizeTransportPath('/rooted/apps/demo/api/status', '/dev-api', '/root'), - '/rooted/apps/demo/api/status' -) - -// 验证握手、接口请求和上下文同步,不向子页面传递宿主令牌或 CSRF 令牌。 -{ - const requests = [] - const pair = await setup({ - request: async (config) => { - requests.push(config) - return { code: 200, data: [1, 2] } - }, - }) - assert.equal(pair.child.context.apiBase, '/apps/demo/api/') - assert.equal(pair.child.context.csrfToken, undefined) - const result = await pair.child.request({ - method: 'POST', - path: 'status', - data: { value: 3 }, - params: { page: 1 }, - }) - assert.deepEqual(result, { code: 200, data: [1, 2] }) - assert.equal(requests[0].url, '/apps/demo/api/status') - assert.equal(requests[0].baseURL, '') - assert.deepEqual(requests[0].headers, { - isToken: false, - 'X-Plugin-CSRF': sessionData.csrfToken, - repeatSubmit: false, - }) - assert.equal(requests[0].headers.Authorization, undefined) - assert.equal(requests[0].pluginBridge, true) - pair.changeTheme() - await flush() - assert.equal(pair.child.context.theme.mode, 'dark') - pair.child.navigate('/details') - await flush() - assert.deepEqual(pair.routes, ['/details']) - pair.host.updateRoute('/back') - await flush() - assert.equal(pair.child.context.route, '/back') - const events = [] - pair.child.subscribe((event) => events.push(event.type)) - pair.host.refresh() - await flush() - assert.deepEqual(events, ['refresh']) - pair.destroy() - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 拒绝伪造来源、旧页面随机标识、无效字段和接口路径越界。 -{ - let calls = 0 - const pair = await setup({ - request: async () => { - calls += 1 - return {} - }, - }) - const initialization = pair.childWindow.messages.find((message) => message.type === 'initialize') - const message = { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - type: 'request', - instance: initialization.instance, - id: 'test', - payload: { method: 'GET', path: 'status' }, - } - const emit = (data, origin = ORIGIN, source = pair.childWindow) => - pair.hostWindow.dispatch({ data, origin, source }) - emit(message, 'https://evil.test') - emit(message, ORIGIN, {}) - emit({ ...message, instance: 'previous-frame' }) - emit({ ...message, version: 2 }) - emit({ ...message, pluginId: 'other' }) - emit({ ...message, headers: { Authorization: 'bad' } }) - await flush() - assert.equal(calls, 0) - for (const payload of [ - { method: 'GET', path: '/admin' }, - { method: 'GET', path: 'status', headers: { Authorization: 'bad' } }, - { method: 'GET', path: 'status', baseURL: 'https://evil.test' }, - { method: 'GET', path: 'status', data: {} }, - { method: 'TRACE', path: 'status' }, - { method: 'POST', path: 'status', data: 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES + 1) }, - { method: 'POST', path: 'status', data: JSON.parse('{"__proto__":{"bad":true}}') }, - ]) { - emit({ ...message, payload }) - await flush() - assert.equal(pair.childWindow.messages.at(-1).payload.ok, false) - } - assert.equal(calls, 0) - pair.replaceTarget() - emit(message) - await flush() - assert.equal(calls, 0) - pair.destroy() -} - -// 页面超时、销毁或会话过期后,不再返回旧请求的结果。 -{ - let now = 0 - const pending = deferred() - let captured - const pair = await setup({ - now: () => now, - request: (config) => { - captured = config - return pending.promise - }, - }) - const promise = pair.child.request({ method: 'GET', path: 'slow' }) - const rejected = assert.rejects(promise, /失效/) - await flush() - pair.host.destroy({ logout: true }) - await rejected - assert.equal(captured.signal.aborted, true) - pending.resolve({ secret: 'late-result' }) - await flush() - assert.equal( - pair.childWindow.messages.some((message) => message.type === 'result'), - false - ) - assert.equal(pair.childWindow.listeners.size, 0) - pair.destroy() -} -{ - const pending = deferred() - let captured - const pair = await setup({ - request: (config) => { - captured = config - return pending.promise - }, - timeoutMs: 10, - }) - await assert.rejects(pair.child.request({ method: 'GET', path: 'slow' }), /超时/) - assert.equal(captured.signal.aborted, true) - pending.resolve({ late: true }) - await flush() - assert.equal(pair.childWindow.messages.filter((message) => message.type === 'result').length, 1) - pair.destroy() -} -{ - let now = 0 - let calls = 0 - const pair = await setup({ - now: () => now, - request: async () => { - calls += 1 - return {} - }, - }) - now = 301000 - const controller = new AbortController() - const promise = pair.child.request( - { method: 'GET', path: 'status' }, - { signal: controller.signal } - ) - const rejected = assert.rejects(promise, /取消/) - await flush() - assert.equal(calls, 0) - controller.abort() - await rejected - pair.destroy() -} - -// 会话续期只更新宿主侧会话和 CSRF 令牌,不重新启动子页面 SDK。 -{ - let captured - const pair = await setup({ - request: async (config) => { - captured = config - return {} - }, - }) - pair.host.setSession( - validatePluginSession({ ...sessionData, csrfToken: 'renewed-csrf-token-test' }, 'demo') - ) - await pair.child.request({ method: 'GET', path: 'status' }) - assert.equal(captured.headers['X-Plugin-CSRF'], 'renewed-csrf-token-test') - assert.equal( - pair.childWindow.messages.filter((message) => message.type === 'initialize').length, - 1 - ) - assert.throws(() => pair.host.setSession({ ...sessionData, apiBase: '/apps/other/api/' })) - pair.destroy() -} - -// iframe 重载会保留 WindowProxy,但必须更换文档随机标识并取消旧请求。 -// 旧文档迟到的 ready 消息不能恢复旧连接。 -{ - const pending = deferred() - const captured = [] - const pair = await setup({ - request: (config) => { - captured.push(config) - return config.url.endsWith('/slow') ? pending.promise : Promise.resolve({ code: 200 }) - }, - }) - const oldReady = pair.hostWindow.messages.find((message) => message.type === 'ready') - const oldInit = pair.childWindow.messages.find((message) => message.type === 'initialize') - const oldPromise = pair.child.request({ method: 'GET', path: 'slow' }) - const oldRejected = assert.rejects(oldPromise, /关闭/) - await flush() - // 在同一个子窗口 WindowProxy 上模拟新文档的 SDK。 - const fresh = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - await fresh.ready - assert.equal(captured[0].signal.aborted, true) - const newInit = pair.childWindow.messages - .filter((message) => message.type === 'initialize') - .at(-1) - assert.notEqual(newInit.instance, oldInit.instance) - pair.hostWindow.dispatch({ data: oldReady, origin: ORIGIN, source: pair.childWindow }) - pending.resolve({ data: 'from-old-page' }) - await flush() - assert.equal( - pair.childWindow.messages.filter((message) => message.type === 'initialize').length, - 2 - ) - assert.equal( - pair.childWindow.messages.some((message) => message.type === 'result'), - false - ) - pair.child.destroy() - await oldRejected - assert.deepEqual(await fresh.request({ method: 'GET', path: 'status' }), { code: 200 }) - fresh.destroy() - pair.destroy() -} - -// 验证并发上限和取消行为,服务端异常只返回可展示的错误文本。 -{ - const requests = [] - const pair = await setup({ - request: (config) => { - requests.push(config) - return new Promise(() => {}) - }, - }) - const promises = Array.from({ length: 8 }, () => - pair.child.request({ method: 'GET', path: 'wait' }) - ) - const rejected = promises.map((promise) => assert.rejects(promise, /关闭/)) - await flush() - await assert.rejects(pair.child.request({ method: 'GET', path: 'extra' }), /过多/) - pair.child.destroy() - await Promise.all(rejected) - await flush() - assert.equal(requests.length, 8) - assert.equal( - requests.every((config) => config.signal.aborted), - true - ) - pair.host.destroy() -} -{ - const pair = await setup({ - request: async () => { - throw new Error('secret master token stack trace') - }, - }) - await assert.rejects( - pair.child.request({ method: 'GET', path: 'failure' }), - /^Error: 插件请求失败,请重试$/ - ) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret master'), false) - pair.destroy() -} - -// 宿主无响应时,SDK 应在握手超时后移除监听。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - timeoutMs: 10, - }) - await assert.rejects(child.ready, /初始化超时/) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 首次握手期间支持取消请求,握手前后的排队请求使用相同并发上限。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const controller = new AbortController() - const promise = child.request({ method: 'GET', path: 'status' }, { signal: controller.signal }) - const cancelled = assert.rejects(promise, /已取消/) - controller.abort() - await cancelled - assert.equal( - pair.hostWindow.messages.some((message) => message.type === 'request'), - false - ) - - const pending = Array.from({ length: 8 }, () => child.request({ method: 'GET', path: 'status' })) - const rejected = pending.map((entry) => assert.rejects(entry, /关闭/)) - await assert.rejects(child.request({ method: 'GET', path: 'overflow' }), /过多/) - child.destroy() - await Promise.all(rejected) - assert.equal(pair.childWindow.listeners.size, 0) -} - -await checkFileTransfers() - -// 无效文件在子页面和宿主两侧分别拒绝,下载也不能返回错误信封或过大响应。 -{ - let calls = 0 - const pair = await setup({ - request: async () => { - calls += 1 - return {} - }, - }) - const valid = { path: 'upload', file: new Blob(['test']) } - for (const changes of [ - { file: 'not a file' }, - { file: new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]) }, - { filename: '../secret' }, - { filename: 'bad\nname' }, - { fieldName: 'a\r\nb' }, - { fields: { file: 'duplicate' } }, - { fields: { number: 1 } }, - { params: null }, - { path: '//outside.test' }, - { method: 'GET' }, - { headers: { Authorization: 'forged' } }, - ]) - await assert.rejects(pair.child.upload({ ...valid, ...changes })) - await assert.rejects(pair.child.download({ path: '../outside' })) - await assert.rejects(pair.child.download({ path: 'ok' }, { onProgress: true })) - const init = pair.childWindow.messages.find((message) => message.type === 'initialize') - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: init.instance, - type: 'upload', - id: 'forged-file', - payload: { - method: 'POST', - path: 'upload', - file: 'bad', - fieldName: 'file', - filename: 'x', - fields: {}, - }, - }, - }) - await flush() - assert.equal(calls, 0) - assert.equal( - pair.childWindow.messages.find((message) => message.id === 'forged-file').payload.ok, - false - ) - pair.destroy() -} -for (const body of [ - new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]), - new Blob(['{"code":401,"msg":"secret token"}'], { type: 'application/json' }), - { headers: { authorization: 'secret' } }, -]) { - const pair = await setup({ request: async () => body }) - await assert.rejects(pair.child.download({ path: 'report' }), /插件请求失败/) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret'), false) - pair.destroy() -} -{ - const pair = await setup({ - request: async () => new Blob(['{"report":true}'], { type: 'application/json' }), - }) - assert.equal(await (await pair.child.download({ path: 'report' })).text(), '{"report":true}') - pair.destroy() -} - -// 超限进度立即取消传输;取消和超时之后,迟到进度及响应均被丢弃。 -for (const mode of ['oversize', 'cancel', 'timeout', 'reload']) { - const delayed = deferred() - let config - const events = [] - const pair = await setup({ - transferTimeoutMs: mode === 'timeout' ? 10 : 120000, - request: (value) => { - config = value - return delayed.promise - }, - }) - const controller = new AbortController() - const promise = pair.child.download( - { path: 'report' }, - { signal: controller.signal, onProgress: (event) => events.push(event) } - ) - const rejected = assert.rejects(promise) - await flush() - if (mode === 'oversize') config.onDownloadProgress({ loaded: PLUGIN_BRIDGE_MAX_FILE_BYTES + 1 }) - if (mode === 'cancel') controller.abort() - if (mode === 'reload') { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: '', - type: 'ready', - payload: { clientId: 'new-file-document' }, - }, - }) - pair.child.destroy() - } - await rejected - await flush() - assert.equal(config.signal.aborted, true) - config.onDownloadProgress({ loaded: 3, total: 3 }) - delayed.resolve(new Blob(['old'])) - await flush() - assert.equal(events.length, 0) - pair.destroy() -} - -// 未公布文件能力的旧宿主立即报兼容错误;握手前调用仍可正常排队。 -for (const filesSupported of [false, true]) { - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const pending = child.download({ path: 'report' }) - const clientId = pair.hostWindow.messages[0].payload.clientId - pair.childWindow.dispatch({ - origin: ORIGIN, - source: pair.hostWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - type: 'initialize', - instance: 'host-instance', - payload: { clientId, ...(filesSupported ? { capabilities: { files: { version: 1 } } } : {}) }, - }, - }) - if (filesSupported) { - await flush() - const request = pair.hostWindow.messages.find((message) => message.type === 'download') - assert.ok(request) - const rejected = assert.rejects(pending, /关闭/) - child.destroy() - await rejected - } else { - await assert.rejects(pending, /不支持文件传输/) - child.destroy() - } -} - -// 实时事件按回调 Promise 确认逐条传递,查询、游标与会话信息只交给宿主适配器。 -{ - const gate = deferred() - const events = [] - let produced = 0 - let config - const pair = await setup({ - stream: async function* (value) { - config = value - for (let i = 1; i <= 3; i++) { - produced++ - yield { event: 'tick', data: String(i), id: String(i) } - } - }, - }) - const result = pair.child.stream( - { path: 'events', params: { count: 3 }, lastEventId: '0' }, - { - onEvent: async (event) => { - events.push(event) - if (event.id === '1') await gate.promise - }, - } - ) - await flush() - assert.equal(produced, 1) - assert.equal(events.length, 1) - assert.equal(config.url, '/apps/demo/api/events') - assert.deepEqual(config.params, { count: 3 }) - assert.equal(config.lastEventId, '0') - assert.equal(config.csrfToken, sessionData.csrfToken) - assert.equal(pair.child.context.capabilities.streams.maxConcurrent, 2) - const streamMessage = pair.hostWindow.messages.find((message) => message.type === 'stream') - for (const payload of [{ sequence: 2 }, { sequence: 1, extra: true }]) { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { ...streamMessage, type: 'stream-ack', payload }, - }) - } - await flush() - assert.equal(produced, 1, '无效确认不能提前读取下一条事件') - gate.resolve() - assert.equal(await result, undefined) - await flush() - assert.deepEqual( - events.map((event) => event.id), - ['1', '2', '3'] - ) - assert.equal(config.signal.aborted, true) - pair.destroy() -} - -// 绕过 SDK 直接发送消息仍受宿主路径、字段和连接数校验。 -{ - let opened = 0 - const pair = await setup({ - stream: async function* ({ signal }) { - opened++ - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - }, - }) - const initialize = pair.childWindow.messages.find((message) => message.type === 'initialize') - const sendStream = (id, payload) => - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { ...initialize, type: 'stream', id, payload }, - }) - sendStream('malformed-stream', { path: 'events', headers: { Authorization: 'forbidden' } }) - await flush() - assert.equal(opened, 0) - assert.equal(pair.childWindow.messages.at(-1).payload.ok, false) - for (const id of ['stream-one', 'stream-two', 'stream-three']) sendStream(id, { path: 'events' }) - await flush() - assert.equal(opened, 2) - assert.match( - pair.childWindow.messages.find((message) => message.id === 'stream-three').payload.message, - /连接过多/ - ) - pair.destroy() -} - -// 初始化尚未完成时也计入实时连接数;取消排队请求后可重新排队。 -{ - const pair = windowPair() - const child = createPluginClient({ - pluginId: 'demo', - eventTarget: pair.childWindow, - parentWindow: pair.hostWindow, - origin: ORIGIN, - }) - const controller = new AbortController() - const first = child.stream({ path: 'events' }, { onEvent() {}, signal: controller.signal }) - const second = child.stream({ path: 'events' }, { onEvent() {} }) - const firstRejected = assert.rejects(first, /取消/) - const secondRejected = assert.rejects(second, /关闭/) - await assert.rejects(child.stream({ path: 'events' }, { onEvent() {} }), /连接过多/) - controller.abort() - await firstRejected - const replacement = assert.rejects(child.stream({ path: 'events' }, { onEvent() {} }), /关闭/) - child.destroy() - await Promise.all([secondRejected, replacement]) -} - -// 宿主主动关闭使用固定提示,不泄露鉴权异常,也不交付保留的控制消息。 -{ - const pair = await setup({ - stream: async function* () { - yield { id: '1', event: 'tick', data: 'first' } - const error = new Error('secret authentication details') - error.name = 'PluginStreamClosedError' - throw error - }, - }) - const events = [] - await assert.rejects( - pair.child.stream({ path: 'events' }, { onEvent: (event) => events.push(event) }), - /宿主关闭/ - ) - assert.equal(events.length, 1) - assert.equal(JSON.stringify(pair.childWindow.messages).includes('secret'), false) - pair.destroy() -} - -// 无能力协商的旧宿主不接收流请求;接口路径、任意请求头与游标注入均被拒绝。 -{ - const pair = await setup() - await assert.rejects(pair.child.stream({ path: 'events' }, { onEvent() {} }), /不支持实时/) - for (const payload of [ - { path: '../other' }, - { path: 'events', headers: {} }, - { path: 'events', method: 'POST' }, - { path: 'events', lastEventId: 'bad\nvalue' }, - ]) - await assert.rejects(pair.child.stream(payload, { onEvent() {} })) - await assert.rejects(pair.child.stream({ path: 'events' }), /回调/) - pair.destroy() -} - -// 第三个实时连接被拒绝,普通 JSON 请求仍可进行;取消会关闭底层迭代器。 -{ - const controllers = [new AbortController(), new AbortController()] - let closed = 0 - const pair = await setup({ - stream: async function* ({ signal }) { - try { - yield { event: 'tick', data: 'one', id: '1' } - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - } finally { - closed++ - } - }, - }) - const requests = controllers.map((controller) => - pair.child.stream({ path: 'events' }, { signal: controller.signal, onEvent() {} }) - ) - const rejected = requests.map((promise) => assert.rejects(promise, /取消/)) - await flush() - await assert.rejects(pair.child.stream({ path: 'events' }, { onEvent() {} }), /实时连接过多/) - assert.deepEqual(await pair.child.request({ method: 'GET', path: 'ok' }), { - code: 200, - data: 'ok', - }) - for (const controller of controllers) controller.abort() - await Promise.all(rejected) - await flush() - assert.equal(closed, 2) - pair.destroy() -} - -// 处理失败、超时、页面重载和退出均取消旧流,迟到事件不能更新当前页面。 -for (const mode of ['callback', 'timeout', 'reload', 'logout', 'oversize']) { - const delivered = [] - let signal - let closed = false - const pair = await setup({ - streamTimeoutMs: mode === 'timeout' ? 20 : 300000, - stream: async function* (config) { - signal = config.signal - try { - yield { - event: 'tick', - id: '1', - data: mode === 'oversize' ? 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES) : 'one', - } - if (!signal.aborted) - await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) - yield { event: 'tick', id: '2', data: 'late' } - } finally { - closed = true - } - }, - }) - const request = pair.child.stream( - { path: 'events' }, - { - onEvent: (event) => { - delivered.push(event.id) - if (mode === 'callback') return Promise.reject(new Error('plugin callback failed')) - }, - } - ) - const rejected = assert.rejects(request) - await flush() - if (mode === 'logout') pair.host.destroy({ logout: true }) - if (mode === 'reload') { - pair.hostWindow.dispatch({ - origin: ORIGIN, - source: pair.childWindow, - data: { - namespace: 'ruoyi.plugin', - version: 1, - pluginId: 'demo', - instance: '', - type: 'ready', - payload: { clientId: 'new-stream-document' }, - }, - }) - pair.child.destroy() - } - await rejected - await flush() - assert.equal(signal.aborted, true) - assert.equal(closed, true) - assert.deepEqual(delivered, mode === 'oversize' ? [] : ['1']) - pair.destroy() -} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.ts new file mode 100644 index 000000000..64ee80885 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridge.test.ts @@ -0,0 +1,930 @@ +import type { PluginProgress, PluginStreamEvent } from '../../src/utils/pluginBridge.js' +import { createMessageWindows } from './fixtures/messageWindows' +import { expect, test } from 'vitest' +import { + createPluginClient, + createPluginHostBridge, + normalizePluginBase, + PLUGIN_BRIDGE_MAX_BYTES, + PLUGIN_BRIDGE_MAX_FILE_BYTES, + validatePluginApiPath, + validatePluginRoute, + validatePluginSession, +} from '../../src/utils/pluginBridge.js' +import { normalizeTransportPath } from '../../src/utils/transportPath.ts' + +// 文件通过真实结构化克隆进入宿主,表单由宿主重建且仍使用受限会话。 +async function checkFileTransfers() { + const requests: RequestConfig[] = [] + const events: PluginProgress[] = [] + const pair = await setup({ + request: async (config) => { + requests.push(config) + if (config.responseType === 'blob') { + config.onDownloadProgress({ loaded: 6, total: 6 }) + return new Blob(['报告'], { type: 'text/plain' }) + } + expect(config.data!.get('category')).toBe('test') + const file = config.data!.get('attachment') + if (!(file instanceof File)) throw new Error('Expected attachment file') + expect(file.name).toBe('报告.txt') + expect(await file.text()).toBe('报告') + config.onUploadProgress({ loaded: 3, total: 6 }) + config.onUploadProgress({ loaded: 6, total: 6 }) + return { received: file.size } + }, + }) + try { + const result = await pair.child.upload( + { + path: 'files/upload', + file: new Blob(['报告']), + filename: '报告.txt', + fieldName: 'attachment', + fields: { category: 'test' }, + }, + { + onProgress: (event) => { + events.push(event) + throw new Error('插件回调错误') + }, + } + ) + expect(result).toStrictEqual({ received: 6 }) + expect(events.at(-1)).toStrictEqual({ phase: 'upload', loaded: 6, total: 6 }) + const blob = await pair.child.download( + { path: 'files/report', params: { month: '10' } }, + { onProgress: (event) => events.push(event) } + ) + expect(await blob.text()).toBe('报告') + expect(blob.type).toBe('text/plain') + expect(events.at(-1)).toStrictEqual({ phase: 'download', loaded: 6, total: 6 }) + for (const config of requests) { + expect(config.headers.isToken).toBe(false) + expect(config.headers['X-Plugin-CSRF']).toBe(sessionData.csrfToken) + expect(config.headers.Authorization).toBe(undefined) + expect(config.headers.encrypt).toBe(false) + expect(config.timeout).toBe(120000) + expect(config.pluginBridge).toBe(true) + } + expect(requests[0].headers['Content-Type']).toBe(undefined) + expect(requests[0].url).toBe('/apps/demo/api/files/upload') + expect(pair.child.context?.capabilities?.files?.maxBytes).toBe(PLUGIN_BRIDGE_MAX_FILE_BYTES) + } finally { + pair.destroy() + } +} + +const ORIGIN = 'https://example.test' +const sessionData = { + pluginId: 'demo', + bridgeVersion: 1, + uiBase: '/apps/demo/ui/', + apiBase: '/apps/demo/api/', + csrfToken: 'csrf-token-for-tests-only', + expiresIn: 300, +} +const deferred = () => Promise.withResolvers() +const flush = () => new Promise((resolve) => setImmediate(resolve)) + +type HostOptions = Parameters[0] +type RequestConfig = { + url: string + baseURL?: string + pluginBridge?: boolean + timeout?: number + headers: Record + responseType?: string + data?: FormData + signal: AbortSignal + onDownloadProgress(event: { loaded: number; total?: number }): void + onUploadProgress(event: { loaded: number; total?: number }): void +} + +async function setup({ + request = async () => ({ code: 200, data: 'ok' }), + now = Date.now, + timeoutMs = 15000, + transferTimeoutMs = 120000, + stream, + streamTimeoutMs = 300000, +}: Pick & { + request?: (config: RequestConfig) => Promise +} = {}) { + const { hostWindow, childWindow } = createMessageWindows(ORIGIN) + let target = childWindow + let theme = 'light' + const routes: string[] = [] + const host = createPluginHostBridge({ + pluginId: 'demo', + session: validatePluginSession(sessionData, 'demo', '', now()), + getTarget: () => target, + request: (config) => request(config as RequestConfig), + stream, + getContext: () => ({ + theme: { mode: theme }, + language: 'zh-CN', + timeZone: 'Asia/Shanghai', + route: '/', + }), + onRoute: (route) => routes.push(route), + eventTarget: hostWindow, + origin: ORIGIN, + now, + timeoutMs, + transferTimeoutMs, + streamTimeoutMs, + }) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: childWindow, + parentWindow: hostWindow, + origin: ORIGIN, + transferTimeoutMs, + streamTimeoutMs, + }) + await child.ready + return { + hostWindow, + childWindow, + host, + child, + routes, + replaceTarget: () => { + target = createMessageWindows(ORIGIN).childWindow + }, + changeTheme: () => { + theme = 'dark' + host.updatePreferences() + }, + destroy: () => { + host.destroy() + child.destroy() + }, + } +} + +test('规范化并验证插件部署前缀', () => { + expect(normalizePluginBase('/deployment/')).toBe('/deployment') + for (const base of ['//evil.test', 'https://evil.test', '/a/../b', '/%2e', '/x\\y', '/x//y']) { + expect(() => normalizePluginBase(base)).toThrow() + } +}) + +test('验证插件会话与 API 路由边界', () => { + expect(validatePluginSession(sessionData, 'demo', '', 100).expiresAt).toBe(300100) + expect( + validatePluginSession( + { ...sessionData, uiBase: '/prefix/apps/demo/ui/', apiBase: '/prefix/apps/demo/api/' }, + 'demo', + '/prefix' + ).apiBase + ).toBe('/prefix/apps/demo/api/') + for (const changes of [ + { uiBase: '//evil.test/apps/demo/ui/' }, + { uiBase: 'https://example.test/apps/demo/ui/' }, + { apiBase: '/apps/other/api/' }, + { apiBase: '/prefix/apps/demo/api/' }, + { apiBase: '/apps/demo/api/../' }, + { pluginId: 'other' }, + { expiresIn: 0 }, + { expiresIn: 5000 }, + { bridgeVersion: 2 }, + { csrfToken: 'bad\nheader' }, + ]) + expect(() => validatePluginSession({ ...sessionData, ...changes }, 'demo')).toThrow() + for (const path of ['', 'status', 'model/v1.2', 'reports/2026-10/']) + expect(validatePluginApiPath(path)).toBe(path) + for (const path of [ + '/status', + '//evil.test', + 'https://evil.test', + '..', + 'a/../b', + 'a/./b', + 'a//b', + 'a\\b', + '%2e%2e/admin', + '%252e%252e', + 'a%2fb', + 'a?x=1', + 'a#hash', + 'a\n', + ]) { + expect(() => validatePluginApiPath(path), path).toThrow() + } + expect(validatePluginRoute('/reports/today')).toBe('/reports/today') + expect(() => validatePluginRoute('//outside')).toThrow() + expect(() => validatePluginRoute('/../admin')).toThrow() + expect(normalizeTransportPath('/root/apps/demo/api/status', '/dev-api', '/root')).toBe( + '/apps/demo/api/status' + ) + expect(normalizeTransportPath('/root/plugin/runtime/demo/session', '/dev-api', '/root')).toBe( + '/plugin/runtime/demo/session' + ) + expect(normalizeTransportPath('/dev-api/system/user', '/dev-api')).toBe('/system/user') + expect(normalizeTransportPath('/dev-api-other/user', '/dev-api')).toBe('/dev-api-other/user') + expect(normalizeTransportPath('/rooted/apps/demo/api/status', '/dev-api', '/root')).toBe( + '/rooted/apps/demo/api/status' + ) +}) + +test('验证握手、接口请求和上下文同步,不向子页面传递宿主令牌或 CSRF 令牌', async () => { + const requests: RequestConfig[] = [] + const pair = await setup({ + request: async (config) => { + requests.push(config) + return { code: 200, data: [1, 2] } + }, + }) + expect(pair.child.context?.apiBase).toBe('/apps/demo/api/') + expect(pair.child.context).not.toHaveProperty('csrfToken') + const result = await pair.child.request({ + method: 'POST', + path: 'status', + data: { value: 3 }, + params: { page: 1 }, + }) + expect(result).toStrictEqual({ code: 200, data: [1, 2] }) + expect(requests[0].url).toBe('/apps/demo/api/status') + expect(requests[0].baseURL).toBe('') + expect(requests[0].headers).toStrictEqual({ + isToken: false, + 'X-Plugin-CSRF': sessionData.csrfToken, + repeatSubmit: false, + }) + expect(requests[0].headers.Authorization).toBe(undefined) + expect(requests[0].pluginBridge).toBe(true) + pair.changeTheme() + await flush() + expect(pair.child.context?.theme?.mode).toBe('dark') + pair.child.navigate('/details') + await flush() + expect(pair.routes).toStrictEqual(['/details']) + pair.host.updateRoute('/back') + await flush() + expect(pair.child.context?.route).toBe('/back') + const events: string[] = [] + pair.child.subscribe((event) => events.push(event.type)) + pair.host.refresh() + await flush() + expect(events).toStrictEqual(['refresh']) + pair.destroy() + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('拒绝伪造来源、旧页面随机标识、无效字段和接口路径越界', async () => { + let calls = 0 + const pair = await setup({ + request: async () => { + calls += 1 + return {} + }, + }) + const initialization = pair.childWindow.messages.find((message) => message.type === 'initialize') + const message = { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + type: 'request', + instance: initialization!.instance, + id: 'test', + payload: { method: 'GET', path: 'status' }, + } + const emit = (data: unknown, origin = ORIGIN, source: unknown = pair.childWindow) => + pair.hostWindow.dispatch({ data, origin, source }) + emit(message, 'https://evil.test') + emit(message, ORIGIN, {}) + emit({ ...message, instance: 'previous-frame' }) + emit({ ...message, version: 2 }) + emit({ ...message, pluginId: 'other' }) + emit({ ...message, headers: { Authorization: 'bad' } }) + await flush() + expect(calls).toBe(0) + for (const payload of [ + { method: 'GET', path: '/admin' }, + { method: 'GET', path: 'status', headers: { Authorization: 'bad' } }, + { method: 'GET', path: 'status', baseURL: 'https://evil.test' }, + { method: 'GET', path: 'status', data: {} }, + { method: 'TRACE', path: 'status' }, + { method: 'POST', path: 'status', data: 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES + 1) }, + { method: 'POST', path: 'status', data: JSON.parse('{"__proto__":{"bad":true}}') }, + ]) { + emit({ ...message, payload }) + await flush() + expect(pair.childWindow.messages.at(-1)!.payload.ok).toBe(false) + } + expect(calls).toBe(0) + pair.replaceTarget() + emit(message) + await flush() + expect(calls).toBe(0) + pair.destroy() +}) + +test('页面超时、销毁或会话过期后,不再返回旧请求的结果', async () => { + { + let now = 0 + const pending = deferred() + let captured!: RequestConfig + const pair = await setup({ + now: () => now, + request: (config) => { + captured = config + return pending.promise + }, + }) + const promise = pair.child.request({ method: 'GET', path: 'slow' }) + const rejected = expect(promise).rejects.toThrow(/失效/) + await flush() + pair.host.destroy({ logout: true }) + await rejected + expect(captured.signal.aborted).toBe(true) + pending.resolve({ secret: 'late-result' }) + await flush() + expect(pair.childWindow.messages.some((message) => message.type === 'result')).toBe(false) + expect(pair.childWindow.listeners.size).toBe(0) + pair.destroy() + } + { + const pending = deferred() + let captured!: RequestConfig + const pair = await setup({ + request: (config) => { + captured = config + return pending.promise + }, + timeoutMs: 10, + }) + await expect(pair.child.request({ method: 'GET', path: 'slow' })).rejects.toThrow(/超时/) + expect(captured.signal.aborted).toBe(true) + pending.resolve({ late: true }) + await flush() + expect(pair.childWindow.messages.filter((message) => message.type === 'result').length).toBe(1) + pair.destroy() + } + { + let now = 0 + let calls = 0 + const pair = await setup({ + now: () => now, + request: async () => { + calls += 1 + return {} + }, + }) + now = 301000 + const controller = new AbortController() + const promise = pair.child.request( + { method: 'GET', path: 'status' }, + { signal: controller.signal } + ) + const rejected = expect(promise).rejects.toThrow(/取消/) + await flush() + expect(calls).toBe(0) + controller.abort() + await rejected + pair.destroy() + } +}) + +test('会话续期只更新宿主侧会话和 CSRF 令牌,不重新启动子页面 SDK', async () => { + let captured!: RequestConfig + const pair = await setup({ + request: async (config) => { + captured = config + return {} + }, + }) + pair.host.setSession( + validatePluginSession({ ...sessionData, csrfToken: 'renewed-csrf-token-test' }, 'demo') + ) + await pair.child.request({ method: 'GET', path: 'status' }) + expect(captured.headers['X-Plugin-CSRF']).toBe('renewed-csrf-token-test') + expect(pair.childWindow.messages.filter((message) => message.type === 'initialize').length).toBe( + 1 + ) + expect(() => + Reflect.apply(pair.host.setSession, pair.host, [ + { ...sessionData, apiBase: '/apps/other/api/' }, + ]) + ).toThrow() + pair.destroy() +}) + +test('旧文档迟到的 ready 消息不能恢复旧连接', async () => { + const pending = deferred() + const captured: RequestConfig[] = [] + const pair = await setup({ + request: (config) => { + captured.push(config) + return config.url.endsWith('/slow') ? pending.promise : Promise.resolve({ code: 200 }) + }, + }) + const oldReady = pair.hostWindow.messages.find((message) => message.type === 'ready') + const oldInit = pair.childWindow.messages.find((message) => message.type === 'initialize') + const oldPromise = pair.child.request({ method: 'GET', path: 'slow' }) + const oldRejected = expect(oldPromise).rejects.toThrow(/关闭/) + await flush() + // 在同一个子窗口 WindowProxy 上模拟新文档的 SDK。 + const fresh = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + await fresh.ready + expect(captured[0].signal.aborted).toBe(true) + const newInit = pair.childWindow.messages + .filter((message) => message.type === 'initialize') + .at(-1) + expect(newInit!.instance).not.toBe(oldInit!.instance) + pair.hostWindow.dispatch({ data: oldReady, origin: ORIGIN, source: pair.childWindow }) + pending.resolve({ data: 'from-old-page' }) + await flush() + expect(pair.childWindow.messages.filter((message) => message.type === 'initialize').length).toBe( + 2 + ) + expect(pair.childWindow.messages.some((message) => message.type === 'result')).toBe(false) + pair.child.destroy() + await oldRejected + expect(await fresh.request({ method: 'GET', path: 'status' })).toStrictEqual({ code: 200 }) + fresh.destroy() + pair.destroy() +}) + +test('验证并发上限和取消行为,服务端异常只返回可展示的错误文本', async () => { + { + const requests: RequestConfig[] = [] + const pair = await setup({ + request: (config) => { + requests.push(config) + return new Promise(() => {}) + }, + }) + const promises = Array.from({ length: 8 }, () => + pair.child.request({ method: 'GET', path: 'wait' }) + ) + const rejected = promises.map((promise) => expect(promise).rejects.toThrow(/关闭/)) + await flush() + await expect(pair.child.request({ method: 'GET', path: 'extra' })).rejects.toThrow(/过多/) + pair.child.destroy() + await Promise.all(rejected) + await flush() + expect(requests.length).toBe(8) + expect(requests.every((config) => config.signal.aborted)).toBe(true) + pair.host.destroy() + } + { + const pair = await setup({ + request: async () => { + throw new Error('secret master token stack trace') + }, + }) + await expect(pair.child.request({ method: 'GET', path: 'failure' })).rejects.toMatchObject({ + name: 'Error', + message: '插件请求失败,请重试', + }) + expect(JSON.stringify(pair.childWindow.messages).includes('secret master')).toBe(false) + pair.destroy() + } +}) + +test('宿主无响应时,SDK 应在握手超时后移除监听', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + timeoutMs: 10, + }) + await expect(child.ready).rejects.toThrow(/初始化超时/) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('首次握手期间支持取消请求,握手前后的排队请求使用相同并发上限', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const controller = new AbortController() + const promise = child.request({ method: 'GET', path: 'status' }, { signal: controller.signal }) + const cancelled = expect(promise).rejects.toThrow(/已取消/) + controller.abort() + await cancelled + expect(pair.hostWindow.messages.some((message) => message.type === 'request')).toBe(false) + + const pending = Array.from({ length: 8 }, () => child.request({ method: 'GET', path: 'status' })) + const rejected = pending.map((entry) => expect(entry).rejects.toThrow(/关闭/)) + await expect(child.request({ method: 'GET', path: 'overflow' })).rejects.toThrow(/过多/) + child.destroy() + await Promise.all(rejected) + expect(pair.childWindow.listeners.size).toBe(0) +}) + +test('文件传输使用宿主会话并保留表单数据', checkFileTransfers) + +test('无效文件在子页面和宿主两侧分别拒绝,下载也不能返回错误信封或过大响应', async () => { + { + let calls = 0 + const pair = await setup({ + request: async () => { + calls += 1 + return {} + }, + }) + const valid = { path: 'upload', file: new Blob(['test']) } + for (const changes of [ + { file: 'not a file' }, + { file: new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]) }, + { filename: '../secret' }, + { filename: 'bad\nname' }, + { fieldName: 'a\r\nb' }, + { fields: { file: 'duplicate' } }, + { fields: { number: 1 } }, + { params: null }, + { path: '//outside.test' }, + { method: 'GET' }, + { headers: { Authorization: 'forged' } }, + ]) + await expect( + Reflect.apply(pair.child.upload, pair.child, [{ ...valid, ...changes }]) + ).rejects.toThrow() + await expect(pair.child.download({ path: '../outside' })).rejects.toThrow() + await expect( + Reflect.apply(pair.child.download, pair.child, [{ path: 'ok' }, { onProgress: true }]) + ).rejects.toThrow() + const init = pair.childWindow.messages.find((message) => message.type === 'initialize') + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: init!.instance, + type: 'upload', + id: 'forged-file', + payload: { + method: 'POST', + path: 'upload', + file: 'bad', + fieldName: 'file', + filename: 'x', + fields: {}, + }, + }, + }) + await flush() + expect(calls).toBe(0) + expect( + pair.childWindow.messages.find((message) => message.id === 'forged-file')!.payload.ok + ).toBe(false) + pair.destroy() + } + for (const body of [ + new Blob([new Uint8Array(PLUGIN_BRIDGE_MAX_FILE_BYTES + 1)]), + new Blob(['{"code":401,"msg":"secret token"}'], { type: 'application/json' }), + { headers: { authorization: 'secret' } }, + ]) { + const pair = await setup({ request: async () => body }) + await expect(pair.child.download({ path: 'report' })).rejects.toThrow(/插件请求失败/) + expect(JSON.stringify(pair.childWindow.messages).includes('secret')).toBe(false) + pair.destroy() + } + { + const pair = await setup({ + request: async () => new Blob(['{"report":true}'], { type: 'application/json' }), + }) + expect(await (await pair.child.download({ path: 'report' })).text()).toBe('{"report":true}') + pair.destroy() + } +}) + +test('超限进度立即取消传输;取消和超时之后,迟到进度及响应均被丢弃', async () => { + for (const mode of ['oversize', 'cancel', 'timeout', 'reload']) { + const delayed = deferred() + let config!: RequestConfig + const events: PluginProgress[] = [] + const pair = await setup({ + transferTimeoutMs: mode === 'timeout' ? 10 : 120000, + request: (value) => { + config = value + return delayed.promise + }, + }) + const controller = new AbortController() + const promise = pair.child.download( + { path: 'report' }, + { signal: controller.signal, onProgress: (event) => events.push(event) } + ) + const rejected = expect(promise).rejects.toThrow() + await flush() + if (mode === 'oversize') config.onDownloadProgress({ loaded: PLUGIN_BRIDGE_MAX_FILE_BYTES + 1 }) + if (mode === 'cancel') controller.abort() + if (mode === 'reload') { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: '', + type: 'ready', + payload: { clientId: 'new-file-document' }, + }, + }) + pair.child.destroy() + } + await rejected + await flush() + expect(config.signal.aborted).toBe(true) + config.onDownloadProgress({ loaded: 3, total: 3 }) + delayed.resolve(new Blob(['old'])) + await flush() + expect(events.length).toBe(0) + pair.destroy() + } +}) + +test('未公布文件能力的旧宿主立即报兼容错误;握手前调用仍可正常排队', async () => { + for (const filesSupported of [false, true]) { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const pending = child.download({ path: 'report' }) + const clientId = pair.hostWindow.messages[0].payload.clientId + pair.childWindow.dispatch({ + origin: ORIGIN, + source: pair.hostWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + type: 'initialize', + instance: 'host-instance', + payload: { + clientId, + ...(filesSupported ? { capabilities: { files: { version: 1 } } } : {}), + }, + }, + }) + if (filesSupported) { + await flush() + const request = pair.hostWindow.messages.find((message) => message.type === 'download') + expect(request).toBeTruthy() + const rejected = expect(pending).rejects.toThrow(/关闭/) + child.destroy() + await rejected + } else { + await expect(pending).rejects.toThrow(/不支持文件传输/) + child.destroy() + } + } +}) + +test('实时事件按回调 Promise 确认逐条传递,查询、游标与会话信息只交给宿主适配器', async () => { + const gate = deferred() + const events: PluginStreamEvent[] = [] + let produced = 0 + let config!: Parameters>[0] + const pair = await setup({ + stream: async function* (value) { + config = value + for (let i = 1; i <= 3; i++) { + produced++ + yield { event: 'tick', data: String(i), id: String(i) } + } + }, + }) + const result = pair.child.stream( + { path: 'events', params: { count: 3 }, lastEventId: '0' }, + { + onEvent: async (event) => { + events.push(event) + if (event.id === '1') await gate.promise + }, + } + ) + await flush() + expect(produced).toBe(1) + expect(events.length).toBe(1) + expect(config.url).toBe('/apps/demo/api/events') + expect(config.params).toStrictEqual({ count: 3 }) + expect(config.lastEventId).toBe('0') + expect(config.csrfToken).toBe(sessionData.csrfToken) + expect(pair.child.context?.capabilities?.streams?.maxConcurrent).toBe(2) + const streamMessage = pair.hostWindow.messages.find((message) => message.type === 'stream') + for (const payload of [{ sequence: 2 }, { sequence: 1, extra: true }]) { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { ...streamMessage, type: 'stream-ack', payload }, + }) + } + await flush() + expect(produced, '无效确认不能提前读取下一条事件').toBe(1) + gate.resolve() + expect(await result).toBe(undefined) + await flush() + expect(events.map((event) => event.id)).toStrictEqual(['1', '2', '3']) + expect(config.signal.aborted).toBe(true) + pair.destroy() +}) + +test('绕过 SDK 直接发送消息仍受宿主路径、字段和连接数校验', async () => { + let opened = 0 + const pair = await setup({ + stream: async function* ({ signal }) { + opened++ + await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) + }, + }) + const initialize = pair.childWindow.messages.find((message) => message.type === 'initialize') + const sendStream = (id: string, payload: Record) => + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { ...initialize, type: 'stream', id, payload }, + }) + sendStream('malformed-stream', { path: 'events', headers: { Authorization: 'forbidden' } }) + await flush() + expect(opened).toBe(0) + expect(pair.childWindow.messages.at(-1)!.payload.ok).toBe(false) + for (const id of ['stream-one', 'stream-two', 'stream-three']) sendStream(id, { path: 'events' }) + await flush() + expect(opened).toBe(2) + expect( + pair.childWindow.messages.find((message) => message.id === 'stream-three')!.payload.message + ).toMatch(/连接过多/) + pair.destroy() +}) + +test('初始化尚未完成时也计入实时连接数;取消排队请求后可重新排队', async () => { + const pair = createMessageWindows(ORIGIN) + const child = createPluginClient({ + pluginId: 'demo', + eventTarget: pair.childWindow, + parentWindow: pair.hostWindow, + origin: ORIGIN, + }) + const controller = new AbortController() + const first = child.stream({ path: 'events' }, { onEvent() {}, signal: controller.signal }) + const second = child.stream({ path: 'events' }, { onEvent() {} }) + const firstRejected = expect(first).rejects.toThrow(/取消/) + const secondRejected = expect(second).rejects.toThrow(/关闭/) + await expect(child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow(/连接过多/) + controller.abort() + await firstRejected + const replacement = expect(child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /关闭/ + ) + child.destroy() + await Promise.all([secondRejected, replacement]) +}) + +test('宿主主动关闭使用固定提示,不泄露鉴权异常,也不交付保留的控制消息', async () => { + const pair = await setup({ + stream: async function* () { + yield { id: '1', event: 'tick', data: 'first' } + const error = new Error('secret authentication details') + error.name = 'PluginStreamClosedError' + throw error + }, + }) + const events: PluginStreamEvent[] = [] + await expect( + pair.child.stream( + { path: 'events' }, + { + onEvent: (event) => { + events.push(event) + }, + } + ) + ).rejects.toThrow(/宿主关闭/) + expect(events.length).toBe(1) + expect(JSON.stringify(pair.childWindow.messages).includes('secret')).toBe(false) + pair.destroy() +}) + +test('无能力协商的旧宿主不接收流请求;接口路径、任意请求头与游标注入均被拒绝', async () => { + const pair = await setup() + await expect(pair.child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /不支持实时/ + ) + for (const payload of [ + { path: '../other' }, + { path: 'events', headers: {} }, + { path: 'events', method: 'POST' }, + { path: 'events', lastEventId: 'bad\nvalue' }, + ]) + await expect(pair.child.stream(payload, { onEvent() {} })).rejects.toThrow() + await expect(Reflect.apply(pair.child.stream, pair.child, [{ path: 'events' }])).rejects.toThrow( + /回调/ + ) + pair.destroy() +}) + +test('第三个实时连接被拒绝,普通 JSON 请求仍可进行;取消会关闭底层迭代器', async () => { + const controllers = [new AbortController(), new AbortController()] + let closed = 0 + const pair = await setup({ + stream: async function* ({ signal }) { + try { + yield { event: 'tick', data: 'one', id: '1' } + await new Promise((resolve) => signal.addEventListener('abort', resolve, { once: true })) + } finally { + closed++ + } + }, + }) + const requests = controllers.map((controller) => + pair.child.stream({ path: 'events' }, { signal: controller.signal, onEvent() {} }) + ) + const rejected = requests.map((promise) => expect(promise).rejects.toThrow(/取消/)) + await flush() + await expect(pair.child.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /实时连接过多/ + ) + expect(await pair.child.request({ method: 'GET', path: 'ok' })).toStrictEqual({ + code: 200, + data: 'ok', + }) + for (const controller of controllers) controller.abort() + await Promise.all(rejected) + await flush() + expect(closed).toBe(2) + pair.destroy() +}) + +test('处理失败、超时、页面重载和退出均取消旧流,迟到事件不能更新当前页面', async () => { + for (const mode of ['callback', 'timeout', 'reload', 'logout', 'oversize']) { + const delivered: string[] = [] + let signal!: AbortSignal + let closed = false + const pair = await setup({ + streamTimeoutMs: mode === 'timeout' ? 20 : 300000, + stream: async function* (config) { + signal = config.signal + try { + yield { + event: 'tick', + id: '1', + data: mode === 'oversize' ? 'x'.repeat(PLUGIN_BRIDGE_MAX_BYTES) : 'one', + } + if (!signal.aborted) + await new Promise((resolve) => + signal.addEventListener('abort', resolve, { once: true }) + ) + yield { event: 'tick', id: '2', data: 'late' } + } finally { + closed = true + } + }, + }) + const request = pair.child.stream( + { path: 'events' }, + { + onEvent: (event) => { + delivered.push(event.id) + if (mode === 'callback') return Promise.reject(new Error('plugin callback failed')) + }, + } + ) + const rejected = expect(request).rejects.toThrow() + await flush() + if (mode === 'logout') pair.host.destroy({ logout: true }) + if (mode === 'reload') { + pair.hostWindow.dispatch({ + origin: ORIGIN, + source: pair.childWindow, + data: { + namespace: 'ruoyi.plugin', + version: 1, + pluginId: 'demo', + instance: '', + type: 'ready', + payload: { clientId: 'new-stream-document' }, + }, + }) + pair.child.destroy() + } + await rejected + await flush() + expect(signal.aborted).toBe(true) + expect(closed).toBe(true) + expect(delivered).toStrictEqual(mode === 'oversize' ? [] : ['1']) + pair.destroy() + } +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.mjs deleted file mode 100644 index 4676c0eca..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { createHash } from 'node:crypto' -import { readFileSync } from 'node:fs' -import { - createPluginClient, - createPluginHostBridge, - PLUGIN_BRIDGE_SDK_VERSION, - PLUGIN_BRIDGE_VERSION, - validatePluginSession, -} from '../../src/utils/pluginBridge.js' -import * as legacySdk from './fixtures/bridge-b0d16a3e/pluginBridge.js' -import { createJsonOnlyHost } from './fixtures/json-only-host.js' - -const ORIGIN = 'https://compatibility.test' -const metadata = JSON.parse( - readFileSync(new URL('../../src/utils/pluginBridge.sdk.json', import.meta.url)) -) -const declarations = readFileSync( - new URL('../../src/utils/pluginBridge.d.ts', import.meta.url), - 'utf8' -) -const sourceCommit = 'b0d16a3eae1979afabb838245c00e1f816aa59e9' -const legacyRoot = new URL('./fixtures/bridge-b0d16a3e/', import.meta.url) -const provenance = JSON.parse(readFileSync(new URL('provenance.json', legacyRoot))) - -// 完整快照保留提交中的原始字节,由目录内 .gitattributes 禁止自动换行转换。 -assert.equal(provenance.sourceCommit, sourceCommit) -assert.equal(provenance.sourcePath, 'ruoyi-fastapi-frontend/src/utils/pluginBridge.js') -assert.equal(provenance.sdkVersion, null, '该历史快照没有独立 SDK 版本号') -assert.equal(provenance.bridgeVersion, 1) -assert.equal( - createHash('sha256') - .update(readFileSync(new URL('pluginBridge.js', legacyRoot))) - .digest('hex'), - provenance.sha256 -) -assert.equal(Object.hasOwn(legacySdk, 'PLUGIN_BRIDGE_SDK_VERSION'), false) -assert.deepEqual(metadata, { - schemaVersion: 1, - sdkVersion: PLUGIN_BRIDGE_SDK_VERSION, - bridgeVersion: PLUGIN_BRIDGE_VERSION, - capabilities: { files: 1, streams: 1 }, -}) -assert.equal(PLUGIN_BRIDGE_SDK_VERSION, '1.0.0') -assert.equal(PLUGIN_BRIDGE_VERSION, 1, '源码交付版本不能改变 bridge v1 消息协议') -assert.ok(declarations.includes(`export const PLUGIN_BRIDGE_SDK_VERSION: '${metadata.sdkVersion}'`)) -assert.ok(declarations.includes(`export const PLUGIN_BRIDGE_VERSION: ${metadata.bridgeVersion}`)) - -function windowPair() { - const makeWindow = () => { - const listeners = new Set() - return { - messages: [], - listeners, - addEventListener(type, listener) { - if (type === 'message') listeners.add(listener) - }, - removeEventListener(type, listener) { - if (type === 'message') listeners.delete(listener) - }, - dispatch(event) { - for (const listener of [...listeners]) listener(event) - }, - } - } - const hostWindow = makeWindow() - const childWindow = makeWindow() - for (const [target, source] of [ - [hostWindow, childWindow], - [childWindow, hostWindow], - ]) { - target.postMessage = (value, targetOrigin) => { - assert.equal(targetOrigin, ORIGIN) - const data = structuredClone(value) - target.messages.push(data) - queueMicrotask(() => target.dispatch({ data, source, origin: ORIGIN })) - } - } - return { hostWindow, childWindow } -} - -function clientOptions({ hostWindow, childWindow }) { - return { - pluginId: 'demo', - eventTarget: childWindow, - parentWindow: hostWindow, - origin: ORIGIN, - timeoutMs: 1000, - } -} - -// 历史客户端使用固定源码;宿主使用当前源码,实际交换 JSON、Blob 与逐条 SSE 消息。 -{ - const pair = windowPair() - const requests = [] - const streams = [] - const session = validatePluginSession( - { - pluginId: 'demo', - bridgeVersion: 1, - uiBase: '/apps/demo/ui/', - apiBase: '/apps/demo/api/', - csrfToken: 'compatibility-csrf-only', - expiresIn: 300, - }, - 'demo' - ) - const host = createPluginHostBridge({ - pluginId: 'demo', - session, - getTarget: () => pair.childWindow, - eventTarget: pair.hostWindow, - origin: ORIGIN, - request: async (config) => { - requests.push(config) - if (config.responseType === 'blob') return new Blob(['legacy download']) - if (config.data instanceof FormData) { - assert.equal(await config.data.get('file').text(), 'legacy upload') - assert.equal(config.data.get('category'), 'compatibility') - return { received: config.data.get('file').size } - } - return { code: 200, data: config.data } - }, - stream: async function* (config) { - streams.push(config) - yield { event: 'tick', data: 'first', id: '5' } - yield { event: 'tick', data: 'second', id: '6' } - }, - }) - const client = legacySdk.createPluginClient(clientOptions(pair)) - try { - const context = await client.ready - assert.equal(context.capabilities.files.version, metadata.capabilities.files) - assert.equal(context.capabilities.streams.version, metadata.capabilities.streams) - assert.deepEqual( - await client.request({ method: 'POST', path: 'echo', data: { value: 'legacy' } }), - { - code: 200, - data: { value: 'legacy' }, - } - ) - assert.deepEqual( - await client.upload({ - path: 'files/upload', - file: new Blob(['legacy upload']), - fields: { category: 'compatibility' }, - }), - { received: 13 } - ) - assert.equal(await (await client.download({ path: 'files/report' })).text(), 'legacy download') - const events = [] - await client.stream( - { path: 'events', params: { count: 6 }, lastEventId: '4' }, - { - async onEvent(event) { - await Promise.resolve() - events.push(event) - }, - } - ) - assert.deepEqual(events, [ - { event: 'tick', data: 'first', id: '5' }, - { event: 'tick', data: 'second', id: '6' }, - ]) - assert.deepEqual( - requests.map((config) => config.url), - ['/apps/demo/api/echo', '/apps/demo/api/files/upload', '/apps/demo/api/files/report'] - ) - for (const config of requests) { - assert.equal(config.headers.isToken, false) - assert.equal(config.headers.Authorization, undefined) - assert.equal(config.headers['X-Plugin-CSRF'], session.csrfToken) - } - assert.equal(streams.length, 1) - assert.equal(streams[0].url, '/apps/demo/api/events') - assert.deepEqual(streams[0].params, { count: 6 }) - assert.equal(streams[0].lastEventId, '4') - assert.equal(streams[0].csrfToken, session.csrfToken) - for (const message of [...pair.hostWindow.messages, ...pair.childWindow.messages]) { - assert.equal(message.version, 1) - assert.equal(message.sdkVersion, undefined) - assert.equal(message.payload?.csrfToken, undefined) - } - } finally { - client.destroy() - host.destroy() - } - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} - -// 旧 JSON 协议夹具不公布新增能力;未知版本也必须在客户端拒绝,而非先发送再失败。 -for (const capabilities of [ - undefined, - { files: { version: 2 }, streams: { version: 2 } }, - { files: { version: '1' }, streams: { version: '1' } }, -]) { - const pair = windowPair() - const host = createJsonOnlyHost({ ...pair, origin: ORIGIN, capabilities }) - const client = createPluginClient(clientOptions(pair)) - try { - await client.ready - const payload = { method: 'GET', path: 'info', params: { page: 1 } } - assert.deepEqual(await client.request(payload), { accepted: payload }) - await assert.rejects( - client.upload({ path: 'files/upload', file: new Blob(['test']) }), - /不支持文件传输/ - ) - await assert.rejects(client.download({ path: 'files/report' }), /不支持文件传输/) - await assert.rejects(client.stream({ path: 'events' }, { onEvent() {} }), /不支持实时事件流/) - assert.deepEqual(await client.request(payload), { accepted: payload }) - assert.deepEqual( - host.calls.map((message) => message.type), - ['request', 'request'] - ) - assert.deepEqual( - pair.hostWindow.messages.map((message) => message.type), - ['ready', 'request', 'request'] - ) - } finally { - client.destroy() - host.destroy() - } - assert.equal(pair.hostWindow.listeners.size, 0) - assert.equal(pair.childWindow.listeners.size, 0) -} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.ts new file mode 100644 index 000000000..38ab1d234 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginBridgeCompatibility.test.ts @@ -0,0 +1,202 @@ +import { createMessageWindows } from './fixtures/messageWindows' +import { expect, test } from 'vitest' +import { createHash } from 'node:crypto' +import { readFileSync } from 'node:fs' +import { + createPluginClient, + createPluginHostBridge, + PLUGIN_BRIDGE_SDK_VERSION, + PLUGIN_BRIDGE_VERSION, + validatePluginSession, +} from '../../src/utils/pluginBridge.js' +import * as legacySdk from './fixtures/bridge-b0d16a3e/pluginBridge.js' +import { createJsonOnlyHost } from './fixtures/json-only-host.ts' + +const ORIGIN = 'https://compatibility.test' +const metadata = JSON.parse( + readFileSync(new URL('../../src/utils/pluginBridge.sdk.json', import.meta.url), 'utf8') +) +const declarations = readFileSync( + new URL('../../src/utils/pluginBridge.d.ts', import.meta.url), + 'utf8' +) +const sourceCommit = 'b0d16a3eae1979afabb838245c00e1f816aa59e9' +const legacyRoot = new URL('./fixtures/bridge-b0d16a3e/', import.meta.url) +const provenance = JSON.parse(readFileSync(new URL('provenance.json', legacyRoot), 'utf8')) + +// 完整快照保留提交中的原始字节,由目录内 .gitattributes 禁止自动换行转换。 +test('checks SDK metadata against the pinned historical snapshot', () => { + expect(provenance.sourceCommit).toBe(sourceCommit) + expect(provenance.sourcePath).toBe('ruoyi-fastapi-frontend/src/utils/pluginBridge.js') + expect(provenance.sdkVersion, '该历史快照没有独立 SDK 版本号').toBe(null) + expect(provenance.bridgeVersion).toBe(1) + expect( + createHash('sha256') + .update(readFileSync(new URL('pluginBridge.js', legacyRoot), 'utf8')) + .digest('hex') + ).toBe(provenance.sha256) + expect(Object.hasOwn(legacySdk, 'PLUGIN_BRIDGE_SDK_VERSION')).toBe(false) + expect(metadata).toStrictEqual({ + schemaVersion: 1, + sdkVersion: PLUGIN_BRIDGE_SDK_VERSION, + bridgeVersion: PLUGIN_BRIDGE_VERSION, + capabilities: { files: 1, streams: 1 }, + }) + expect(PLUGIN_BRIDGE_SDK_VERSION).toBe('1.0.0') + expect(PLUGIN_BRIDGE_VERSION, '源码交付版本不能改变 bridge v1 消息协议').toBe(1) + expect( + declarations.includes(`export const PLUGIN_BRIDGE_SDK_VERSION: '${metadata.sdkVersion}'`) + ).toBeTruthy() + expect( + declarations.includes(`export const PLUGIN_BRIDGE_VERSION: ${metadata.bridgeVersion}`) + ).toBeTruthy() +}) + +function clientOptions({ hostWindow, childWindow }: ReturnType) { + return { + pluginId: 'demo', + eventTarget: childWindow, + parentWindow: hostWindow, + origin: ORIGIN, + timeoutMs: 1000, + } +} + +test('历史客户端使用固定源码;宿主使用当前源码,实际交换 JSON、Blob 与逐条 SSE 消息', async () => { + const pair = createMessageWindows(ORIGIN) + const requests: Array<{ url: unknown; headers: Record }> = [] + type HostOptions = Parameters[0] + const streams: Array>[0]> = [] + const session = validatePluginSession( + { + pluginId: 'demo', + bridgeVersion: 1, + uiBase: '/apps/demo/ui/', + apiBase: '/apps/demo/api/', + csrfToken: 'compatibility-csrf-only', + expiresIn: 300, + }, + 'demo' + ) + const host = createPluginHostBridge({ + pluginId: 'demo', + session, + getTarget: () => pair.childWindow, + eventTarget: pair.hostWindow, + origin: ORIGIN, + request: async (config) => { + requests.push({ url: config.url, headers: config.headers as Record }) + if (config.responseType === 'blob') return new Blob(['legacy download']) + if (config.data instanceof FormData) { + const file = config.data.get('file') + if (!(file instanceof File)) throw new Error('Expected upload file') + expect(await file.text()).toBe('legacy upload') + expect(config.data.get('category')).toBe('compatibility') + return { received: file.size } + } + return { code: 200, data: config.data } + }, + stream: async function* (config) { + streams.push(config) + yield { event: 'tick', data: 'first', id: '5' } + yield { event: 'tick', data: 'second', id: '6' } + }, + }) + const client = legacySdk.createPluginClient(clientOptions(pair)) as Pick< + ReturnType, + 'ready' | 'request' | 'upload' | 'download' | 'stream' | 'destroy' + > + try { + const context = await client.ready + expect(context.capabilities?.files?.version).toBe(metadata.capabilities.files) + expect(context.capabilities?.streams?.version).toBe(metadata.capabilities.streams) + expect( + await client.request({ method: 'POST', path: 'echo', data: { value: 'legacy' } }) + ).toStrictEqual({ + code: 200, + data: { value: 'legacy' }, + }) + expect( + await client.upload({ + path: 'files/upload', + file: new Blob(['legacy upload']), + fields: { category: 'compatibility' }, + }) + ).toStrictEqual({ received: 13 }) + expect(await (await client.download({ path: 'files/report' })).text()).toBe('legacy download') + const events: unknown[] = [] + await client.stream( + { path: 'events', params: { count: 6 }, lastEventId: '4' }, + { + async onEvent(event) { + await Promise.resolve() + events.push(event) + }, + } + ) + expect(events).toStrictEqual([ + { event: 'tick', data: 'first', id: '5' }, + { event: 'tick', data: 'second', id: '6' }, + ]) + expect(requests.map((config) => config.url)).toStrictEqual([ + '/apps/demo/api/echo', + '/apps/demo/api/files/upload', + '/apps/demo/api/files/report', + ]) + for (const config of requests) { + expect(config.headers.isToken).toBe(false) + expect(config.headers.Authorization).toBe(undefined) + expect(config.headers['X-Plugin-CSRF']).toBe(session.csrfToken) + } + expect(streams.length).toBe(1) + expect(streams[0].url).toBe('/apps/demo/api/events') + expect(streams[0].params).toStrictEqual({ count: 6 }) + expect(streams[0].lastEventId).toBe('4') + expect(streams[0].csrfToken).toBe(session.csrfToken) + for (const message of [...pair.hostWindow.messages, ...pair.childWindow.messages]) { + expect(message.version).toBe(1) + expect(message.sdkVersion).toBe(undefined) + expect(message.payload?.csrfToken).toBe(undefined) + } + } finally { + client.destroy() + host.destroy() + } + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) +}) +test('旧 JSON 协议夹具不公布新增能力;未知版本也必须在客户端拒绝,而非先发送再失败', async () => { + for (const capabilities of [ + undefined, + { files: { version: 2 }, streams: { version: 2 } }, + { files: { version: '1' }, streams: { version: '1' } }, + ]) { + const pair = createMessageWindows(ORIGIN) + const host = createJsonOnlyHost({ ...pair, origin: ORIGIN, capabilities }) + const client = createPluginClient(clientOptions(pair)) + try { + await client.ready + const payload = { method: 'GET' as const, path: 'info', params: { page: 1 } } + expect(await client.request(payload)).toStrictEqual({ accepted: payload }) + await expect( + client.upload({ path: 'files/upload', file: new Blob(['test']) }) + ).rejects.toThrow(/不支持文件传输/) + await expect(client.download({ path: 'files/report' })).rejects.toThrow(/不支持文件传输/) + await expect(client.stream({ path: 'events' }, { onEvent() {} })).rejects.toThrow( + /不支持实时事件流/ + ) + expect(await client.request(payload)).toStrictEqual({ accepted: payload }) + expect(host.calls.map((message) => message.type)).toStrictEqual(['request', 'request']) + expect(pair.hostWindow.messages.map((message) => message.type)).toStrictEqual([ + 'ready', + 'request', + 'request', + ]) + } finally { + client.destroy() + host.destroy() + } + expect(pair.hostWindow.listeners.size).toBe(0) + expect(pair.childWindow.listeners.size).toBe(0) + } +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.mjs deleted file mode 100644 index 66c59ee86..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.mjs +++ /dev/null @@ -1,81 +0,0 @@ -import { stripTypeScriptTypes } from 'node:module' -import locale from '../i18n/test-runtime.cjs' -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { compileScript, parse } from 'vue/compiler-sfc' -import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' - -const source = readFileSync( - new URL('../../src/views/system/plugin/components/PluginConfigStatus.vue', import.meta.url), - 'utf8' -) -const descriptor = parse({ source, filename: 'PluginComponent.vue' }) -const compiled = compileScript(descriptor, { id: 'config-status-test' }) -const script = compiled.scriptSetupAst - .filter((statement) => statement.type !== 'ImportDeclaration') - .map((statement) => descriptor.scriptSetup.content.slice(statement.start, statement.end)) - .join('\n') -const setup = new Function( - 't', - 'computed', - 'ref', - 'watch', - 'onBeforeUnmount', - 'defineProps', - 'getPluginConfigStatus', - `${stripTypeScriptTypes(script)}\nreturn { data, loading, error, refresh, statusText }` -) -const props = reactive({ pluginId: 'first_plugin', refreshKey: 0 }) -const calls = [] -let unmount -const scope = effectScope() -const state = scope.run(() => - setup( - locale.t, - computed, - ref, - watch, - (callback) => { - unmount = callback - }, - () => props, - (pluginId, signal) => - new Promise((resolve, reject) => { - calls.push({ pluginId, signal, resolve, reject }) - }) - ) -) -assert.equal(calls[0].pluginId, 'first_plugin') -props.pluginId = 'second_plugin' -await nextTick() -assert.equal(calls[0].signal.aborted, true) -calls[1].resolve({ data: { state: 'restart_required', pendingWorkers: 2 } }) -await nextTick() -calls[0].resolve({ data: { state: 'observed_match', matchedWorkers: 1 } }) -await nextTick() -assert.match(state.statusText.value, /2 个已观测进程.*待重启/) - -// 保存成功后主动重查,不用旧状态冒充最新保存版本。 -props.refreshKey++ -await nextTick() -assert.equal(state.data.value, null) -calls[2].resolve({ data: { state: 'observed_match', matchedWorkers: 2 } }) -await nextTick() -assert.match(state.statusText.value, /已观测进程.*匹配/) -assert.equal(state.loading.value, false) -const failed = state.refresh() -calls[3].reject(new Error('unavailable')) -await failed -assert.equal(state.data.value, null) -assert.match(state.error.value, /查询失败/) -const retry = state.refresh() -calls[4].resolve({ data: { state: 'unobserved' } }) -await retry -assert.match(state.statusText.value, /尚不能确认|尚未观测/) -const closing = state.refresh() -unmount() -scope.stop() -assert.equal(calls[5].signal.aborted, true) -calls[5].reject(new Error('cancelled')) -await closing -assert.equal(state.error.value, '') diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.ts new file mode 100644 index 000000000..c574ef550 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginConfigStatus.test.ts @@ -0,0 +1,88 @@ +import { expect, test } from 'vitest' +import { stripTypeScriptTypes } from 'node:module' +import locale from '../i18n/test-runtime.ts' +import { readFileSync } from 'node:fs' +import { compileScript, parse } from 'vue/compiler-sfc' +import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' + +const source = readFileSync( + new URL('../../src/views/system/plugin/components/PluginConfigStatus.vue', import.meta.url), + 'utf8' +) +const descriptor = parse({ source, filename: 'PluginComponent.vue' }) +const compiled = compileScript(descriptor, { id: 'config-status-test' }) +const script = compiled + .scriptSetupAst!.filter((statement) => statement.type !== 'ImportDeclaration') + .map((statement) => descriptor.scriptSetup!.content.slice(statement.start, statement.end)) + .join('\n') +const setup = new Function( + 't', + 'computed', + 'ref', + 'watch', + 'onBeforeUnmount', + 'defineProps', + 'getPluginConfigStatus', + `${stripTypeScriptTypes(script)}\nreturn { data, loading, error, refresh, statusText }` +) +test('ignores stale status requests and handles retries and unmounting', async () => { + const props = reactive({ pluginId: 'first_plugin', refreshKey: 0 }) + const calls: Array<{ + pluginId: string + signal: AbortSignal + resolve: (response: unknown) => void + reject: (reason: Error) => void + }> = [] + let unmount!: () => void + const scope = effectScope() + const state = scope.run(() => + setup( + locale.t, + computed, + ref, + watch, + (callback: () => void) => { + unmount = callback + }, + () => props, + (pluginId: string, signal: AbortSignal) => + new Promise((resolve, reject) => { + calls.push({ pluginId, signal, resolve, reject }) + }) + ) + ) + expect(calls[0].pluginId).toBe('first_plugin') + props.pluginId = 'second_plugin' + await nextTick() + expect(calls[0].signal.aborted).toBe(true) + calls[1].resolve({ data: { state: 'restart_required', pendingWorkers: 2 } }) + await nextTick() + calls[0].resolve({ data: { state: 'observed_match', matchedWorkers: 1 } }) + await nextTick() + expect(state.statusText.value).toMatch(/2 个已观测进程.*待重启/) + + // 保存成功后主动重查,不用旧状态冒充最新保存版本。 + props.refreshKey++ + await nextTick() + expect(state.data.value).toBe(null) + calls[2].resolve({ data: { state: 'observed_match', matchedWorkers: 2 } }) + await nextTick() + expect(state.statusText.value).toMatch(/已观测进程.*匹配/) + expect(state.loading.value).toBe(false) + const failed = state.refresh() + calls[3].reject(new Error('unavailable')) + await failed + expect(state.data.value).toBe(null) + expect(state.error.value).toMatch(/查询失败/) + const retry = state.refresh() + calls[4].resolve({ data: { state: 'unobserved' } }) + await retry + expect(state.statusText.value).toMatch(/尚不能确认|尚未观测/) + const closing = state.refresh() + unmount() + scope.stop() + expect(calls[5].signal.aborted).toBe(true) + calls[5].reject(new Error('cancelled')) + await closing + expect(state.error.value).toBe('') +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.mjs deleted file mode 100644 index 1b96aa388..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.mjs +++ /dev/null @@ -1,77 +0,0 @@ -import assert from 'node:assert/strict' -import { - createMockPluginRequest, - createMockPluginStream, -} from '../../../../../ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js' - -const request = createMockPluginRequest({ getDelay: () => 0 }) -const config = (path, options = {}) => ({ - url: '/apps/bundle_demo/api/' + path, - method: 'get', - ...options, -}) -assert.equal((await request(config('summary'))).userName, '本地模拟用户') -assert.equal( - (await request(config('echo', { method: 'post', data: { message: 'test' } }))).message, - 'test' -) -const form = new FormData() -form.append('file', new Blob(['test']), 'test.txt') -const events = [] -const file = await request( - config('files/inspect', { - method: 'post', - data: form, - onUploadProgress: (event) => events.push(event), - }) -) -assert.deepEqual(file, { - filename: 'test.txt', - size: 4, - sha256: '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', -}) -assert.deepEqual( - events.map((event) => event.loaded), - [2, 4] -) -const report = await request(config('files/report')) -assert.match(await report.text(), /local-mock/) -await assert.rejects(request(config('unknown')), /未实现/) -await assert.rejects(request({ url: 'https://outside.test', method: 'get' }), /当前插件/) -const fail = createMockPluginRequest({ getDelay: () => 0, shouldFail: () => true }) -await assert.rejects(fail(config('summary')), /模拟接口失败/) -const controller = new AbortController() -const slow = createMockPluginRequest({ getDelay: () => 5000 }) -const pending = slow(config('summary', { signal: controller.signal })) -const rejected = assert.rejects(pending, /取消/) -controller.abort() -await rejected -await assert.rejects(slow(config('summary', { signal: controller.signal })), /取消/) - -const streamController = new AbortController() -const stream = createMockPluginStream({ getDelay: () => 100 }) -const streamConfig = config('events', { - params: { count: 3 }, - lastEventId: '1', - signal: streamController.signal, -}) -const received = [] -for await (const event of stream(streamConfig)) received.push(event) -assert.deepEqual( - received.map((event) => event.id), - ['2', '3'] -) -assert.equal(JSON.parse(received[0].data).index, 2) -for (const invalid of [{ params: { count: 0 } }, { lastEventId: '1.0' }, { lastEventId: '001' }]) { - await assert.rejects(stream({ ...streamConfig, ...invalid }).next(), /参数无效/) -} -const interrupted = stream(streamConfig) -const next = interrupted.next() -const interruptedResult = assert.rejects(next, /取消/) -streamController.abort() -await interruptedResult -const failedStream = createMockPluginStream({ getDelay: () => 100, shouldFail: () => true }) -await assert.rejects( - failedStream({ ...streamConfig, signal: new AbortController().signal }).next(), - /失败/ -) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.ts new file mode 100644 index 000000000..075688753 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginDevMock.test.ts @@ -0,0 +1,83 @@ +import { expect, test } from 'vitest' +import { + createMockPluginRequest, + createMockPluginStream as createStream, +} from '../../../../../ruoyi-fastapi-backend/plugins/examples/python/bundle_demo/web/dev/mockRequest.js' + +const createMockPluginStream = createStream as (options: { + getDelay: () => number + shouldFail?: () => boolean +}) => ReturnType + +test('serves local plugin requests and supports stream cancellation', async () => { + const request = createMockPluginRequest({ getDelay: () => 0 }) + const config = (path: string, options: Record = {}) => ({ + url: '/apps/bundle_demo/api/' + path, + method: 'get', + ...options, + }) + expect((await request(config('summary'))).userName).toBe('本地模拟用户') + expect( + (await request(config('echo', { method: 'post', data: { message: 'test' } }))).message + ).toBe('test') + const form = new FormData() + form.append('file', new Blob(['test']), 'test.txt') + const events: Array<{ loaded: number }> = [] + const file = await request( + config('files/inspect', { + method: 'post', + data: form, + onUploadProgress: (event: { loaded: number }) => events.push(event), + }) + ) + expect(file).toStrictEqual({ + filename: 'test.txt', + size: 4, + sha256: '9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08', + }) + expect(events.map((event) => event.loaded)).toStrictEqual([2, 4]) + const report = await request(config('files/report')) + expect(await report.text()).toMatch(/local-mock/) + await expect(request(config('unknown'))).rejects.toThrow(/未实现/) + await expect(request({ url: 'https://outside.test', method: 'get' })).rejects.toThrow(/当前插件/) + const fail = createMockPluginRequest({ getDelay: () => 0, shouldFail: (): boolean => true }) + await expect(fail(config('summary'))).rejects.toThrow(/模拟接口失败/) + const controller = new AbortController() + const slow = createMockPluginRequest({ getDelay: () => 5000 }) + const pending = slow(config('summary', { signal: controller.signal })) + const rejected = expect(pending).rejects.toThrow(/取消/) + controller.abort() + await rejected + await expect(slow(config('summary', { signal: controller.signal }))).rejects.toThrow(/取消/) + + const streamController = new AbortController() + const stream = createMockPluginStream({ getDelay: (): number => 100 }) + const streamConfig = config('events', { + params: { count: 3 }, + lastEventId: '1', + signal: streamController.signal, + }) + const received: Array<{ id: string; data: string }> = [] + for await (const event of stream(streamConfig)) received.push(event) + expect(received.map((event) => event.id)).toStrictEqual(['2', '3']) + expect(JSON.parse(received[0].data).index).toBe(2) + for (const invalid of [ + { params: { count: 0 } }, + { lastEventId: '1.0' }, + { lastEventId: '001' }, + ]) { + await expect(stream({ ...streamConfig, ...invalid }).next()).rejects.toThrow(/参数无效/) + } + const interrupted = stream(streamConfig) + const next = interrupted.next() + const interruptedResult = expect(next).rejects.toThrow(/取消/) + streamController.abort() + await interruptedResult + const failedStream = createMockPluginStream({ + getDelay: (): number => 100, + shouldFail: (): boolean => true, + }) + await expect( + failedStream({ ...streamConfig, signal: new AbortController().signal }).next() + ).rejects.toThrow(/失败/) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.mjs deleted file mode 100644 index 0e8ed77fe..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.mjs +++ /dev/null @@ -1,74 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import locale from '../i18n/test-runtime.cjs' -import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' -import { compileScript, parse } from 'vue/compiler-sfc' - -// 使用 Vue 调度器执行组件的真实会话监听逻辑。 -// 仅查询参数变化导致 router.meta 重建时,不应重新打开已有页面。 -const source = readFileSync( - new URL('../../src/components/PluginFrame/index.vue', import.meta.url), - 'utf8' -) -const descriptor = parse({ source, filename: 'PluginComponent.vue' }) -const compiled = compileScript(descriptor, { id: 'plugin-frame-watch-test' }) -const sessionWatch = compiled.scriptSetupAst.find( - (statement) => - statement.type === 'ExpressionStatement' && - statement.expression.type === 'CallExpression' && - statement.expression.callee.name === 'watch' -).expression -const installWatcher = new Function( - 't', - 'watch', - 'route', - 'userStore', - 'cleanup', - 'error', - 'active', - 'openPlugin', - `return ${descriptor.scriptSetup.content.slice(sessionWatch.start, sessionWatch.end)}` -) -const routeState = reactive({ meta: { pluginId: 'demo' }, query: { pluginRoute: '/' } }) -const route = computed(() => routeState) -const userStore = reactive({ token: 'host-session' }) -const error = ref('') -const cleanupCalls = [] -let reopened = 0 -const scope = effectScope() -scope.run(() => - installWatcher( - locale.t, - watch, - route, - userStore, - (logout) => cleanupCalls.push(logout), - error, - true, - () => { - reopened += 1 - } - ) -) - -routeState.meta = { pluginId: 'demo' } -routeState.query = { pluginRoute: '/details' } -await nextTick() -assert.equal( - reopened, - 0, - 'same plugin + same token must preserve the frame across query navigation' -) -assert.deepEqual(cleanupCalls, []) - -routeState.meta = { pluginId: 'another_demo' } -await nextTick() -assert.equal(reopened, 1, 'switching plugin must open a new session') -userStore.token = 'new-host-session' -await nextTick() -assert.equal(reopened, 2, 'a changed host login must not reuse the previous plugin session') -userStore.token = '' -await nextTick() -assert.deepEqual(cleanupCalls, [true], 'logout must destroy the bridge and notify the frame') -assert.match(error.value, /登录状态已失效/) -scope.stop() diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.ts new file mode 100644 index 000000000..420c149ff --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginFrame.test.ts @@ -0,0 +1,74 @@ +import { expect, test } from 'vitest' +import { readFileSync } from 'node:fs' +import locale from '../i18n/test-runtime.ts' +import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' +import { compileScript, parse } from 'vue/compiler-sfc' + +// 使用 Vue 调度器执行组件的真实会话监听逻辑。 +// 仅查询参数变化导致 router.meta 重建时,不应重新打开已有页面。 +const source = readFileSync( + new URL('../../src/components/PluginFrame/index.vue', import.meta.url), + 'utf8' +) +const descriptor = parse({ source, filename: 'PluginComponent.vue' }) +const compiled = compileScript(descriptor, { id: 'plugin-frame-watch-test' }) +const sessionWatch = compiled.scriptSetupAst!.find( + (statement) => + statement.type === 'ExpressionStatement' && + statement.expression.type === 'CallExpression' && + statement.expression.callee.name === 'watch' +).expression +const installWatcher = new Function( + 't', + 'watch', + 'route', + 'userStore', + 'cleanup', + 'error', + 'active', + 'openPlugin', + `return ${descriptor.scriptSetup!.content.slice(sessionWatch.start, sessionWatch.end)}` +) +test('reopens plugin sessions when the plugin or account changes', async () => { + const routeState = reactive({ meta: { pluginId: 'demo' }, query: { pluginRoute: '/' } }) + const route = computed(() => routeState) + const userStore = reactive({ token: 'host-session' }) + const error = ref('') + const cleanupCalls: boolean[] = [] + let reopened = 0 + const scope = effectScope() + scope.run(() => + installWatcher( + locale.t, + watch, + route, + userStore, + (logout: boolean) => cleanupCalls.push(logout), + error, + true, + () => { + reopened += 1 + } + ) + ) + + routeState.meta = { pluginId: 'demo' } + routeState.query = { pluginRoute: '/details' } + await nextTick() + expect(reopened, 'same plugin + same token must preserve the frame across query navigation').toBe( + 0 + ) + expect(cleanupCalls).toStrictEqual([]) + + routeState.meta = { pluginId: 'another_demo' } + await nextTick() + expect(reopened, 'switching plugin must open a new session').toBe(1) + userStore.token = 'new-host-session' + await nextTick() + expect(reopened, 'a changed host login must not reuse the previous plugin session').toBe(2) + userStore.token = '' + await nextTick() + expect(cleanupCalls, 'logout must destroy the bridge and notify the frame').toStrictEqual([true]) + expect(error.value).toMatch(/登录状态已失效/) + scope.stop() +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.ts similarity index 63% rename from ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.ts index 320060376..2cde50f5a 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginHostIntegration.test.ts @@ -1,11 +1,13 @@ -const assert = require('node:assert/strict') +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) const { EventEmitter } = require('node:events') const { readFileSync } = require('node:fs') const path = require('node:path') const Service = require('@vue/cli-service/lib/Service') -const { createLoader } = require('../support/load-module.cjs') +const { createLoader } = require('../support/load-module.cts') -const root = path.resolve(__dirname, '../..') +const root = path.resolve(import.meta.dirname, '../..') const originalEnvironment = { ...process.env } const originalDirectory = process.cwd() const loadUtility = createLoader() @@ -21,7 +23,7 @@ const { normalizeTransportPath } = loadUtility(path.join(root, 'src/utils/transp * @param {string|undefined} pluginBase 显式前缀;未指定时使用环境文件默认值 * @returns {Object} 实际代理配置和客户端环境值 */ -function loadProxyConfiguration(mode, pluginBase) { +function loadProxyConfiguration(mode: string, pluginBase?: string) { const environment = { ...process.env } const directory = process.cwd() const configPath = require.resolve(path.join(root, 'vue.config.js')) @@ -60,7 +62,9 @@ function loadProxyConfiguration(mode, pluginBase) { * @param {Object} appProxy 插件应用的实际 Vue CLI 代理配置 * @returns {void} */ -function checkStreamCleanup(appProxy) { +function checkStreamCleanup(appProxy: { + onProxyRes(upstream: NodeJS.EventEmitter, request: object, response: NodeJS.EventEmitter): void +}) { const pair = (contentType = 'text/event-stream; charset=utf-8') => { const upstream = new EventEmitter() const response = new EventEmitter() @@ -78,19 +82,19 @@ function checkStreamCleanup(appProxy) { for (const event of ['aborted', 'error']) { const { upstream, response } = pair() upstream.emit(event) - assert.equal(response.destroyed, true, `SSE 上游 ${event} 必须结束下游`) + expect(response.destroyed, `SSE 上游 ${event} 必须结束下游`).toBe(true) } const disconnected = pair() disconnected.response.emit('close') - assert.equal(disconnected.upstream.destroyed, true) + expect(disconnected.upstream.destroyed).toBe(true) const complete = pair() complete.upstream.complete = true complete.response.emit('close') - assert.equal(complete.upstream.destroyed, undefined) + expect(complete.upstream.destroyed).toBe(undefined) const json = pair('application/json') - assert.equal(json.upstream.listenerCount('aborted'), 0) - assert.equal(json.upstream.listenerCount('error'), 0) - assert.equal(json.response.listenerCount('close'), 0) + expect(json.upstream.listenerCount('aborted')).toBe(0) + expect(json.upstream.listenerCount('error')).toBe(0) + expect(json.response.listenerCount('close')).toBe(0) } /** @@ -99,32 +103,34 @@ function checkStreamCleanup(appProxy) { * @param {Object} configuration 实际加载的环境配置 * @returns {void} */ -function checkPluginPaths({ proxy, pluginBase, baseApi }) { +function checkPluginPaths({ + proxy, + pluginBase, + baseApi, +}: ReturnType) { const prefix = normalizePluginBase(pluginBase) const appProxy = proxy[`${prefix}/apps/`] const sessionProxy = proxy[`${prefix}/plugin/runtime/`] - assert.ok(appProxy, '插件应用必须走独立代理') - assert.ok(sessionProxy, '插件会话必须走独立代理') - assert.equal(appProxy.changeOrigin, false) - assert.equal(sessionProxy.changeOrigin, false) - assert.equal(appProxy.ws, true) - assert.equal(proxy[baseApi].pathRewrite[`^${baseApi}`], '') + expect(appProxy, '插件应用必须走独立代理').toBeTruthy() + expect(sessionProxy, '插件会话必须走独立代理').toBeTruthy() + expect(appProxy.changeOrigin).toBe(false) + expect(sessionProxy.changeOrigin).toBe(false) + expect(appProxy.ws).toBe(true) + expect(proxy[baseApi].pathRewrite[`^${baseApi}`]).toBe('') for (const [entry, requestPath] of [ [appProxy, '/apps/bundle_demo/ui/index.html?asset=main.js'], [appProxy, '/apps/task_demo/api/events?tag=first&tag=second&next=%2Fdev-api%2F'], [sessionProxy, '/plugin/runtime/bundle_demo/session?mode=preview'], ]) { - assert.equal(typeof entry.pathRewrite, 'function') - assert.equal( + expect(typeof entry.pathRewrite).toBe('function') + expect( entry.pathRewrite(`${prefix}${requestPath}`), - requestPath, '只剥离一次外部前缀,并完整保留查询串' - ) - assert.equal( + ).toBe(requestPath) + expect( normalizeTransportPath(`${prefix}${requestPath}`, baseApi, pluginBase), - requestPath.split('?')[0], 'AAD 使用后端接收到的无前缀路径' - ) + ).toBe(requestPath.split('?')[0]) } for (const pluginId of ['bundle_demo', 'task_demo']) { const session = { @@ -135,7 +141,7 @@ function checkPluginPaths({ proxy, pluginBase, baseApi }) { csrfToken: 'test-plugin-csrf-token', expiresIn: 300, } - assert.deepEqual(validatePluginSession(session, pluginId, pluginBase, 100), { + expect(validatePluginSession(session, pluginId, pluginBase, 100)).toStrictEqual({ ...session, expiresAt: 300100, }) @@ -149,12 +155,12 @@ function checkPluginPaths({ proxy, pluginBase, baseApi }) { * @param {string} filename 已有的后端环境文件名 * @returns {string} 后端应用部署前缀 */ -function readBackendRootPath(filename) { +function readBackendRootPath(filename: string) { const match = readFileSync( path.resolve(root, '../../../ruoyi-fastapi-backend', filename), 'utf8' ).match(/^APP_ROOT_PATH\s*=\s*['"]?([^'"\s#]*)['"]?\s*(?:#.*)?$/m) - assert.ok(match, `${filename} 必须显式配置 APP_ROOT_PATH`) + expect(match, `${filename} 必须显式配置 APP_ROOT_PATH`).toBeTruthy() return match[1] } @@ -166,53 +172,54 @@ function readBackendRootPath(filename) { * @param {string} prefix 客户端与后端共有的部署前缀 * @returns {void} */ -function checkDockerNginx(variant, upstream, prefix) { +function checkDockerNginx(variant: string, upstream: string, prefix: string) { const source = readFileSync(path.join(root, `bin/nginx.${variant}.conf`), 'utf8') const locations = [...source.matchAll(/^\s*location\s+\^~\s+(\S+)\s*\{([^{}]*)\}/gm)] - const blocks = {} + const blocks: Record = {} for (const route of ['/apps/', '/plugin/runtime/']) { const matches = locations.filter((match) => match[1] === `${prefix}${route}`) - assert.equal(matches.length, 1, `${variant} 必须有唯一的 ${prefix}${route} 专用代理`) + expect(matches.length, `${variant} 必须有唯一的 ${prefix}${route} 专用代理`).toBe(1) const block = matches[0][2] const proxyPass = block.match(/^\s*proxy_pass\s+(\S+)\s*;/m) - assert.equal(proxyPass?.[1], `http://${upstream}:9099${route}`) - assert.match(block, /^\s*proxy_set_header\s+Host\s+\$http_host\s*;/m) - assert.match(block, /^\s*proxy_set_header\s+X-Forwarded-Proto\s+\$scheme\s*;/m) - assert.ok(!locations.some((match) => match[1] === route), '不得遗留无部署前缀的专用代理') + expect(proxyPass?.[1]).toBe(`http://${upstream}:9099${route}`) + expect(block).toMatch(/^\s*proxy_set_header\s+Host\s+\$http_host\s*;/m) + expect(block).toMatch(/^\s*proxy_set_header\s+X-Forwarded-Proto\s+\$scheme\s*;/m) + expect( + !locations.some((match) => match[1] === route), + '不得遗留无部署前缀的专用代理' + ).toBeTruthy() blocks[route] = block } - assert.match(blocks['/apps/'], /^\s*proxy_http_version\s+1\.1\s*;/m) - assert.match(blocks['/apps/'], /^\s*proxy_set_header\s+Upgrade\s+\$http_upgrade\s*;/m) - assert.match( - blocks['/apps/'], + expect(blocks['/apps/']).toMatch(/^\s*proxy_http_version\s+1\.1\s*;/m) + expect(blocks['/apps/']).toMatch(/^\s*proxy_set_header\s+Upgrade\s+\$http_upgrade\s*;/m) + expect(blocks['/apps/']).toMatch( /^\s*proxy_set_header\s+Connection\s+\$plugin_connection_upgrade\s*;/m ) - assert.match(blocks['/apps/'], /^\s*proxy_buffering\s+off\s*;/m) - assert.match(blocks['/apps/'], /^\s*proxy_read_timeout\s+300s\s*;/m) - assert.match( - blocks['/plugin/runtime/'], + expect(blocks['/apps/']).toMatch(/^\s*proxy_buffering\s+off\s*;/m) + expect(blocks['/apps/']).toMatch(/^\s*proxy_read_timeout\s+300s\s*;/m) + expect(blocks['/plugin/runtime/']).toMatch( /^\s*add_header\s+Cache-Control\s+"no-store"\s+always\s*;/m ) const upgradeMap = source.match( /^\s*map\s+\$http_upgrade\s+\$plugin_connection_upgrade\s*\{([^{}]*)\}/m ) - assert.ok(upgradeMap, 'WebSocket 的 Connection 请求头必须按 Upgrade 状态切换') - assert.match(upgradeMap[1], /^\s*default\s+upgrade\s*;/m) - assert.match(upgradeMap[1], /^\s*''\s+close\s*;/m) + expect(upgradeMap, 'WebSocket 的 Connection 请求头必须按 Upgrade 状态切换').toBeTruthy() + expect(upgradeMap[1]).toMatch(/^\s*default\s+upgrade\s*;/m) + expect(upgradeMap[1]).toMatch(/^\s*''\s+close\s*;/m) } -module.exports = (async () => { +test('validates host proxy, deployment paths and session handling', async () => { for (const [mode, expectedBase, backendFiles] of [ ['development', '/dev-api', ['.env.dev']], ['production', '/prod-api', ['.env.prod']], ['docker', '/docker-api', ['.env.dockermy', '.env.dockerpg']], ['staging', '/stage-api', []], - ]) { + ] as const) { const configuration = loadProxyConfiguration(mode) - assert.equal(configuration.pluginBase, expectedBase) - assert.equal(configuration.pluginBase, configuration.baseApi, `${mode} 的两种 API 前缀必须一致`) + expect(configuration.pluginBase).toBe(expectedBase) + expect(configuration.pluginBase, `${mode} 的两种 API 前缀必须一致`).toBe(configuration.baseApi) for (const filename of backendFiles) { - assert.equal(configuration.pluginBase, readBackendRootPath(filename)) + expect(configuration.pluginBase).toBe(readBackendRootPath(filename)) } checkPluginPaths(configuration) if (mode === 'docker') { @@ -222,7 +229,7 @@ module.exports = (async () => { } for (const base of ['', '/', '/gateway', '/gateway/nested-v1/']) { const configuration = loadProxyConfiguration('development', base) - assert.equal(configuration.pluginBase, base, '显式前缀必须覆盖开发环境默认值') + expect(configuration.pluginBase, '显式前缀必须覆盖开发环境默认值').toBe(base) checkPluginPaths(configuration) } for (const base of [ @@ -231,27 +238,27 @@ module.exports = (async () => { '/gateway/../admin', '/gateway?x=1', ]) { - assert.throws(() => loadProxyConfiguration('development', base), /插件部署路径无效/) + expect(() => loadProxyConfiguration('development', base)).toThrow(/插件部署路径无效/) } - assert.equal( - normalizeTransportPath('/dev-api/system/user', '/dev-api', '/gateway'), + expect(normalizeTransportPath('/dev-api/system/user', '/dev-api', '/gateway')).toBe( '/system/user' ) - assert.equal( - normalizeTransportPath('/dev-api-other/system/user', '/dev-api', '/gateway'), + expect(normalizeTransportPath('/dev-api-other/system/user', '/dev-api', '/gateway')).toBe( '/dev-api-other/system/user' ) - let responseHandler + type ResponseHandler = (response: ReturnType) => unknown + let responseHandler!: ResponseHandler let hostLoginPrompts = 0 const axios = { defaults: { headers: {} }, create: () => ({ - request: (config) => responseHandler(result(config.testCode, config.pluginBridge)), + request: (config: { testCode: number; pluginBridge: boolean }) => + responseHandler(result(config.testCode, config.pluginBridge)), interceptors: { request: { use() {} }, response: { - use(handler) { + use(handler: ResponseHandler) { responseHandler = handler }, }, @@ -259,12 +266,13 @@ module.exports = (async () => { }), isCancel: () => false, } + const { t } = require('../i18n/test-runtime.ts') const load = createLoader({ '@/i18n': { i18n: { headers: { 'Accept-Language': 'zh-CN' }, }, - t: require('../i18n/test-runtime.cjs').t, + t, }, axios, 'element-ui': { @@ -284,23 +292,25 @@ module.exports = (async () => { '@/utils/ruoyi': { tansParams: () => '', blobValidate: () => true }, '@/plugins/cache': {}, 'file-saver': { saveAs() {} }, - '@/utils/transportCrypto': { decryptTransportResponse: async (response) => response }, + '@/utils/transportCrypto': { decryptTransportResponse: async (response: unknown) => response }, }) const request = load(path.join(root, 'src/utils/request.ts')).default - const result = (code, pluginBridge) => ({ + const result = (code: number, pluginBridge: boolean) => ({ data: { code, msg: 'session status' }, request: { responseType: 'json' }, config: { pluginBridge }, }) - await assert.rejects(request({ testCode: 401, pluginBridge: true }), /插件请求失败/) - await assert.rejects(request({ testCode: 403, pluginBridge: true }), /插件请求失败/) - assert.equal(hostLoginPrompts, 0) - assert.deepEqual(await request({ testCode: 200, pluginBridge: true }), { + await expect(request({ testCode: 401, pluginBridge: true })).rejects.toThrow(/插件请求失败/) + await expect(request({ testCode: 403, pluginBridge: true })).rejects.toThrow(/插件请求失败/) + expect(hostLoginPrompts).toBe(0) + expect(await request({ testCode: 200, pluginBridge: true })).toStrictEqual({ code: 200, msg: 'session status', }) - await assert.rejects(request({ testCode: 401, pluginBridge: false })) - assert.equal(hostLoginPrompts, 1) - assert.deepEqual({ ...process.env }, originalEnvironment) - assert.equal(process.cwd(), originalDirectory) -})() + await expect(request({ testCode: 401, pluginBridge: false })).rejects.toBe( + t('common:session.invalid') + ) + expect(hostLoginPrompts).toBe(1) + expect({ ...process.env }).toStrictEqual(originalEnvironment) + expect(process.cwd()).toBe(originalDirectory) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.mjs deleted file mode 100644 index 6a8070156..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.mjs +++ /dev/null @@ -1,117 +0,0 @@ -import { stripTypeScriptTypes } from 'node:module' -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { compileScript, parse } from 'vue/compiler-sfc' -import { computed, reactive } from 'vue' -import { getPluginReleaseView } from '../../src/utils/pluginReleaseFormatter.ts' - -const plugin = reactive({ - source: 'artifact', - enabled: '0', - release: { - status: 'pending_restart', - prepareStatus: 'prepared', - healthyWorkers: 0, - disabledWorkers: 0, - liveWorkers: 0, - expectedWorkers: 2, - missingWorkers: 2, - mismatchWorkers: 0, - staleWorkers: 0, - failedWorkers: 0, - restartRequired: true, - verificationError: '', - lastError: '', - }, -}) -const view = computed(() => getPluginReleaseView(plugin)) -assert.equal(view.value.label, '等待重启') -assert.equal(view.value.workerSummary, '已就绪 0 · 在线 0 / 预期 2') -assert.equal(view.value.preparationLabel, '准备完成') -assert.equal(view.value.restartRequired, true) - -plugin.release.status = 'partial' -plugin.release.liveWorkers = 2 -plugin.release.healthyWorkers = 1 -plugin.release.mismatchWorkers = 1 -assert.equal(view.value.label, '部分生效') -assert.equal(view.value.tagType, 'warning') -assert.equal(view.value.counts.mismatch, '1') -assert.match(view.value.workerSummary, /^已就绪 1/) - -plugin.release.status = 'active' -plugin.release.healthyWorkers = 2 -plugin.release.restartRequired = false -assert.equal(view.value.label, '已生效') -assert.equal(view.value.tagType, 'success') -assert.equal(view.value.restartRequired, false) - -plugin.enabled = '1' -plugin.release.status = 'disabled' -plugin.release.healthyWorkers = 0 -plugin.release.disabledWorkers = 2 -assert.equal(view.value.label, '已停用') -assert.equal(view.value.workerSummary, '已停用 2 · 在线 2 / 预期 2') - -plugin.release.verificationError = '公钥已撤销' -plugin.release.lastError = 'older maintenance failure' -assert.equal(view.value.label, '验证失败', 'signature failure must not retain a healthy label') -assert.equal(view.value.tagType, 'danger') -assert.equal(view.value.error, '公钥已撤销') - -const missing = getPluginReleaseView({ source: 'artifact' }) -assert.equal(missing.label, '状态未知') -assert.equal(missing.unavailable, true) -assert.equal(missing.workerSummary, '已就绪 未知 · 在线 未知 / 预期 未知') -assert.equal(missing.restartRequired, false) -for (const value of [undefined, null, -1, NaN, '2', true]) { - assert.equal(getPluginReleaseView({ release: { healthyWorkers: value } }).counts.healthy, '未知') -} -assert.equal(getPluginReleaseView({ release: { status: 'no_target' } }).label, '未选择目标') -assert.equal( - getPluginReleaseView({ release: { status: 'failed', prepareStatus: 'failed' } }).preparationLabel, - '准备失败' -) -assert.equal(getPluginReleaseView({ release: { status: 'new_server_state' } }).label, '状态未知') -assert.equal( - getPluginReleaseView({ release: { lastError: 'failed preparation' } }).error, - 'failed preparation' -) - -// 执行页面的真实操作限制:即使旧版接口响应缺少能力元数据,制品记录也应保持只读。 -const pageSource = readFileSync( - new URL('../../src/views/system/plugin/index.vue', import.meta.url), - 'utf8' -) -const descriptor = parse({ source: pageSource, filename: 'PluginIndex.vue' }) -const compiled = compileScript(descriptor, { id: 'plugin-release-read-only-test' }) -const gateNames = [ - 'canSelectForBatch', - 'canInstall', - 'canUpgrade', - 'canUninstall', - 'isOrphanPlugin', - 'isOperationBlocked', - 'isCapabilityOperationBlocked', -] -const gateSource = compiled.scriptSetupAst - .filter( - (statement) => statement.type === 'FunctionDeclaration' && gateNames.includes(statement.id.name) - ) - .map((statement) => descriptor.scriptSetup.content.slice(statement.start, statement.end)) - .join('\n') -const gates = new Function(`${stripTypeScriptTypes(gateSource)}\nreturn {${gateNames.join(',')}}`)() -for (const status of ['discovered', 'installed', 'pending_upgrade', 'error']) { - const artifact = { source: 'artifact', enabled: '0', installedVersion: '1.0.0', status } - assert.equal(gates.canSelectForBatch(artifact), false) - assert.equal(gates.canInstall(artifact), false) - assert.equal(gates.canUpgrade(artifact), false) - assert.equal(gates.canUninstall(artifact), false) - for (const operation of ['install', 'upgrade', 'enable', 'disable', 'uninstall']) { - assert.equal(gates.isOperationBlocked(artifact, operation), true) - } -} -const local = { source: 'local', status: 'discovered' } -assert.equal(gates.canSelectForBatch(local), true) -assert.equal(gates.canInstall(local), true) -assert.equal(gates.isOperationBlocked(local, 'install'), false) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.ts new file mode 100644 index 000000000..dc9e25bde --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginReleaseFormatter.test.ts @@ -0,0 +1,128 @@ +import { expect, test } from 'vitest' +import { stripTypeScriptTypes } from 'node:module' +import { readFileSync } from 'node:fs' +import { compileScript, parse } from 'vue/compiler-sfc' +import { computed, reactive } from 'vue' +import { getPluginReleaseView } from '../../src/utils/pluginReleaseFormatter.ts' + +test('reflects worker status and release lifecycle in the management view', () => { + const plugin = reactive({ + source: 'artifact', + enabled: '0' as '0' | '1', + release: { + status: 'pending_restart', + prepareStatus: 'prepared', + healthyWorkers: 0, + disabledWorkers: 0, + liveWorkers: 0, + expectedWorkers: 2, + missingWorkers: 2, + mismatchWorkers: 0, + staleWorkers: 0, + failedWorkers: 0, + restartRequired: true, + verificationError: '', + lastError: '', + }, + }) + const view = computed(() => getPluginReleaseView(plugin)) + expect(view.value.label).toBe('等待重启') + expect(view.value.workerSummary).toBe('已就绪 0 · 在线 0 / 预期 2') + expect(view.value.preparationLabel).toBe('准备完成') + expect(view.value.restartRequired).toBe(true) + + plugin.release.status = 'partial' + plugin.release.liveWorkers = 2 + plugin.release.healthyWorkers = 1 + plugin.release.mismatchWorkers = 1 + expect(view.value.label).toBe('部分生效') + expect(view.value.tagType).toBe('warning') + expect(view.value.counts.mismatch).toBe('1') + expect(view.value.workerSummary).toMatch(/^已就绪 1/) + + plugin.release.status = 'active' + plugin.release.healthyWorkers = 2 + plugin.release.restartRequired = false + expect(view.value.label).toBe('已生效') + expect(view.value.tagType).toBe('success') + expect(view.value.restartRequired).toBe(false) + + plugin.enabled = '1' + plugin.release.status = 'disabled' + plugin.release.healthyWorkers = 0 + plugin.release.disabledWorkers = 2 + expect(view.value.label).toBe('已停用') + expect(view.value.workerSummary).toBe('已停用 2 · 在线 2 / 预期 2') + + plugin.release.verificationError = '公钥已撤销' + plugin.release.lastError = 'older maintenance failure' + expect(view.value.label, 'signature failure must not retain a healthy label').toBe('验证失败') + expect(view.value.tagType).toBe('danger') + expect(view.value.error).toBe('公钥已撤销') + + const missing = getPluginReleaseView({}) + expect(missing.label).toBe('状态未知') + expect(missing.unavailable).toBe(true) + expect(missing.workerSummary).toBe('已就绪 未知 · 在线 未知 / 预期 未知') + expect(missing.restartRequired).toBe(false) + for (const value of [undefined, null, -1, NaN, '2', true]) { + expect( + getPluginReleaseView({ release: { healthyWorkers: value as number } }).counts.healthy + ).toBe('未知') + } + expect(getPluginReleaseView({ release: { status: 'no_target' } }).label).toBe('未选择目标') + expect( + getPluginReleaseView({ release: { status: 'failed', prepareStatus: 'failed' } }) + .preparationLabel + ).toBe('准备失败') + expect(getPluginReleaseView({ release: { status: 'new_server_state' } }).label).toBe('状态未知') + expect(getPluginReleaseView({ release: { lastError: 'failed preparation' } }).error).toBe( + 'failed preparation' + ) + + // 执行页面的真实操作限制:即使旧版接口响应缺少能力元数据,制品记录也应保持只读。 + const pageSource = readFileSync( + new URL('../../src/views/system/plugin/index.vue', import.meta.url), + 'utf8' + ) + const descriptor = parse({ source: pageSource, filename: 'PluginIndex.vue' }) + const compiled = compileScript(descriptor, { id: 'plugin-release-read-only-test' }) + const gateNames = [ + 'canSelectForBatch', + 'canInstall', + 'canUpgrade', + 'canUninstall', + 'isOrphanPlugin', + 'isOperationBlocked', + 'isCapabilityOperationBlocked', + ] + const gateSource = compiled + .scriptSetupAst!.filter( + (statement) => + statement.type === 'FunctionDeclaration' && gateNames.includes(statement.id.name) + ) + .map((statement) => descriptor.scriptSetup!.content.slice(statement.start, statement.end)) + .join('\n') + const gates = new Function( + `${stripTypeScriptTypes(gateSource)}\nreturn {${gateNames.join(',')}}` + )() + for (const status of ['discovered', 'installed', 'pending_upgrade', 'error']) { + const artifact = { + source: 'artifact', + enabled: '0' as '0' | '1', + installedVersion: '1.0.0', + status, + } + expect(gates.canSelectForBatch(artifact)).toBe(false) + expect(gates.canInstall(artifact)).toBe(false) + expect(gates.canUpgrade(artifact)).toBe(false) + expect(gates.canUninstall(artifact)).toBe(false) + for (const operation of ['install', 'upgrade', 'enable', 'disable', 'uninstall']) { + expect(gates.isOperationBlocked(artifact, operation)).toBe(true) + } + } + const local = { source: 'local', status: 'discovered' } + expect(gates.canSelectForBatch(local)).toBe(true) + expect(gates.canInstall(local)).toBe(true) + expect(gates.isOperationBlocked(local, 'install')).toBe(false) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.mjs deleted file mode 100644 index ea5593658..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { checkRepeatSubmit } from '../../../../../ruoyi-fastapi-test/frontend/request-repeat-submit.mjs' - -await checkRepeatSubmit(new URL('../../', import.meta.url)) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.ts new file mode 100644 index 000000000..c4914556c --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRepeatSubmit.test.ts @@ -0,0 +1,8 @@ +import { test } from 'vitest' +import { checkRepeatSubmit } from '../../../../../ruoyi-fastapi-test/frontend/request-repeat-submit.mts' + +test('detects duplicate plugin requests without blocking distinct submissions', async ({ + expect, +}) => { + await checkRepeatSubmit(new URL('../../', import.meta.url), expect) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.mjs deleted file mode 100644 index cdb23e36b..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.mjs +++ /dev/null @@ -1,83 +0,0 @@ -import { stripTypeScriptTypes } from 'node:module' -import locale from '../i18n/test-runtime.cjs' -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { compileScript, parse } from 'vue/compiler-sfc' -import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' - -// 执行组件的真实监听与请求逻辑,只替换网络边界和卸载钩子。 -const source = readFileSync( - new URL('../../src/views/system/plugin/components/PluginRuntimeMetrics.vue', import.meta.url), - 'utf8' -) -const descriptor = parse({ source, filename: 'PluginComponent.vue' }) -const compiled = compileScript(descriptor, { id: 'plugin-runtime-metrics-test' }) -const script = compiled.scriptSetupAst - .filter((statement) => statement.type !== 'ImportDeclaration') - .map((statement) => descriptor.scriptSetup.content.slice(statement.start, statement.end)) - .join('\n') -const setup = new Function( - 't', - 'computed', - 'ref', - 'watch', - 'onBeforeUnmount', - 'defineProps', - 'getPluginRuntimeMetrics', - `${stripTypeScriptTypes(script)}\nreturn { data, loading, error, refresh }` -) -const props = reactive({ pluginId: 'first_plugin' }) -const requests = [] -let unmount -const scope = effectScope() -const state = scope.run(() => - setup( - locale.t, - computed, - ref, - watch, - (callback) => { - unmount = callback - }, - () => props, - (pluginId, signal) => - new Promise((resolve, reject) => { - requests.push({ pluginId, signal, resolve, reject }) - }) - ) -) -assert.equal(state.loading.value, true) -assert.equal(requests[0].pluginId, 'first_plugin') - -props.pluginId = 'second_plugin' -await nextTick() -assert.equal(requests[0].signal.aborted, true) -requests[1].resolve({ data: { series: [{ version: 'second' }] } }) -await nextTick() -requests[0].resolve({ data: { series: [{ version: 'stale' }] } }) -await nextTick() -assert.equal( - state.data.value.series[0].version, - 'second', - 'late response must not replace the selected plugin' -) -assert.equal(state.loading.value, false) - -const failed = state.refresh() -requests[2].reject(new Error('network unavailable')) -await failed -assert.match(state.error.value, /查询失败/) -assert.equal(state.loading.value, false) -const retry = state.refresh() -assert.equal(state.error.value, '') -requests[3].resolve({ data: { supported: false, series: [] } }) -await retry -assert.equal(state.data.value.supported, false) - -const closing = state.refresh() -unmount() -scope.stop() -assert.equal(requests[4].signal.aborted, true) -requests[4].reject(new Error('cancelled')) -await closing -assert.equal(state.error.value, '', 'closing the dialog must not report a failed query') diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.ts new file mode 100644 index 000000000..871f485a3 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginRuntimeMetrics.test.ts @@ -0,0 +1,89 @@ +import { expect, test } from 'vitest' +import { stripTypeScriptTypes } from 'node:module' +import locale from '../i18n/test-runtime.ts' +import { readFileSync } from 'node:fs' +import { compileScript, parse } from 'vue/compiler-sfc' +import { computed, effectScope, nextTick, reactive, ref, watch } from 'vue' + +// 执行组件的真实监听与请求逻辑,只替换网络边界和卸载钩子。 +const source = readFileSync( + new URL('../../src/views/system/plugin/components/PluginRuntimeMetrics.vue', import.meta.url), + 'utf8' +) +const descriptor = parse({ source, filename: 'PluginComponent.vue' }) +const compiled = compileScript(descriptor, { id: 'plugin-runtime-metrics-test' }) +const script = compiled + .scriptSetupAst!.filter((statement) => statement.type !== 'ImportDeclaration') + .map((statement) => descriptor.scriptSetup!.content.slice(statement.start, statement.end)) + .join('\n') +const setup = new Function( + 't', + 'computed', + 'ref', + 'watch', + 'onBeforeUnmount', + 'defineProps', + 'getPluginRuntimeMetrics', + `${stripTypeScriptTypes(script)}\nreturn { data, loading, error, refresh }` +) +test('refreshes metrics and cancels requests when switching plugins', async () => { + const props = reactive({ pluginId: 'first_plugin' }) + const requests: Array<{ + pluginId: string + signal: AbortSignal + resolve: (response: unknown) => void + reject: (reason: Error) => void + }> = [] + let unmount!: () => void + const scope = effectScope() + const state = scope.run(() => + setup( + locale.t, + computed, + ref, + watch, + (callback: () => void) => { + unmount = callback + }, + () => props, + (pluginId: string, signal: AbortSignal) => + new Promise((resolve, reject) => { + requests.push({ pluginId, signal, resolve, reject }) + }) + ) + ) + expect(state.loading.value).toBe(true) + expect(requests[0].pluginId).toBe('first_plugin') + + props.pluginId = 'second_plugin' + await nextTick() + expect(requests[0].signal.aborted).toBe(true) + requests[1].resolve({ data: { series: [{ version: 'second' }] } }) + await nextTick() + requests[0].resolve({ data: { series: [{ version: 'stale' }] } }) + await nextTick() + expect( + state.data.value.series[0].version, + 'late response must not replace the selected plugin' + ).toBe('second') + expect(state.loading.value).toBe(false) + + const failed = state.refresh() + requests[2].reject(new Error('network unavailable')) + await failed + expect(state.error.value).toMatch(/查询失败/) + expect(state.loading.value).toBe(false) + const retry = state.refresh() + expect(state.error.value).toBe('') + requests[3].resolve({ data: { supported: false, series: [] } }) + await retry + expect(state.data.value.supported).toBe(false) + + const closing = state.refresh() + unmount() + scope.stop() + expect(requests[4].signal.aborted).toBe(true) + requests[4].reject(new Error('cancelled')) + await closing + expect(state.error.value, 'closing the dialog must not report a failed query').toBe('') +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs deleted file mode 100644 index 422c91d57..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.mjs +++ /dev/null @@ -1,171 +0,0 @@ -import assert from 'node:assert/strict' -import { readPluginSse, createPluginSseTransport } from '../../src/utils/pluginSse.ts' -import { - PLUGIN_BRIDGE_MAX_BYTES, - PLUGIN_BRIDGE_MAX_STREAM_BYTES, -} from '../../src/utils/pluginBridge.js' - -const encoder = new TextEncoder() -const collect = async (source) => { - const output = [] - for await (const event of source) output.push(event) - return output -} -const chunks = (values, onCancel = () => {}) => - new ReadableStream({ - start(controller) { - for (const value of values) controller.enqueue(value) - controller.close() - }, - cancel: onCancel, - }) -const input = - '\uFEFF: heartbeat\r\nid: 1\r\nevent: tick\r\ndata: 你好😀\r\ndata: second\r\n\r\n' + - 'id: ignored\0id\ndata:\n\n' + - 'id:\revent:\rdata: reset\r\r' + - 'data: unfinished' -const bytes = encoder.encode(input) -const expected = [ - { id: '1', event: 'tick', data: '你好😀\nsecond' }, - { id: '1', event: 'message', data: '' }, - { id: '', event: 'message', data: 'reset' }, -] -for (const size of [1, 2, 7, bytes.length]) { - const split = [] - for (let offset = 0; offset < bytes.length; offset += size) - split.push(bytes.slice(offset, offset + size)) - assert.deepEqual(await collect(readPluginSse(chunks(split))), expected) -} -await assert.rejects(collect(readPluginSse(chunks([new Uint8Array([0xff])])))) -await assert.rejects(collect(readPluginSse(chunks([new Uint8Array([0xe4, 0xb8])])))) -await assert.rejects( - collect(readPluginSse(chunks([encoder.encode('data: ' + 'a'.repeat(PLUGIN_BRIDGE_MAX_BYTES))]))), - /64 KiB/ -) -await assert.rejects( - collect(readPluginSse(chunks([encoder.encode('data: a\n'.repeat(9000))]))), - /64 KiB/ -) -await assert.rejects( - collect(readPluginSse(chunks([new Uint8Array(PLUGIN_BRIDGE_MAX_STREAM_BYTES + 1)]))), - /10 MiB/ -) -let cancelled = false -const infinite = new ReadableStream({ - start(controller) { - controller.enqueue(encoder.encode('data: one\n\ndata: two\n\n')) - }, - cancel() { - cancelled = true - }, -}) -for await (const event of readPluginSse(infinite)) { - assert.equal(event.data, 'one') - break -} -assert.equal(cancelled, true) -assert.equal(infinite.locked, false) - -// 读取中断不能伪装成正常 EOF;异常结束仍释放字节流锁。 -let interrupt -const brokenBody = new ReadableStream({ - start(controller) { - interrupt = () => controller.error(new Error('network disconnected')) - controller.enqueue(encoder.encode('data: first\n\n')) - }, -}) -const brokenStream = readPluginSse(brokenBody) -assert.equal((await brokenStream.next()).value.data, 'first') -interrupt() -await assert.rejects(brokenStream.next(), /network disconnected/) -assert.equal(brokenBody.locked, false) - -let fetched = [] -let encrypted = false -let response = () => - new Response('id: 5\ndata: result\n\n', { - headers: { 'Content-Type': 'text/event-stream; charset=utf-8' }, - }) -const stream = createPluginSseTransport({ - loadPolicy: async () => ({ active: encrypted }), - shouldEncryptRequest: (_, policy) => policy.active, - serializeParams: (params) => new URLSearchParams(params).toString(), - getTimezone: () => 'Asia/Shanghai', - getLocale: () => 'en-US', - origin: 'https://test', - fetchImpl: async (...args) => { - fetched.push(args) - return response() - }, -}) -const config = { - url: '/prefix/apps/demo/api/events', - params: { count: 5 }, - lastEventId: '4', - csrfToken: 'host-only', - signal: new AbortController().signal, -} -assert.deepEqual(await collect(stream(config)), [{ id: '5', event: 'message', data: 'result' }]) -assert.equal(fetched[0][0], 'https://test/prefix/apps/demo/api/events?count=5') -assert.deepEqual(fetched[0][1].headers, { - Accept: 'text/event-stream', - 'X-Plugin-CSRF': 'host-only', - 'X-Timezone': 'Asia/Shanghai', - 'Accept-Language': 'en-US', - 'Last-Event-ID': '4', -}) -assert.equal(fetched[0][1].credentials, 'same-origin') -assert.equal(fetched[0][1].redirect, 'error') -encrypted = true -await assert.rejects(collect(stream(config)), /策略例外/) -assert.equal(fetched.length, 1) -encrypted = false -for (const url of [ - 'https://evil.test/api', - '//evil.test/api', - '/apps/demo/api?x=1', - '/apps/demo/api#x', -]) - await assert.rejects(collect(stream({ ...config, url })), /地址无效/) -const aborted = new AbortController() -aborted.abort() -await assert.rejects(collect(stream({ ...config, signal: aborted.signal })), /取消/) -assert.equal(fetched.length, 1) -for (const value of [ - new Response('{}', { headers: { 'Content-Type': 'application/json' } }), - new Response('error', { status: 401 }), - new Response(null, { status: 204 }), -]) { - response = () => value - await assert.rejects(collect(stream(config)), /响应无效/) -} - -// 宿主保留的关闭事件必须转换为失败,不能交给业务或当作正常 EOF。 -response = () => - new Response( - 'id: 1\ndata: first\n\nevent: ruoyi.plugin.closed\ndata: {"code":403,"reason":"access_revoked"}\n\n', - { - headers: { 'Content-Type': 'text/event-stream' }, - } - ) -const revoked = stream(config) -assert.equal((await revoked.next()).value.data, 'first') -await assert.rejects(revoked.next(), (error) => error.name === 'PluginStreamClosedError') -for (const partial of [ - 'data: unfinished\n', - 'data: unfinished\r', - 'data: unfinished\n\nevent: custom\ndata: partial\n', -]) { - response = () => - new Response(partial + 'event: ruoyi.plugin.closed\ndata: {"code":403}\n\n', { - headers: { 'Content-Type': 'text/event-stream' }, - }) - const values = [] - await assert.rejects( - async () => { - for await (const event of stream(config)) values.push(event.data) - }, - (error) => error.name === 'PluginStreamClosedError' - ) - assert.deepEqual(values, partial.includes('\n\n') ? ['unfinished'] : []) -} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.ts new file mode 100644 index 000000000..112e973d5 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginSse.test.ts @@ -0,0 +1,181 @@ +import { expect, test } from 'vitest' +import { readPluginSse, createPluginSseTransport } from '../../src/utils/pluginSse.ts' +import { + PLUGIN_BRIDGE_MAX_BYTES, + PLUGIN_BRIDGE_MAX_STREAM_BYTES, +} from '../../src/utils/pluginBridge.js' + +const encoder = new TextEncoder() +interface StreamEvent { + data: string + id?: string + event?: string +} +const collect = async (source: AsyncIterable, output: StreamEvent[] = []) => { + for await (const event of source) output.push(event) + return output +} +const chunks = (values: Uint8Array[], onCancel = () => {}) => + new ReadableStream({ + start(controller) { + for (const value of values) controller.enqueue(value) + controller.close() + }, + cancel: onCancel, + }) +test('parses partial event chunks and validates plugin stream requests', async () => { + const input = + '\uFEFF: heartbeat\r\nid: 1\r\nevent: tick\r\ndata: 你好😀\r\ndata: second\r\n\r\n' + + 'id: ignored\0id\ndata:\n\n' + + 'id:\revent:\rdata: reset\r\r' + + 'data: unfinished' + const bytes = encoder.encode(input) + const expected = [ + { id: '1', event: 'tick', data: '你好😀\nsecond' }, + { id: '1', event: 'message', data: '' }, + { id: '', event: 'message', data: 'reset' }, + ] + for (const size of [1, 2, 7, bytes.length]) { + const split: Uint8Array[] = [] + for (let offset = 0; offset < bytes.length; offset += size) + split.push(bytes.slice(offset, offset + size)) + expect(await collect(readPluginSse(chunks(split)))).toStrictEqual(expected) + } + await expect(collect(readPluginSse(chunks([new Uint8Array([0xff])])))).rejects.toThrow() + await expect(collect(readPluginSse(chunks([new Uint8Array([0xe4, 0xb8])])))).rejects.toThrow() + await expect( + collect(readPluginSse(chunks([encoder.encode('data: ' + 'a'.repeat(PLUGIN_BRIDGE_MAX_BYTES))]))) + ).rejects.toThrow(/64 KiB/) + await expect( + collect(readPluginSse(chunks([encoder.encode('data: a\n'.repeat(9000))]))) + ).rejects.toThrow(/64 KiB/) + await expect( + collect(readPluginSse(chunks([new Uint8Array(PLUGIN_BRIDGE_MAX_STREAM_BYTES + 1)]))) + ).rejects.toThrow(/10 MiB/) + let cancelled = false + const infinite = new ReadableStream({ + start(controller) { + controller.enqueue(encoder.encode('data: one\n\ndata: two\n\n')) + }, + cancel() { + cancelled = true + }, + }) + for await (const event of readPluginSse(infinite)) { + expect(event.data).toBe('one') + break + } + expect(cancelled).toBe(true) + expect(infinite.locked).toBe(false) + + // 读取中断不能伪装成正常 EOF;异常结束仍释放字节流锁。 + let interrupt!: () => void + const brokenBody = new ReadableStream({ + start(controller) { + interrupt = () => controller.error(new Error('network disconnected')) + controller.enqueue(encoder.encode('data: first\n\n')) + }, + }) + const brokenStream = readPluginSse(brokenBody) + expect((await brokenStream.next()).value.data).toBe('first') + interrupt() + await expect(brokenStream.next()).rejects.toThrow(/network disconnected/) + expect(brokenBody.locked).toBe(false) + + const fetched: Parameters[] = [] + let encrypted = false + let response = () => + new Response('id: 5\ndata: result\n\n', { + headers: { 'Content-Type': 'text/event-stream; charset=utf-8' }, + }) + const stream = createPluginSseTransport({ + loadPolicy: async () => + ({ transportCryptoActive: encrypted }) as Awaited< + ReturnType[0]['loadPolicy']> + >, + shouldEncryptRequest: (_, policy) => policy.transportCryptoActive, + serializeParams: (params) => + new URLSearchParams( + Object.entries(params).map(([key, value]) => [key, String(value)]) + ).toString(), + getTimezone: () => 'Asia/Shanghai', + getLocale: () => 'en-US', + origin: 'https://test', + fetchImpl: async (...args: Parameters) => { + fetched.push(args) + return response() + }, + }) + const config = { + url: '/prefix/apps/demo/api/events', + params: { count: 5 }, + lastEventId: '4', + csrfToken: 'host-only', + signal: new AbortController().signal, + } + expect(await collect(stream(config))).toStrictEqual([ + { id: '5', event: 'message', data: 'result' }, + ]) + expect(fetched[0][0]).toBe('https://test/prefix/apps/demo/api/events?count=5') + expect(fetched[0][1]!.headers).toStrictEqual({ + Accept: 'text/event-stream', + 'X-Plugin-CSRF': 'host-only', + 'X-Timezone': 'Asia/Shanghai', + 'Accept-Language': 'en-US', + 'Last-Event-ID': '4', + }) + expect(fetched[0][1]!.credentials).toBe('same-origin') + expect(fetched[0][1]!.redirect).toBe('error') + encrypted = true + await expect(collect(stream(config))).rejects.toThrow(/策略例外/) + expect(fetched.length).toBe(1) + encrypted = false + for (const url of [ + 'https://evil.test/api', + '//evil.test/api', + '/apps/demo/api?x=1', + '/apps/demo/api#x', + ]) + await expect(collect(stream({ ...config, url }))).rejects.toThrow(/地址无效/) + const aborted = new AbortController() + aborted.abort() + await expect(collect(stream({ ...config, signal: aborted.signal }))).rejects.toThrow(/取消/) + expect(fetched.length).toBe(1) + for (const value of [ + new Response('{}', { headers: { 'Content-Type': 'application/json' } }), + new Response('error', { status: 401 }), + new Response(null, { status: 204 }), + ]) { + response = () => value + await expect(collect(stream(config))).rejects.toThrow(/响应无效/) + } + + // 宿主保留的关闭事件必须转换为失败,不能交给业务或当作正常 EOF。 + response = () => + new Response( + 'id: 1\ndata: first\n\nevent: ruoyi.plugin.closed\ndata: {"code":403,"reason":"access_revoked"}\n\n', + { + headers: { 'Content-Type': 'text/event-stream' }, + } + ) + const revoked = stream(config) + expect((await revoked.next()).value.data).toBe('first') + await expect(revoked.next()).rejects.toMatchObject({ name: 'PluginStreamClosedError' }) + for (const partial of [ + 'data: unfinished\n', + 'data: unfinished\r', + 'data: unfinished\n\nevent: custom\ndata: partial\n', + ]) { + response = () => + new Response(partial + 'event: ruoyi.plugin.closed\ndata: {"code":403}\n\n', { + headers: { 'Content-Type': 'text/event-stream' }, + }) + const events: StreamEvent[] = [] + await expect(collect(stream(config), events)).rejects.toMatchObject({ + name: 'PluginStreamClosedError', + }) + expect(events.map((event) => event.data)).toStrictEqual( + partial.includes('\n\n') ? ['unfinished'] : [] + ) + } +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.js b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.js deleted file mode 100644 index 72f575b79..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.js +++ /dev/null @@ -1,14 +0,0 @@ -const assert = require('assert').strict - -const { resolvePluginViewPath } = require('../../src/utils/pluginViewResolver') - -assert.equal(resolvePluginViewPath('plugin/demo/index'), './demo/views/index.vue') -assert.equal(resolvePluginViewPath('/plugin/demo/detail/list'), './demo/views/detail/list.vue') -assert.equal(resolvePluginViewPath('system/user/index'), '') -assert.equal(resolvePluginViewPath('plugin/demo'), '') -assert.equal(resolvePluginViewPath('plugin/demo/../admin'), '') -assert.equal(resolvePluginViewPath('plugin/demo//index'), '') -assert.equal(resolvePluginViewPath('plugin/Demo/index'), '') -assert.equal(resolvePluginViewPath('plugin/demo/index.vue'), '') -assert.equal(resolvePluginViewPath('plugin/demo/detail\\list'), '') -assert.equal(resolvePluginViewPath(null), '') diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.ts new file mode 100644 index 000000000..fa29b8a76 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginViewResolver.test.ts @@ -0,0 +1,18 @@ +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) + +const { resolvePluginViewPath } = require('../../src/utils/pluginViewResolver') + +test('resolves plugin view paths and rejects invalid paths', () => { + expect(resolvePluginViewPath('plugin/demo/index')).toBe('./demo/views/index.vue') + expect(resolvePluginViewPath('/plugin/demo/detail/list')).toBe('./demo/views/detail/list.vue') + expect(resolvePluginViewPath('system/user/index')).toBe('') + expect(resolvePluginViewPath('plugin/demo')).toBe('') + expect(resolvePluginViewPath('plugin/demo/../admin')).toBe('') + expect(resolvePluginViewPath('plugin/demo//index')).toBe('') + expect(resolvePluginViewPath('plugin/Demo/index')).toBe('') + expect(resolvePluginViewPath('plugin/demo/index.vue')).toBe('') + expect(resolvePluginViewPath('plugin/demo/detail\\list')).toBe('') + expect(resolvePluginViewPath(null)).toBe('') +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.cjs deleted file mode 100644 index c70a205f6..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.cjs +++ /dev/null @@ -1,52 +0,0 @@ -const assert = require('node:assert/strict') -const { readdirSync, readFileSync } = require('node:fs') -const { join, resolve } = require('node:path') -const { stripTypeScriptTypes } = require('node:module') -const compiler = require('vue/compiler-sfc') -const { transformSync } = require('@babel/core') -const transformModules = require('@babel/plugin-transform-modules-commonjs') - -const frontend = resolve(__dirname, '../..') -const components = join(frontend, 'src/views/system/plugin/components') -const files = [ - join(frontend, 'src/components/PluginFrame/index.vue'), - join(frontend, 'src/views/system/plugin/index.vue'), - ...readdirSync(components) - .filter((name) => name.endsWith('.vue')) - .map((name) => join(components, name)), -] - -// 同时编译真实 Vue 2 模板、setup 脚本和 scoped 样式,避免仅通过脚本逻辑测试。 -for (const filename of files) { - const source = readFileSync(filename, 'utf8') - const descriptor = compiler.parse({ source, filename }) - const script = compiler.compileScript(descriptor, { id: filename }) - const template = compiler.compileTemplate({ - source: descriptor.template.content, - filename, - compilerOptions: { bindingMetadata: script.bindings }, - }) - assert.deepEqual(template.errors, [], `${filename}: template must compile with Vue 2`) - assert.ok(template.code.includes('render'), `${filename}: render function must exist`) - assert.doesNotThrow(() => - transformSync(stripTypeScriptTypes(script.content), { - filename, - configFile: false, - babelrc: false, - plugins: [transformModules], - }) - ) - for (const style of descriptor.styles) { - const result = compiler.compileStyle({ - source: style.content, - filename, - id: 'data-v-plugin', - scoped: style.scoped, - }) - assert.deepEqual(result.errors, [], `${filename}: styles must compile with Vue 2`) - } - assert.doesNotMatch( - source, - /from ['"](?:element-plus|@vue\/compiler-sfc)['"]|VITE_APP_PLUGIN_BASE/ - ) -} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.ts new file mode 100644 index 000000000..99803e6b4 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/pluginVue2Components.test.ts @@ -0,0 +1,55 @@ +import { createRequire } from 'node:module' +import { expect, test } from 'vitest' +const require = createRequire(import.meta.url) +const { readdirSync, readFileSync } = require('node:fs') +const { join, resolve } = require('node:path') +const { stripTypeScriptTypes } = require('node:module') +const compiler = require('vue/compiler-sfc') +const { transformSync } = require('@babel/core') +const transformModules = require('@babel/plugin-transform-modules-commonjs') + +const frontend = resolve(import.meta.dirname, '../..') +const components = join(frontend, 'src/views/system/plugin/components') +const files = [ + join(frontend, 'src/components/PluginFrame/index.vue'), + join(frontend, 'src/views/system/plugin/index.vue'), + ...readdirSync(components) + .filter((name: string) => name.endsWith('.vue')) + .map((name: string) => join(components, name)), +] + +// 同时编译真实 Vue 2 模板、setup 脚本和 scoped 样式,避免仅通过脚本逻辑测试。 +test('compiles plugin components with the Vue 2 compiler', () => { + for (const filename of files) { + const source = readFileSync(filename, 'utf8') + const descriptor = compiler.parse({ source, filename }) + const script = compiler.compileScript(descriptor, { id: filename }) + const template = compiler.compileTemplate({ + source: descriptor.template.content, + filename, + compilerOptions: { bindingMetadata: script.bindings }, + }) + expect(template.errors, `${filename}: template must compile with Vue 2`).toStrictEqual([]) + expect(template.code.includes('render'), `${filename}: render function must exist`).toBeTruthy() + expect(() => + transformSync(stripTypeScriptTypes(script.content), { + filename, + configFile: false, + babelrc: false, + plugins: [transformModules], + }) + ).not.toThrow() + for (const style of descriptor.styles) { + const result = compiler.compileStyle({ + source: style.content, + filename, + id: 'data-v-plugin', + scoped: style.scoped, + }) + expect(result.errors, `${filename}: styles must compile with Vue 2`).toStrictEqual([]) + } + expect(source).not.toMatch( + /from ['"](?:element-plus|@vue\/compiler-sfc)['"]|VITE_APP_PLUGIN_BASE/ + ) + } +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/run-plugin-tests.js b/ruoyi-fastapi-frontend/vue2/web/tests/plugins/run-plugin-tests.js deleted file mode 100644 index afd1dedf2..000000000 --- a/ruoyi-fastapi-frontend/vue2/web/tests/plugins/run-plugin-tests.js +++ /dev/null @@ -1,40 +0,0 @@ -const { readdirSync } = require('node:fs') -const { join, relative } = require('node:path') -const { pathToFileURL } = require('node:url') - -const collectTestFiles = (root) => { - const entries = readdirSync(root, { withFileTypes: true }) - const testFiles = [] - for (const entry of entries) { - const entryPath = join(root, entry.name) - if (entry.isDirectory()) testFiles.push(...collectTestFiles(entryPath)) - else if (entry.isFile() && /\.test\.(?:js|cjs|mjs)$/.test(entry.name)) testFiles.push(entryPath) - } - return testFiles.sort() -} - -async function run() { - const testFiles = collectTestFiles(__dirname) - if (testFiles.length === 0) throw new Error('No plugin tests found') - let failedCount = 0 - for (const testFile of testFiles) { - const testName = relative(__dirname, testFile) - try { - // 等待 ESM 顶层 await,同时兼容旧 CommonJS 测试导出的 Promise。 - const loaded = await import(pathToFileURL(testFile).href) - await loaded.default - console.log(`ok ${testName}`) - } catch (error) { - failedCount += 1 - console.error(`not ok ${testName}`) - console.error(error && error.stack ? error.stack : error) - } - } - if (failedCount > 0) throw new Error(`Plugin tests failed: ${failedCount}/${testFiles.length}`) - console.log(`Plugin tests passed: ${testFiles.length}`) -} - -run().catch((error) => { - console.error(error && error.stack ? error.stack : error) - process.exitCode = 1 -}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.ts similarity index 61% rename from ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.ts index 93a24ae2a..bb0c13772 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/security/logout.test.ts @@ -1,7 +1,8 @@ +import { test } from 'vitest' import { runLogoutTests, runUserInfoSessionTests, -} from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs' +} from '../../../../../ruoyi-fastapi-test/frontend/logout-behavior.mts' -runLogoutTests(new URL('../../', import.meta.url), 'vue2') -runUserInfoSessionTests(new URL('../../', import.meta.url), 'vue2') +runLogoutTests(new URL('../../', import.meta.url), 'vue2', test) +runUserInfoSessionTests(new URL('../../', import.meta.url), 'vue2', test) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cjs b/ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cts similarity index 82% rename from ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cjs rename to ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cts index 9f09dfcc9..272ebf396 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/support/load-module.cts @@ -6,16 +6,17 @@ const ts = require('typescript') const compiler = require('vue/compiler-sfc') // 编译真实 Vue 2.7 组件,只隔离 API 和浏览器资源。 -function createLoader(mocks = {}, globals = {}) { - const locale = require('../i18n/test-runtime.cjs') +function createLoader(mocks: Record = {}, globals: Record = {}) { + const locale = require('../i18n/test-runtime.ts') mocks = { '@/i18n': locale, '@/i18n/adapter': locale, ...mocks } const cache = new Map() - function loadModule(filename) { + function loadModule(filename: string) { filename = path.resolve(filename) if (!path.extname(filename)) { - filename = ['.ts', '.js', '.vue', '/index.ts', '/index.js', '/index.vue'] - .map((suffix) => filename + suffix) - .find(fs.existsSync) + filename = + ['.ts', '.js', '.vue', '/index.ts', '/index.js', '/index.vue'] + .map((suffix) => filename + suffix) + .find(fs.existsSync) ?? filename } if (filename.endsWith('.json')) return JSON.parse(fs.readFileSync(filename, 'utf8')) if (cache.has(filename)) return cache.get(filename).exports @@ -36,7 +37,7 @@ function createLoader(mocks = {}, globals = {}) { const module = { exports: {} } cache.set(filename, module) const nativeRequire = createRequire(filename) - const requireModule = (specifier) => { + const requireModule = (specifier: string) => { if (Object.prototype.hasOwnProperty.call(mocks, specifier)) return mocks[specifier] if (specifier.startsWith('@/')) return loadModule(path.resolve(__dirname, '../../src', specifier.slice(2))) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/support/vue-sfc.d.ts b/ruoyi-fastapi-frontend/vue2/web/tests/support/vue-sfc.d.ts new file mode 100644 index 000000000..5fbde391a --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/support/vue-sfc.d.ts @@ -0,0 +1,5 @@ +declare module '*.vue' { + import type { VueConstructor } from 'vue' + const component: VueConstructor + export default component +} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.mjs b/ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.ts similarity index 55% rename from ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.mjs rename to ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.ts index 392a9aaa2..7a9b1bda2 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.mjs +++ b/ruoyi-fastapi-frontend/vue2/web/tests/time/time.test.ts @@ -1,3 +1,4 @@ +import { test } from 'vitest' import * as time from '../../src/utils/time.ts' -import { testTimeContract } from '../../../../../ruoyi-fastapi-test/time-contract/contract.mjs' -testTimeContract(time) +import { testTimeContract } from '../../../../../ruoyi-fastapi-test/time-contract/contract.mts' +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/vitest/tags-view.test.ts b/ruoyi-fastapi-frontend/vue2/web/tests/vitest/tags-view.test.ts new file mode 100644 index 000000000..9a2780360 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tests/vitest/tags-view.test.ts @@ -0,0 +1,36 @@ +import VueRouter from 'vue-router' +import type { RawLocation } from 'vue-router' +import { expect, it } from 'vitest' +import { restoreVisitedViews, serializeVisitedViews } from '@/utils/tagsView' + +const router = new VueRouter({ + mode: 'abstract', + routes: [ + { path: '/', name: 'home', component: {}, meta: { title: 'Home', affix: true } }, + { path: '/users', name: 'users', component: {}, meta: { title: 'Users' } }, + ], +}) +function resolveRoute(location: RawLocation) { + const { route } = router.resolve(location) + return { ...route, meta: route.meta ?? {} } +} + +it('restores the query, hash and custom title of user-opened tabs', () => { + const users = { ...resolveRoute('/users?page=2#active'), customTitle: 'Active users' } + const saved = serializeVisitedViews([resolveRoute('/'), users]) + const restored = restoreVisitedViews(saved, resolveRoute) + + expect(restored).toHaveLength(1) + expect(restored[0]).toMatchObject({ + name: 'users', + query: { page: '2' }, + hash: '#active', + customTitle: 'Active users', + }) +}) + +it('drops unavailable tabs while retaining routes that still exist', () => { + const saved = { version: 1, views: [null, { path: '/retired' }, { path: '/users' }] } + const restored = restoreVisitedViews(saved, resolveRoute) + expect(restored.map((view) => view.name)).toEqual(['users']) +}) diff --git a/ruoyi-fastapi-frontend/vue2/web/tsconfig.tests.json b/ruoyi-fastapi-frontend/vue2/web/tsconfig.tests.json new file mode 100644 index 000000000..43e3afa8a --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/tsconfig.tests.json @@ -0,0 +1,20 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "allowJs": true, + "types": ["node", "webpack-env"], + "lib": ["ES2024", "DOM", "DOM.Iterable"], + "paths": { + "@/*": ["./src/*"], + "vuex": ["./node_modules/vuex/types/index.d.ts"], + "vitest": ["./node_modules/vitest"] + } + }, + "include": [ + "tests/**/*.ts", + "tests/**/*.cts", + "tests/**/*.tsx", + "vitest.config.mts", + "src/**/*.d.ts" + ] +} diff --git a/ruoyi-fastapi-frontend/vue2/web/vitest.config.mts b/ruoyi-fastapi-frontend/vue2/web/vitest.config.mts new file mode 100644 index 000000000..714aee2de --- /dev/null +++ b/ruoyi-fastapi-frontend/vue2/web/vitest.config.mts @@ -0,0 +1,12 @@ +import { fileURLToPath } from 'node:url' +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, + test: { + include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + execArgv: ['--experimental-vm-modules'], + maxWorkers: 4, + testTimeout: 60_000, + }, +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/eslint.config.mjs b/ruoyi-fastapi-frontend/vue3/mobile/eslint.config.mjs new file mode 100644 index 000000000..231dfb0c5 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/eslint.config.mjs @@ -0,0 +1,54 @@ +import vue from 'eslint-plugin-vue' +import tseslint from 'typescript-eslint' +import vueParser from 'vue-eslint-parser' + +// Rule reference: https://github.com/vuejs/core/blob/main/eslint.config.js +export default [ + { + ignores: [ + '**/{dist,coverage,.cache,.vite,target,playwright-report,test-results}/**', + '**/*.min.js', + '**/*.config.*.timestamp-*.{mjs,cjs}', + '**/auto-imports.d.ts', + '**/components.d.ts', + 'unpackage/**', + ], + }, + { + files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'], + rules: { + 'no-debugger': 'error', + 'no-dupe-keys': 'error', + 'no-unsafe-finally': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + }, + }, + { + files: ['src/**/*.{js,jsx,ts,tsx,vue}'], + rules: { 'no-console': ['error', { allow: ['warn', 'error', 'info'] }] }, + }, + { + files: ['**/*.{ts,cts,mts,tsx,vue}'], + plugins: { '@typescript-eslint': tseslint.plugin }, + languageOptions: { parser: tseslint.parser }, + rules: { + '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 0 }], + '@typescript-eslint/no-import-type-side-effects': 'error', + }, + }, + { + files: ['**/*.vue'], + plugins: { vue }, + languageOptions: { parser: vueParser, parserOptions: { parser: tseslint.parser } }, + rules: { + 'vue/no-duplicate-attributes': 'error', + 'vue/no-parsing-error': 'error', + 'vue/no-deprecated-slot-attribute': 'error', + 'vue/valid-v-else': 'error', + 'vue/valid-v-else-if': 'error', + 'vue/valid-v-if': 'error', + }, + }, +] diff --git a/ruoyi-fastapi-frontend/vue3/mobile/package.json b/ruoyi-fastapi-frontend/vue3/mobile/package.json index 73920073e..4d2eb4de1 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/package.json +++ b/ruoyi-fastapi-frontend/vue3/mobile/package.json @@ -7,10 +7,14 @@ "scripts": { "format": "prettier --write .", "format:check": "prettier --check .", - "test:time": "pnpm run test:contract", - "test:unit": "node --experimental-vm-modules --test tests/behavior.test.mjs", - "test:contract": "node --test tests/time*.test.js", - "test": "pnpm run test:unit && pnpm run test:contract", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test:time": "vitest run tests/time", + "test:unit": "vitest run tests/behavior.test.ts tests/vitest", + "test:vitest": "vitest run", + "test:watch": "vitest watch", + "test:contract": "pnpm run test:time", + "test": "vitest run", "dev": "uni -p mp-weixin", "build": "pnpm run build:mp-weixin", "dev:app": "uni -p app", @@ -49,8 +53,9 @@ "up:pkg": "pnpm up -rLi \"!@dcloudio/*\"", "up:uniapp": "pnpm dlx @dcloudio/uvm@latest", "i18n:check": "node scripts/check-i18n.mjs && x18n --root . check --json", - "test:i18n": "node --test tests/i18n/*.test.mjs", - "typecheck": "vue-tsc --noEmit && tsc --project tsconfig.node.json" + "test:i18n": "vitest run tests/i18n", + "typecheck": "vue-tsc --noEmit && tsc --project tsconfig.node.json", + "typecheck:tests": "tsc --noEmit -p tsconfig.test.json" }, "dependencies": { "@dcloudio/uni-app": "3.0.0-5020620260917001", @@ -95,16 +100,22 @@ "@iconify-json/svg-spinners": "1.2.4", "@types/node": "22.20.5", "@types/node-forge": "1.3.14", + "@vitejs/plugin-vue": "5.2.4", "@vue/runtime-core": "3.4.21", "@x18n/cli": "0.1.14", "autoprefixer": "10.6.1", + "eslint": "9.39.1", + "eslint-plugin-vue": "10.6.2", "postcss": "8.5.30", "prettier": "3.9.10", "sass": "1.105.2", "tailwindcss": "4.3.3", "typescript": "5.9.3", + "typescript-eslint": "8.48.1", "unplugin-auto-import": "20.3.0", "vite": "5.4.21", + "vitest": "3.2.7", + "vue-eslint-parser": "10.2.0", "vue-tsc": "3.2.4", "weapp-ide-cli": "5.4.12", "weapp-tailwindcss": "5.6.3" diff --git a/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml b/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml index ac352f9b0..f3c8e377a 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml +++ b/ruoyi-fastapi-frontend/vue3/mobile/pnpm-lock.yaml @@ -129,15 +129,24 @@ importers: '@types/node-forge': specifier: 1.3.14 version: 1.3.14 + '@vitejs/plugin-vue': + specifier: 5.2.4 + version: 5.2.4(vite@5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1))(vue@3.4.21(typescript@5.9.3)) '@vue/runtime-core': specifier: 3.4.21 version: 3.4.21 '@x18n/cli': specifier: 0.1.14 - version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) autoprefixer: specifier: 10.6.1 version: 10.6.1(postcss@8.5.30) + eslint: + specifier: 9.39.1 + version: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + eslint-plugin-vue: + specifier: 10.6.2 + version: 10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)) postcss: specifier: 8.5.30 version: 8.5.30 @@ -153,12 +162,21 @@ importers: typescript: specifier: 5.9.3 version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) unplugin-auto-import: specifier: 20.3.0 version: 20.3.0 vite: specifier: 5.4.21 version: 5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1) + vitest: + specifier: 3.2.7 + version: 3.2.7(@types/node@22.20.5)(jsdom@16.7.0(supports-color@10.2.2))(lightningcss@1.33.0)(sass@1.105.2)(supports-color@10.2.2)(terser@5.46.1) + vue-eslint-parser: + specifier: 10.2.0 + version: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) vue-tsc: specifier: 3.2.4 version: 3.2.4(typescript@5.9.3) @@ -1654,6 +1672,44 @@ packages: cpu: [x64] os: [win32] + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@formatjs/bigdecimal@0.2.7': resolution: {integrity: sha512-B4+XY/e4u5v261r3a37Kq2ax91gPZSKGyVpx8X5dygAggLlUz+6MeBpmAhaBFGB8WQ4JB1qD+QtKHk9aJkEb9Q==} @@ -1687,6 +1743,26 @@ packages: peerDependencies: hono: ^4 || ^5.0.0-0 + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + '@icebreakers/stylelint-config@1.2.6': resolution: {integrity: sha512-k5JWMnA0mfi83matf6HrJMu7fG2wQJVtPjITV0Dm1TfG6JIob3oo51HFlb2jhNMZg275aUB2sKjidaHfRGcQRg==} hasBin: true @@ -2907,6 +2983,12 @@ packages: '@types/babel__traverse@7.28.0': resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==} + '@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==} @@ -2928,6 +3010,9 @@ packages: '@types/jsesc@2.5.1': resolution: {integrity: sha512-9VN+6yxLOPLOav+7PwjZbxiID2bVaeq0ED4qSQmdQTdjnXJSaCVKTR58t15oqH1H5t8Ng2ZX1SabJVoN9Q34bw==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/node-forge@1.3.14': resolution: {integrity: sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==} @@ -2946,6 +3031,65 @@ packages: '@types/yargs@16.0.11': resolution: {integrity: sha512-sbtvk8wDN+JvEdabmZExoW/HNr1cB7D/j4LT08rMiuikfA7m/JNJg7ATQcgzs34zHnoScDkY0ZRSl29Fkmk36g==} + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@valibot/to-json-schema@1.8.0': resolution: {integrity: sha512-a0M+uwCuQZEPAo65NYkFSJ14O5c213KoSZmPdoCfuFvUhfULi4T2Z6Tpjv6lTVMW9RoLm74RpRAjNEa43KcN+g==} peerDependencies: @@ -2978,6 +3122,35 @@ packages: vite: ^5.0.0 || ^6.0.0 vue: ^3.2.25 + '@vitest/expect@3.2.7': + resolution: {integrity: sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==} + + '@vitest/mocker@3.2.7': + resolution: {integrity: sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@3.2.7': + resolution: {integrity: sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==} + + '@vitest/runner@3.2.7': + resolution: {integrity: sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==} + + '@vitest/snapshot@3.2.7': + resolution: {integrity: sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==} + + '@vitest/spy@3.2.7': + resolution: {integrity: sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==} + + '@vitest/utils@3.2.7': + resolution: {integrity: sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==} + '@volar/language-core@2.4.27': resolution: {integrity: sha512-DjmjBWZ4tJKxfNC1F6HyYERNHPYS7L7OPFyCrestykNdUZMFYzI9WTyvwPcaNaHlrEUwESHYsfEw3isInncZxQ==} @@ -3238,6 +3411,11 @@ packages: acorn-globals@6.0.0: resolution: {integrity: sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==} + acorn-jsx@5.3.2: + resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn-walk@7.2.0: resolution: {integrity: sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==} engines: {node: '>=0.4.0'} @@ -3272,6 +3450,9 @@ packages: ajv-formats@3.0.1: resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + ajv@8.18.0: resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} @@ -3325,6 +3506,10 @@ packages: array-timsort@1.0.3: resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -3425,9 +3610,15 @@ packages: resolution: {integrity: sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==} engines: {node: '>=18'} + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} + brace-expansion@1.1.14: resolution: {integrity: sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==} + brace-expansion@2.1.8: + resolution: {integrity: sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -3469,6 +3660,10 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + cac@6.7.9: resolution: {integrity: sha512-XN5qEpfNQCJ8jRaZgitSkkukjMRCGio+X3Ks5KUbGGlPbV+pSem1l9VuzooCBXOiMFshUZgyYqg6rgN8rjkb/w==} engines: {node: '>=8'} @@ -3513,6 +3708,10 @@ packages: centra@2.7.0: resolution: {integrity: sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg==} + chai@5.3.3: + resolution: {integrity: sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==} + engines: {node: '>=18'} + chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -3525,6 +3724,10 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + check-error@2.1.3: + resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} + engines: {node: '>= 16'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -3785,6 +3988,13 @@ packages: dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + deepmerge@4.3.1: resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} engines: {node: '>=0.10.0'} @@ -3934,6 +4144,9 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + es-module-lexer@1.7.0: + resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} @@ -3967,6 +4180,10 @@ packages: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} @@ -3976,14 +4193,58 @@ packages: engines: {node: '>=6.0'} hasBin: true + eslint-plugin-vue@10.6.2: + resolution: {integrity: sha512-nA5yUs/B1KmKzvC42fyD0+l9Yd+LtEpVhWRbXuDj0e+ZURcTtyRbMDWUeJmTAh2wC6jC83raS63anNM2YT3NPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@stylistic/eslint-plugin': ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + '@typescript-eslint/parser': ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 + peerDependenciesMeta: + '@stylistic/eslint-plugin': + optional: true + '@typescript-eslint/parser': + optional: true + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + esm-env@1.2.2: resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + esprima@4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} hasBin: true + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + esrap@2.4.0: resolution: {integrity: sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==} peerDependencies: @@ -3992,6 +4253,10 @@ packages: '@typescript-eslint/types': optional: true + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + estraverse@5.3.0: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} @@ -4033,6 +4298,10 @@ packages: resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} engines: {node: '>= 0.8.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + expect@27.5.1: resolution: {integrity: sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} @@ -4064,6 +4333,9 @@ packages: fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fast-uri@3.1.0: resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} @@ -4093,6 +4365,10 @@ packages: file-entry-cache@11.1.2: resolution: {integrity: sha512-N2WFfK12gmrK1c1GXOqiAJ1tc5YE+R53zvQ+t5P8S5XhnmKYVB5eZEiLNZKDSmoG8wqqbF9EXYBBW/nef19log==} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + file-type@9.0.0: resolution: {integrity: sha512-Qe/5NJrgIOlwijpq3B7BEpzPFcgzggOTagZmkXQY4LA6bsXKTUstK7Wp12lEJ/mLKTpvIZxmIuRcLYWT6ov9lw==} engines: {node: '>=6'} @@ -4113,6 +4389,14 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + flat-cache@6.1.22: resolution: {integrity: sha512-N2dnzVJIphnNsjHcrxGW7DePckJ6haPrSFqpsBUhHYgwtKGVq4JrBGielEGD2fCVnsGm1zlBVZ8wGhkyuetgug==} @@ -4207,6 +4491,10 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me @@ -4222,6 +4510,10 @@ packages: global@4.4.0: resolution: {integrity: sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w==} + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globby@16.2.0: resolution: {integrity: sha512-QrJia2qDf5BB/V6HYlDTs0I0lBahyjLzpGQg3KT7FnCdTonAyPy2RtY802m2k4ALx6Dp752f82WsOczEVr3l6Q==} engines: {node: '>=20'} @@ -4236,6 +4528,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + h3@2.0.8: resolution: {integrity: sha512-ENuKlF9kC6E6PrvY1PUyE0qkrnnPTIt2/v48uyEEfTVfgoiqBCE0uwwf++2XrWwT1gxjQBDLQ8PAsmZVniKvTw==} engines: {node: '>=20.19.0'} @@ -4360,6 +4655,10 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + ignore@7.0.14: resolution: {integrity: sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==} engines: {node: '>= 4'} @@ -4686,6 +4985,10 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + jsdom@16.7.0: resolution: {integrity: sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==} engines: {node: '>=10'} @@ -4705,15 +5008,24 @@ packages: engines: {node: '>=6'} hasBin: true + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} json-schema-typed@8.0.2: resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} engines: {node: '>=6'} @@ -4725,6 +5037,9 @@ packages: jsonfile@6.2.0: resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + keyv@5.6.0: resolution: {integrity: sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==} @@ -4747,6 +5062,10 @@ packages: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + licia@1.41.1: resolution: {integrity: sha512-XqObV8u1KEMdYWaNK0leRrTwhzKnLQEkhbnuUu7qGNH3zJoN7l9sfvF6PfHstSCuUOmpEP+0SBjRrk0I9uZs8g==} @@ -4939,18 +5258,28 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} lodash.debounce@4.0.8: resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + lodash.merge@4.6.2: + resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.truncate@4.4.2: resolution: {integrity: sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw==} lodash@4.18.1: resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} + loupe@3.2.1: + resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + lru-cache@11.5.3: resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} engines: {node: 20 || >=22} @@ -5061,6 +5390,10 @@ packages: minimatch@3.1.5: resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} + minimatch@9.0.9: + resolution: {integrity: sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==} + engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -5140,6 +5473,9 @@ packages: resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} engines: {node: '>=18'} + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + nwsapi@2.2.23: resolution: {integrity: sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==} @@ -5173,6 +5509,10 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + os-locale-s-fix@1.0.8-fix-1: resolution: {integrity: sha512-Sv0OvhPiMutICiwORAUefv02DCPb62IelBmo8ZsSrRHyI3FStqIWZvjqDkvtjU+lcujo7UNir+dCwKSqlEQ/5w==} engines: {node: '>=10', yarn: ^1.22.4} @@ -5203,10 +5543,18 @@ packages: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + p-try@2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -5282,6 +5630,10 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + pathval@2.0.1: + resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} + engines: {node: '>= 14.16'} + phin@2.9.3: resolution: {integrity: sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==} deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. @@ -5651,6 +6003,10 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@3.9.10: resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==} engines: {node: '>=14'} @@ -5942,6 +6298,9 @@ packages: resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -5995,6 +6354,9 @@ packages: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@2.0.1: resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} engines: {node: '>= 0.8'} @@ -6003,6 +6365,9 @@ packages: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} + std-env@3.10.0: + resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} + string-hash@1.1.3: resolution: {integrity: sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==} @@ -6193,9 +6558,15 @@ packages: timm@1.7.1: resolution: {integrity: sha512-IjZc9KIotudix8bMaBW6QvMuq64BrJWFs1+4V0lXwWGQZwH+LnX87doAYhem4caOEusRP9/g6jVDQmZ8XOk1nw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.1.1: resolution: {integrity: sha512-VKS/ZaQhhkKFMANmAOhhXVoIfBXblQxGX1myCQ2faQrfmobMftXeJPcZGp0gS07ocvGJWDLZGyOZDadDBqYIJg==} engines: {node: '>=18'} @@ -6208,6 +6579,18 @@ packages: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@2.0.0: + resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} + engines: {node: '>=14.0.0'} + + tinyspy@4.0.6: + resolution: {integrity: sha512-u8KszXvGfU68hVcZpRHKG28T0krMuv2G5nDhiHaMLen/gIuFEgIJhaJuO69qjnXg5paSrbPMFfx3brNuN8eVSg==} + engines: {node: '>=14.0.0'} + tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} @@ -6231,9 +6614,19 @@ packages: resolution: {integrity: sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==} engines: {node: '>=8'} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -6253,6 +6646,13 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -6359,6 +6759,9 @@ packages: peerDependencies: browserslist: '>= 4.21.0' + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + url-parse@1.5.10: resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} @@ -6388,6 +6791,11 @@ packages: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + vite@5.4.21: resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} engines: {node: ^18.0.0 || >=20.0.0} @@ -6419,6 +6827,34 @@ packages: terser: optional: true + vitest@3.2.7: + resolution: {integrity: sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==} + engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/debug': ^4.1.12 + '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 + '@vitest/browser': 3.2.7 + '@vitest/ui': 3.2.7 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/debug': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + vscode-uri@3.2.0: resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} @@ -6433,6 +6869,12 @@ packages: '@vue/composition-api': optional: true + vue-eslint-parser@10.2.0: + resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vue-i18n@9.14.5: resolution: {integrity: sha512-0jQ9Em3ymWngyiIkj0+c/k7WgaPO+TNzjKSNq9BvBQaKJECqn9cd9fL4tkDhB5G1QBskGl9YxxbDAhgbFtpe2g==} engines: {node: '>= 16'} @@ -6530,6 +6972,15 @@ packages: engines: {node: '>= 8'} 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'} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -6586,6 +7037,10 @@ packages: xml-name-validator@3.0.0: resolution: {integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==} + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + xml-parse-from-string@1.0.1: resolution: {integrity: sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g==} @@ -6635,6 +7090,10 @@ packages: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + yoctocolors@2.1.2: resolution: {integrity: sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==} engines: {node: '>=18'} @@ -8717,6 +9176,52 @@ snapshots: '@esbuild/win32-x64@0.21.5': optional: true + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))': + dependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@10.2.2)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@10.2.2) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@10.2.2)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@10.2.2) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + '@formatjs/bigdecimal@0.2.7': {} '@formatjs/fast-memoize@3.1.7': {} @@ -8755,6 +9260,22 @@ snapshots: dependencies: hono: 4.13.13 + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + '@icebreakers/stylelint-config@1.2.6(postcss@8.5.30)(stylelint-order@8.1.1(stylelint@17.7.0(supports-color@10.2.2)(typescript@5.9.3)))(stylelint@17.7.0(supports-color@10.2.2)(typescript@5.9.3))': dependencies: comment-json: 4.6.2 @@ -9876,6 +10397,13 @@ snapshots: dependencies: '@babel/types': 7.29.0 + '@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/estree@1.0.9': {} @@ -9896,6 +10424,8 @@ snapshots: '@types/jsesc@2.5.1': {} + '@types/json-schema@7.0.15': {} + '@types/node-forge@1.3.14': dependencies: '@types/node': 22.20.5 @@ -9914,6 +10444,98 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + graphemer: 1.4.0 + ignore: 7.0.14 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@10.2.2) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.48.1(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@10.2.2) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + debug: 4.4.3(supports-color@10.2.2) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.48.1': {} + + '@typescript-eslint/typescript-estree@8.48.1(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.48.1(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@10.2.2) + minimatch: 9.0.9 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@10.2.2)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + '@valibot/to-json-schema@1.8.0(valibot@1.5.0(typescript@5.9.3))': dependencies: valibot: 1.5.0(typescript@5.9.3) @@ -9952,6 +10574,48 @@ snapshots: vite: 5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1) vue: 3.4.21(typescript@5.9.3) + '@vitest/expect@3.2.7': + dependencies: + '@types/chai': 5.2.3 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + tinyrainbow: 2.0.0 + + '@vitest/mocker@3.2.7(vite@5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1))': + dependencies: + '@vitest/spy': 3.2.7 + estree-walker: 3.0.3 + magic-string: 0.30.21 + optionalDependencies: + vite: 5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1) + + '@vitest/pretty-format@3.2.7': + dependencies: + tinyrainbow: 2.0.0 + + '@vitest/runner@3.2.7': + dependencies: + '@vitest/utils': 3.2.7 + pathe: 2.0.3 + strip-literal: 3.1.0 + + '@vitest/snapshot@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + magic-string: 0.30.21 + pathe: 2.0.3 + + '@vitest/spy@3.2.7': + dependencies: + tinyspy: 4.0.6 + + '@vitest/utils@3.2.7': + dependencies: + '@vitest/pretty-format': 3.2.7 + loupe: 3.2.1 + tinyrainbow: 2.0.0 + '@volar/language-core@2.4.27': dependencies: '@volar/source-map': 2.4.27 @@ -10266,25 +10930,25 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@x18n/builtins@0.1.14(typescript@5.9.3)': + '@x18n/builtins@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: '@vue/compiler-sfc': 3.5.44 '@x18n/core': 0.1.14(typescript@5.9.3) json5: 2.2.3 jsonc-parser: 3.3.1 oxc-parser: 0.155.0 - svelte: 5.57.3 + svelte: 5.57.3(@typescript-eslint/types@8.48.1) yaml: 2.9.1 transitivePeerDependencies: - '@typescript-eslint/types' - typescript - '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) - '@x18n/node': 0.1.14(typescript@5.9.3) - '@x18n/ui': 0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + '@x18n/node': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) + '@x18n/ui': 0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) cac: 7.1.0 devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) nostics: 1.3.0 @@ -10304,9 +10968,9 @@ snapshots: transitivePeerDependencies: - typescript - '@x18n/node@0.1.14(typescript@5.9.3)': + '@x18n/node@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) chokidar: 6.0.0 ignore: 7.0.14 @@ -10318,11 +10982,11 @@ snapshots: - '@typescript-eslint/types' - typescript - '@x18n/ui@0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/ui@0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: '@devframes/agentic': 1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6) '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@5.9.3)) - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) valibot: 1.5.0(typescript@5.9.3) @@ -10351,6 +11015,10 @@ snapshots: acorn: 7.4.1 acorn-walk: 7.2.0 + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + acorn-walk@7.2.0: {} acorn@7.4.1: {} @@ -10373,6 +11041,13 @@ snapshots: dependencies: ajv: 8.18.0 + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ajv@8.18.0: dependencies: fast-deep-equal: 3.1.3 @@ -10419,6 +11094,8 @@ snapshots: array-timsort@1.0.3: {} + assertion-error@2.0.1: {} + astral-regex@2.0.0: {} asynckit@0.4.0: {} @@ -10569,11 +11246,17 @@ snapshots: transitivePeerDependencies: - supports-color + boolbase@1.0.0: {} + brace-expansion@1.1.14: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 + brace-expansion@2.1.8: + dependencies: + balanced-match: 1.0.2 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -10616,6 +11299,8 @@ snapshots: bytes@3.1.2: {} + cac@6.7.14: {} + cac@6.7.9: {} cac@7.0.0: {} @@ -10656,6 +11341,14 @@ snapshots: transitivePeerDependencies: - debug + chai@5.3.3: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.3 + deep-eql: 5.0.2 + loupe: 3.2.1 + pathval: 2.0.1 + chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -10669,6 +11362,8 @@ snapshots: char-regex@1.0.2: {} + check-error@2.1.3: {} + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -10882,6 +11577,10 @@ snapshots: dedent@0.7.0: {} + deep-eql@5.0.2: {} + + deep-is@0.1.4: {} + deepmerge@4.3.1: {} default-gateway@6.0.3: @@ -11002,6 +11701,8 @@ snapshots: es-module-lexer@1.5.4: {} + es-module-lexer@1.7.0: {} + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -11073,6 +11774,8 @@ snapshots: escape-string-regexp@2.0.0: {} + escape-string-regexp@4.0.0: {} + escape-string-regexp@5.0.0: {} escodegen@2.1.0: @@ -11083,13 +11786,92 @@ snapshots: optionalDependencies: source-map: 0.6.1 + eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2)) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 7.1.6 + semver: 7.8.5 + vue-eslint-parser: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2) + xml-name-validator: 4.0.0 + optionalDependencies: + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@10.2.2) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@10.2.2) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@10.2.2) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 + transitivePeerDependencies: + - supports-color + esm-env@1.2.2: {} + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + esprima@4.0.1: {} - esrap@2.4.0: + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrap@2.4.0(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + optionalDependencies: + '@typescript-eslint/types': 8.48.1 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 estraverse@5.3.0: {} @@ -11140,6 +11922,8 @@ snapshots: exit@0.1.2: {} + expect-type@1.4.0: {} + expect@27.5.1: dependencies: '@jest/types': 27.5.1 @@ -11238,6 +12022,8 @@ snapshots: fast-json-stable-stringify@2.1.0: {} + fast-levenshtein@2.0.6: {} + fast-uri@3.1.0: {} fastest-levenshtein@1.0.16: {} @@ -11262,6 +12048,10 @@ snapshots: dependencies: flat-cache: 6.1.22 + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + file-type@9.0.0: {} fill-range@7.1.1: @@ -11296,6 +12086,16 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.4.2 + keyv: 4.5.4 + flat-cache@6.1.22: dependencies: cacheable: 2.3.4 @@ -11382,6 +12182,10 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + glob@7.2.3: dependencies: fs.realpath: 1.0.0 @@ -11406,6 +12210,8 @@ snapshots: min-document: 2.19.2 process: 0.11.10 + globals@14.0.0: {} + globby@16.2.0: dependencies: '@sindresorhus/merge-streams': 4.0.0 @@ -11421,6 +12227,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + h3@2.0.8(crossws@0.4.17(srvx@1.0.8)): dependencies: rou3: 1.0.0 @@ -11533,6 +12341,8 @@ snapshots: ieee754@1.2.1: {} + ignore@5.3.2: {} + ignore@7.0.14: {} ignore@7.0.5: {} @@ -12046,6 +12856,10 @@ snapshots: dependencies: argparse: 2.0.1 + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + jsdom@16.7.0(supports-color@10.2.2): dependencies: abab: 2.0.6 @@ -12084,12 +12898,18 @@ snapshots: jsesc@3.1.0: {} + json-buffer@3.0.1: {} + json-parse-even-better-errors@2.3.1: {} + json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} json-schema-typed@8.0.2: {} + json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} jsonc-parser@3.3.1: {} @@ -12100,6 +12920,10 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + keyv@5.6.0: dependencies: '@keyv/serialize': 1.1.1 @@ -12116,6 +12940,11 @@ snapshots: leven@3.1.0: {} + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + licia@1.41.1: {} lightningcss-android-arm64@1.32.0: @@ -12260,14 +13089,22 @@ snapshots: dependencies: p-locate: 4.1.0 + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash.camelcase@4.3.0: {} lodash.debounce@4.0.8: {} + lodash.merge@4.6.2: {} + lodash.truncate@4.4.2: {} lodash@4.18.1: {} + loupe@3.2.1: {} + lru-cache@11.5.3: {} lru-cache@5.1.1: @@ -12351,6 +13188,10 @@ snapshots: dependencies: brace-expansion: 1.1.14 + minimatch@9.0.9: + dependencies: + brace-expansion: 2.1.8 + minimist@1.2.8: {} mkdirp@0.5.6: @@ -12410,6 +13251,10 @@ snapshots: path-key: 4.0.0 unicorn-magic: 0.3.0 + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 + nwsapi@2.2.23: {} object-assign@4.1.1: {} @@ -12434,6 +13279,15 @@ snapshots: dependencies: mimic-fn: 2.1.0 + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + os-locale-s-fix@1.0.8-fix-1: dependencies: lcid: 3.1.1 @@ -12496,10 +13350,18 @@ snapshots: dependencies: p-try: 2.2.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + p-try@2.2.0: {} package-manager-detector@1.6.0: {} @@ -12562,6 +13424,8 @@ snapshots: pathe@2.0.3: {} + pathval@2.0.1: {} + phin@2.9.3: {} phin@3.7.1(debug@4.4.3(supports-color@10.2.2)): @@ -12981,6 +13845,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prelude-ls@1.2.1: {} + prettier@3.9.10: {} pretty-format@27.5.1: @@ -13382,6 +14248,8 @@ snapshots: side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 + siginfo@2.0.0: {} + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -13419,10 +14287,14 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + stackback@0.0.2: {} + statuses@2.0.1: {} statuses@2.0.2: {} + std-env@3.10.0: {} + string-hash@1.1.3: {} string-length@4.0.2: @@ -13591,7 +14463,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.57.3: + svelte@5.57.3(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.6.0 @@ -13603,7 +14475,7 @@ snapshots: clsx: 2.1.1 devalue: 5.9.4 esm-env: 1.2.2 - esrap: 2.4.0 + esrap: 2.4.0(@typescript-eslint/types@8.48.1) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -13659,8 +14531,12 @@ snapshots: timm@1.7.1: {} + tinybench@2.9.0: {} + tinycolor2@1.6.0: {} + tinyexec@0.3.2: {} + tinyexec@1.1.1: {} tinyglobby@0.2.16: @@ -13673,6 +14549,12 @@ snapshots: fdir: 6.5.0(picomatch@4.0.4) picomatch: 4.0.4 + tinypool@1.1.1: {} + + tinyrainbow@2.0.0: {} + + tinyspy@4.0.6: {} + tmpl@1.0.5: {} to-fast-properties@2.0.0: {} @@ -13694,9 +14576,17 @@ snapshots: dependencies: punycode: 2.3.1 + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + tslib@2.8.1: optional: true + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + type-detect@4.0.8: {} type-fest@0.21.3: {} @@ -13716,6 +14606,17 @@ snapshots: dependencies: is-typedarray: 1.0.0 + typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@10.2.2)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + typescript@5.9.3: {} ufo@1.6.3: {} @@ -13826,6 +14727,10 @@ snapshots: escalade: 3.2.0 picocolors: 1.1.1 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + url-parse@1.5.10: dependencies: querystringify: 2.2.0 @@ -13851,6 +14756,24 @@ snapshots: vary@1.1.2: {} + vite-node@3.2.4(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(supports-color@10.2.2)(terser@5.46.1): + dependencies: + cac: 6.7.14 + debug: 4.4.3(supports-color@10.2.2) + es-module-lexer: 1.7.0 + pathe: 2.0.3 + vite: 5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vite@5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1): dependencies: esbuild: 0.21.5 @@ -13863,12 +14786,63 @@ snapshots: sass: 1.105.2 terser: 5.46.1 + vitest@3.2.7(@types/node@22.20.5)(jsdom@16.7.0(supports-color@10.2.2))(lightningcss@1.33.0)(sass@1.105.2)(supports-color@10.2.2)(terser@5.46.1): + dependencies: + '@types/chai': 5.2.3 + '@vitest/expect': 3.2.7 + '@vitest/mocker': 3.2.7(vite@5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1)) + '@vitest/pretty-format': 3.2.7 + '@vitest/runner': 3.2.7 + '@vitest/snapshot': 3.2.7 + '@vitest/spy': 3.2.7 + '@vitest/utils': 3.2.7 + chai: 5.3.3 + debug: 4.4.3(supports-color@10.2.2) + expect-type: 1.4.0 + magic-string: 0.30.21 + pathe: 2.0.3 + picomatch: 4.0.4 + std-env: 3.10.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinyglobby: 0.2.17 + tinypool: 1.1.1 + tinyrainbow: 2.0.0 + vite: 5.4.21(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(terser@5.46.1) + vite-node: 3.2.4(@types/node@22.20.5)(lightningcss@1.33.0)(sass@1.105.2)(supports-color@10.2.2)(terser@5.46.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.20.5 + jsdom: 16.7.0(supports-color@10.2.2) + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + vscode-uri@3.2.0: {} vue-demi@0.14.10(vue@3.4.21(typescript@5.9.3)): dependencies: vue: 3.4.21(typescript@5.9.3) + vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@10.2.2))(supports-color@10.2.2): + dependencies: + debug: 4.4.3(supports-color@10.2.2) + eslint: 9.39.1(jiti@2.7.0)(supports-color@10.2.2) + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + vue-i18n@9.14.5(vue@3.4.21(typescript@5.9.3)): dependencies: '@intlify/core-base': 9.14.5 @@ -14012,6 +14986,13 @@ snapshots: dependencies: isexe: 2.0.0 + 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: dependencies: ansi-styles: 4.3.0 @@ -14046,6 +15027,8 @@ snapshots: xml-name-validator@3.0.0: {} + xml-name-validator@4.0.0: {} + xml-parse-from-string@1.0.1: {} xml2js@0.5.0: @@ -14085,6 +15068,8 @@ snapshots: y18n: 5.0.8 yargs-parser: 20.2.9 + yocto-queue@0.1.0: {} + yoctocolors@2.1.2: {} zimmerframe@1.1.5: {} diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/permission.ts b/ruoyi-fastapi-frontend/vue3/mobile/src/permission.ts index 67d5c16c0..3f53a3076 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/src/permission.ts +++ b/ruoyi-fastapi-frontend/vue3/mobile/src/permission.ts @@ -38,7 +38,7 @@ list.forEach((item) => { } }, fail(err: unknown) { - console.log(err) + console.error(err) }, }) }) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.ts b/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.ts index 38f015100..b05d7ae83 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.ts +++ b/ruoyi-fastapi-frontend/vue3/mobile/src/plugins/modal.ts @@ -73,7 +73,7 @@ export default { try { uni.hideLoading() } catch (e) { - console.log(e) + console.warn(e) } }, } diff --git a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.ts b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.ts index 2783d6ba8..b19809f37 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.ts +++ b/ruoyi-fastapi-frontend/vue3/mobile/src/utils/transportForge.ts @@ -104,8 +104,8 @@ function getAppPlusIosRandomBytes(length: number) { } } return randomBytes - } catch (error) { - return null + } catch { + // 原生接口失败时与其他平台共用下方的空值回退。 } // #endif return null @@ -146,8 +146,8 @@ function getAppPlusAndroidRandomBytes(length: number) { plus.android.autoCollection(secureRandom) } return randomBytes - } catch (error) { - return null + } catch { + // 原生接口失败时与其他平台共用下方的空值回退。 } // #endif return null diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.mjs deleted file mode 100644 index 9642fe6da..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.mjs +++ /dev/null @@ -1,6 +0,0 @@ -import { testMobileBehavior } from '../../../../ruoyi-fastapi-test/frontend/mobile-behavior.mjs' -import { runUserInfoSessionTests } from '../../../../ruoyi-fastapi-test/frontend/logout-behavior.mjs' - -const root = new URL('../', import.meta.url) -testMobileBehavior(root, 'vue3') -runUserInfoSessionTests(root, 'vue3-mobile') diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.ts new file mode 100644 index 000000000..e6c052c95 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/behavior.test.ts @@ -0,0 +1,7 @@ +import { test } from 'vitest' +import { testMobileBehavior } from '../../../../ruoyi-fastapi-test/frontend/mobile-behavior.mts' +import { runUserInfoSessionTests } from '../../../../ruoyi-fastapi-test/frontend/logout-behavior.mts' + +const root = new URL('../', import.meta.url) +testMobileBehavior(root, 'vue3', test) +runUserInfoSessionTests(root, 'vue3-mobile', test) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.mjs deleted file mode 100644 index 85a3c39c8..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { fileURLToPath } from 'node:url' -import { createServer } from 'vite' -import { computed, createSSRApp, h } from 'vue' -import { renderToString } from 'vue/server-renderer' - -test('uni-app can change its app instance locale after the translation plugin is installed', async () => { - const server = await createServer({ - root: fileURLToPath(new URL('../../', import.meta.url)), - configFile: false, - resolve: { alias: { '@': fileURLToPath(new URL('../../src', import.meta.url)) } }, - css: { postcss: { plugins: [] } }, - server: { middlewareMode: true, hmr: false }, - optimizeDeps: { noDiscovery: true }, - }) - try { - const { - default: plugin, - localeState, - useI18n, - } = await server.ssrLoadModule('/src/i18n/adapter.ts') - const app = createSSRApp({ - created() { - let locale = 'zh-CN' - // uni-app 在应用实例上定义此属性,uni.setLocale 通过 Vue 代理写入。 - Object.defineProperty(this, '$locale', { - get: () => locale, - set: (value) => { - locale = value - }, - }) - this.$locale = 'en-US' - }, - render() { - return h('span', this.$locale) - }, - }) - app.use(plugin) - assert.equal('$locale' in app.config.globalProperties, false) - assert.equal(await renderToString(app), 'en-US') - - const language = computed(() => [localeState.locale, localeState.preference]) - assert.deepEqual(language.value, ['zh-CN', 'zh-CN']) - const { engine } = useI18n().i18n - await engine.changeLanguage('en-US') - engine.emit('preferenceChanged', 'auto') - assert.deepEqual(language.value, ['en-US', 'auto']) - } finally { - await server.close() - } -}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.ts new file mode 100644 index 000000000..7125c299d --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/adapter.test.ts @@ -0,0 +1,33 @@ +import { expect, test } from 'vitest' +import plugin, { localeState, useI18n } from '../../src/i18n/adapter.ts' +import { computed, createSSRApp, h } from 'vue' +import { renderToString } from 'vue/server-renderer' + +test('uni-app can change its app instance locale after the translation plugin is installed', async () => { + const app = createSSRApp({ + created() { + let locale = 'zh-CN' + // uni-app 在应用实例上定义此属性,uni.setLocale 通过 Vue 代理写入。 + Object.defineProperty(this, '$locale', { + get: () => locale, + set: (value) => { + locale = value + }, + }) + this.$locale = 'en-US' + }, + render() { + return h('span', this.$locale) + }, + }) + app.use(plugin) + expect('$locale' in app.config.globalProperties).toBe(false) + expect(await renderToString(app)).toBe('en-US') + + const language = computed(() => [localeState.locale, localeState.preference]) + expect(language.value).toStrictEqual(['zh-CN', 'zh-CN']) + const { engine } = useI18n().i18n + await engine.changeLanguage('en-US') + engine.emit('preferenceChanged', 'auto') + expect(language.value).toStrictEqual(['en-US', 'auto']) +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.mjs deleted file mode 100644 index bc366b0a3..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.mjs +++ /dev/null @@ -1,118 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { stripTypeScriptTypes } from 'node:module' -import { test } from 'node:test' -import { createInstance } from 'i18next' -import { localeRequestHeaders } from '../../src/utils/transportLocale.ts' - -function loadSource(name, bindings, names) { - const source = stripTypeScriptTypes( - readFileSync(new URL(`../../src/utils/${name}.ts`, import.meta.url), 'utf8') - ) - .replace(/^import[\s\S]*?from ['"][^'"]+['"]\r?\n/gm, '') - .replace(/\bexport (?=(?:async )?function)/g, '') - return new Function(...Object.keys(bindings), source + `\nreturn {${names.join(',')}}`)( - ...Object.values(bindings) - ) -} - -test('policy, public key and key retry keep the original language without forwarding credentials', async () => { - const values = new Map() - const calls = [] - let policyReply - const platform = { - getStorageSync: (key) => values.get(key), - setStorageSync: (key, value) => values.set(key, value), - removeStorageSync: (key) => values.delete(key), - request(options) { - calls.push(options) - if (options.url.endsWith('/frontend-config')) - policyReply = () => - options.success({ - data: { - code: 200, - data: { - transportCryptoActive: true, - configExpireAt: Math.floor(Date.now() / 1000) + 600, - }, - }, - }) - else queueMicrotask(() => options.success({ data: { code: 500 } })) - }, - } - const engine = createInstance() - await engine.init({ - lng: 'en-US', - resources: { - 'en-US': { - utility: JSON.parse( - readFileSync(new URL('../../src/i18n/locales/en-US/utility.json', import.meta.url)) - ), - }, - }, - }) - const bindings = { - localeRequestHeaders, - uni: platform, - Taro: platform, - config: { baseUrl: 'https://api.example.test' }, - getStorage: platform.getStorageSync, - setStorage: platform.setStorageSync, - removeStorage: platform.removeStorageSync, - translateMessage: (key, fallback, options) => - engine.t(key, { defaultValue: fallback, ...options }), - forge: {}, - primeForgeRandomBytes() {}, - } - const policy = loadSource('transportCryptoPolicy', bindings, [ - 'ensureTransportCryptoPolicyLoaded', - 'getTransportCryptoPolicy', - 'getTransportRequestPath', - 'shouldEncryptQuery', - 'shouldEncryptRequest', - 'shouldEncryptResponse', - ]) - const crypto = loadSource('transportCrypto', { ...bindings, ...policy }, [ - 'encryptTransportRequest', - 'resetTransportRequestConfig', - 'invalidateTransportKeyMeta', - 'shouldRetryTransportWithFreshKey', - ]) - const original = { - 'Accept-Language': 'en-US', - Authorization: 'Bearer secret', - } - const config = { - url: '/login', - method: 'post', - data: { username: 'example' }, - header: { ...original }, - } - const pending = crypto.encryptTransportRequest(config) - // A concurrent UI switch must not change the headers of this request's remaining bootstrap work. - original['Accept-Language'] = 'zh-CN' - policyReply() - await assert.rejects(pending, /Could not retrieve the transport public key/) - for (const msgKey of ['transport.decryptFailed', 'transport.keyExpired']) { - assert.equal(crypto.shouldRetryTransportWithFreshKey({ data: { msgKey } }), true) - assert.equal(crypto.shouldRetryTransportWithFreshKey({ response: { data: { msgKey } } }), true) - } - assert.equal( - crypto.shouldRetryTransportWithFreshKey({ data: { msg: 'Decryption failed' } }), - false - ) - crypto.invalidateTransportKeyMeta() - crypto.resetTransportRequestConfig(config) - await assert.rejects( - crypto.encryptTransportRequest(config), - /Could not retrieve the transport public key/ - ) - assert.equal(calls.length, 3) - assert.ok(calls[0].url.endsWith('/frontend-config')) - assert.ok(calls.slice(1).every((call) => call.url.endsWith('/public-key'))) - for (const call of calls) assert.deepEqual(call.header, { 'Accept-Language': 'en-US' }) - assert.equal(config.header.Authorization, 'Bearer secret') - assert.deepEqual(localeRequestHeaders({ 'accept-language': 'zh-CN', Cookie: 'secret' }), { - 'Accept-Language': 'zh-CN', - }) -}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.ts new file mode 100644 index 000000000..e9f2ca9c0 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/bootstrap.test.ts @@ -0,0 +1,130 @@ +import { readFileSync } from 'node:fs' +import { stripTypeScriptTypes } from 'node:module' +import { expect, test } from 'vitest' +import { createInstance } from 'i18next' +import { localeRequestHeaders } from '../../src/utils/transportLocale.ts' + +type TransportModules = { + transportCrypto: typeof import('../../src/utils/transportCrypto') + transportCryptoPolicy: typeof import('../../src/utils/transportCryptoPolicy') +} +function loadSource( + name: M, + bindings: Record, + names: K[] +): Pick { + const source = stripTypeScriptTypes( + readFileSync(new URL(`../../src/utils/${name}.ts`, import.meta.url), 'utf8') + ) + .replace(/^import[\s\S]*?from ['"][^'"]+['"]\r?\n/gm, '') + .replace(/\bexport (?=(?:async )?function)/g, '') + return new Function(...Object.keys(bindings), source + `\nreturn {${names.join(',')}}`)( + ...Object.values(bindings) + ) +} + +test('policy, public key and key retry keep the original language without forwarding credentials', async () => { + const values = new Map() + interface BootstrapRequest { + url: string + header: Record + success(reply: { data: { code: number; data?: Record } }): void + } + const calls: BootstrapRequest[] = [] + const platform = { + getStorageSync: (key: string) => values.get(key), + setStorageSync: (key: string, value: unknown) => values.set(key, value), + removeStorageSync: (key: string) => values.delete(key), + request(options: BootstrapRequest) { + calls.push(options) + if (!options.url.endsWith('/frontend-config')) + queueMicrotask(() => options.success({ data: { code: 500 } })) + }, + } + const engine = createInstance() + await engine.init({ + lng: 'en-US', + resources: { + 'en-US': { + utility: JSON.parse( + readFileSync( + new URL('../../src/i18n/locales/en-US/utility.json', import.meta.url), + 'utf8' + ) + ), + }, + }, + }) + const bindings = { + localeRequestHeaders, + uni: platform, + Taro: platform, + config: { baseUrl: 'https://api.example.test' }, + getStorage: platform.getStorageSync, + setStorage: platform.setStorageSync, + removeStorage: platform.removeStorageSync, + translateMessage: (key: string, fallback: string, options: Record) => + engine.t(key, { defaultValue: fallback, ...options }), + forge: {}, + primeForgeRandomBytes() {}, + } + const policy = loadSource('transportCryptoPolicy', bindings, [ + 'ensureTransportCryptoPolicyLoaded', + 'getTransportCryptoPolicy', + 'getTransportRequestPath', + 'shouldEncryptQuery', + 'shouldEncryptRequest', + 'shouldEncryptResponse', + ]) + const crypto = loadSource('transportCrypto', { ...bindings, ...policy }, [ + 'encryptTransportRequest', + 'resetTransportRequestConfig', + 'invalidateTransportKeyMeta', + 'shouldRetryTransportWithFreshKey', + ]) + const original = { + 'Accept-Language': 'en-US', + Authorization: 'Bearer secret', + } + const config = { + url: '/login', + method: 'post' as const, + data: { username: 'example' }, + header: { ...original }, + } + const pending = crypto.encryptTransportRequest(config) + // A concurrent UI switch must not change the headers of this request's remaining bootstrap work. + original['Accept-Language'] = 'zh-CN' + const policyRequest = calls.find(({ url }) => url.endsWith('/frontend-config')) + if (!policyRequest) throw new Error('Expected the frontend policy request') + policyRequest.success({ + data: { + code: 200, + data: { + transportCryptoActive: true, + configExpireAt: Math.floor(Date.now() / 1000) + 600, + }, + }, + }) + await expect(pending).rejects.toThrow(/Could not retrieve the transport public key/) + for (const msgKey of ['transport.decryptFailed', 'transport.keyExpired']) { + expect(crypto.shouldRetryTransportWithFreshKey({ data: { msgKey } })).toBe(true) + expect(crypto.shouldRetryTransportWithFreshKey({ response: { data: { msgKey } } })).toBe(true) + } + expect(crypto.shouldRetryTransportWithFreshKey({ data: { msg: 'Decryption failed' } })).toBe( + false + ) + crypto.invalidateTransportKeyMeta() + crypto.resetTransportRequestConfig(config) + await expect(crypto.encryptTransportRequest(config)).rejects.toThrow( + /Could not retrieve the transport public key/ + ) + expect(calls.length).toBe(3) + expect(calls[0].url.endsWith('/frontend-config')).toBeTruthy() + expect(calls.slice(1).every((call) => call.url.endsWith('/public-key'))).toBeTruthy() + for (const call of calls) expect(call.header).toStrictEqual({ 'Accept-Language': 'en-US' }) + expect(config.header.Authorization).toBe('Bearer secret') + expect(localeRequestHeaders({ 'accept-language': 'zh-CN', Cookie: 'secret' })).toStrictEqual({ + 'Accept-Language': 'zh-CN', + }) +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs deleted file mode 100644 index 7aca164d9..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { localizeDictionary } from '../../src/i18n/names.ts' -import { createLocaleRuntime } from '../../src/i18n/runtime.ts' - -test('cached dictionaries switch through a third language without changing business values', async () => { - const locale = createLocaleRuntime({ - meta: { - sourceLocale: 'zh-CN', - defaultLocale: 'zh-CN', - locales: [ - { code: 'zh-CN', enabled: true, fallback: [] }, - { code: 'en-US', enabled: true, fallback: ['zh-CN'] }, - { code: 'ja-JP', enabled: true, fallback: ['en-US'] }, - ], - }, - resources: { 'zh-CN': { common: {} }, 'en-US': { common: {} }, 'ja-JP': { common: {} } }, - storage: { get() {}, set() {} }, - }) - const cache = [ - { originalLabel: '正常', value: '0', labelI18n: { 'en-US': 'Enabled', 'ja-JP': '有効' } }, - { originalLabel: '普通', value: 'basic' }, - ] - await locale.setPreference('en-US') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.label), - ['Enabled', '普通'] - ) - await locale.setPreference('ja-JP') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.label), - ['有効', '普通'] - ) - assert.equal(cache[0].originalLabel, '正常') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.value), - ['0', 'basic'] - ) -}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.ts new file mode 100644 index 000000000..822da7c3d --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/names.test.ts @@ -0,0 +1,51 @@ +import { expect, test } from 'vitest' +import { localizeDictionary } from '../../src/i18n/names.ts' +import { createLocaleRuntime } from '../../src/i18n/runtime.ts' + +test('cached dictionaries switch through a third language without changing business values', async () => { + const locale = createLocaleRuntime({ + meta: { + sourceLocale: 'zh-CN', + defaultLocale: 'zh-CN', + locales: [ + { code: 'zh-CN', nativeName: 'zh-CN', direction: 'ltr', enabled: true, fallback: [] }, + { + code: 'en-US', + nativeName: 'en-US', + direction: 'ltr', + enabled: true, + fallback: ['zh-CN'], + }, + { + code: 'ja-JP', + nativeName: 'ja-JP', + direction: 'ltr', + enabled: true, + fallback: ['en-US'], + }, + ], + }, + resources: { 'zh-CN': { common: {} }, 'en-US': { common: {} }, 'ja-JP': { common: {} } }, + scope: 'dictionary-test', + storage: { get: () => null, set() {} }, + }) + const cache = [ + { originalLabel: '正常', value: '0', labelI18n: { 'en-US': 'Enabled', 'ja-JP': '有効' } }, + { originalLabel: '普通', value: 'basic' }, + ] + await locale.setPreference('en-US') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.label)).toStrictEqual([ + 'Enabled', + '普通', + ]) + await locale.setPreference('ja-JP') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.label)).toStrictEqual([ + '有効', + '普通', + ]) + expect(cache[0].originalLabel).toBe('正常') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.value)).toStrictEqual([ + '0', + 'basic', + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.mjs deleted file mode 100644 index 55e80954e..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readFileSync } from 'node:fs' -import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' - -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) -const resources = { - 'zh-CN': { common: { sample: '中文' } }, - 'en-US': { common: { sample: 'English' } }, -} -function setup(storage = { get: () => null, set: () => {} }, extra = {}) { - return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra }) -} -const key = 'contract:api:locale:v2:user:7' - -test('declared language families preserve exact variants', () => { - const registry = createLocaleRegistry(meta, resources) - assert.equal(registry.resolve('auto', ['en-GB']), 'en-US') - assert.equal(registry.resolve('auto', ['en-AU']), 'en-US') - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }], - } - const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) - assert.equal(precise.resolve('en-GB'), 'en-GB') - assert.equal(precise.resolve('zh-TW'), 'en-US') - assert.throws( - () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources), - /Invalid language fallback/ - ) -}) - -test('source language supplies missing text independently of the negotiation default', async () => { - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - assert.equal(runtime.registry.resolve('unknown'), 'en-US') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), '中文') - assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称') -}) - -test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { - const data = new Map() - const events = [] - const storage = { - get: (k) => data.get(k), - set: (k, v) => { - data.set(k, v) - events.push([k, v]) - }, - } - const a = setup(storage), - b = setup(storage) - a.setAccount(7, 'zh-CN', '0') - b.setAccount(7, 'zh-CN', '0') - let release - let server = { locale: 'zh-CN', revision: '0' } - const delayed = a.setPreference('en-US', { - save: async () => { - server = { locale: 'en-US', revision: '1' } - const response = { ...server } - await new Promise((resolve) => { - release = resolve - }) - return response - }, - }) - await Promise.resolve() - await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) - a.acceptStorageEvent(key, data.get(key)) - const writes = events.length - release() - await delayed - assert.deepEqual(server, { locale: 'auto', revision: '2' }) - assert.equal(a.preference, 'auto') - assert.equal(b.preference, 'auto') - assert.equal(events.length, writes) - assert.deepEqual(JSON.parse(data.get(key)), server) -}) - -test('out-of-order storage and profile reads preserve the latest decimal revision', () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '9007199254740993') - const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) - data.set(key, old) - runtime.acceptStorageEvent(key, old) - runtime.setAccount(7, 'zh-CN', '9007199254740992') - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '9007199254740993') - assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '9007199254740993') -}) - -test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'en-US', revision: '2' }), - }) - assert.equal(runtime.preferenceRevision, '2') - await assert.rejects( - runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }), - /Invalid locale snapshot/ - ) - assert.equal(runtime.preference, 'en-US') -}) - -test('offline account snapshots and API instances are isolated', async () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '1') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '1') - restored.setAccount(8, 'zh-CN', '0') - restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) - assert.equal(restored.preference, 'zh-CN') - restored.setAccount(null) - assert.equal(restored.preference, 'zh-CN') - assert.equal(restored.loginPreference, null) - const other = setup(storage, { scope: 'other:api' }) - other.initialize(true) - assert.equal(other.accountId, null) - assert.equal(other.preference, 'zh-CN') -}) - -test('refreshing the same account does not cancel a pending save', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '0') - let finish - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - finish = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(7, 'zh-CN', '0') - finish({ locale: 'en-US', revision: '1' }) - await pending - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '1') -}) - -test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'auto', revision: '3' }), - }), - /timeout/ - ) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.preferenceRevision, '3') -}) - -test('invalid profile snapshots leave the current account and its revision intact', () => { - const runtime = setup() - runtime.setAccount(7, 'en-US', '4') - assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/) - assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/) - assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/) - assert.equal(runtime.accountId, '7') - assert.equal(runtime.preferenceRevision, '4') - assert.equal(runtime.preference, 'en-US') -}) - -test('dynamic names keep the database source when an application uses English source catalogs', async () => { - const expanded = { - ...meta, - sourceLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - const translations = { 'en-US': 'Users' } - await runtime.setPreference('en-US') - assert.equal(runtime.resolveText('用户管理', translations), 'Users') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), 'English') - assert.equal(runtime.resolveText('用户管理', translations), '用户管理') -}) - -test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => { - const warn = ctx.mock.method(console, 'warn', () => {}) - const runtime = setup(undefined, { - appVersion: '2.0.0', - resources: { - ...resources, - 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, - }, - }) - const t = runtime.engine.getFixedT('en-US', 'layout') - const options = { name: 'Private name' } - assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name') - assert.equal(t('missing', options), 'Text unavailable') - assert.equal(warn.mock.callCount(), 1) - assert.deepEqual(warn.mock.calls[0].arguments, [ - 'Missing translation', - { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, - ]) -}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.ts new file mode 100644 index 000000000..edd42579e --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/protocol.test.ts @@ -0,0 +1,261 @@ +import { expect, test, vi } from 'vitest' +import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' + +import localeMetadata from '../../src/i18n/locale-meta.json' +const resources = { + 'zh-CN': { common: { sample: '中文' } }, + 'en-US': { common: { sample: 'English' } }, +} +function setup( + storage: Parameters[0]['storage'] = { + get: () => null, + set: () => {}, + }, + extra: Partial[0]> = {} +) { + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'contract:api', + storage, + ...extra, + }) +} +const key = 'contract:api:locale:v2:user:7' + +test('declared language families preserve exact variants', () => { + const registry = createLocaleRegistry(localeMetadata, resources) + expect(registry.resolve('auto', ['en-GB'])).toBe('en-US') + expect(registry.resolve('auto', ['en-AU'])).toBe('en-US') + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'en-GB', + nativeName: 'British English', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: ['en-US'], + }, + ], + } + const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) + expect(precise.resolve('en-GB')).toBe('en-GB') + expect(precise.resolve('zh-TW')).toBe('en-US') + expect(() => + createLocaleRegistry({ ...localeMetadata, languageFallbacks: { en: 'missing' } }, resources) + ).toThrow(/Invalid language fallback/) +}) + +test('source language supplies missing text independently of the negotiation default', async () => { + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: [], + }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + expect(runtime.registry.resolve('unknown')).toBe('en-US') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('中文') + expect(runtime.resolveText('原始名称', { 'en-US': 'English name' })).toBe('原始名称') +}) + +test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { + const data = new Map() + const events: [string, string][] = [] + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => { + data.set(k, v) + events.push([k, v]) + }, + } + const a = setup(storage), + b = setup(storage) + a.setAccount(7, 'zh-CN', '0') + b.setAccount(7, 'zh-CN', '0') + const gate = Promise.withResolvers() + let server = { locale: 'zh-CN', revision: '0' } + const delayed = a.setPreference('en-US', { + save: async () => { + server = { locale: 'en-US', revision: '1' } + const response = { ...server } + await gate.promise + return response + }, + }) + await Promise.resolve() + await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) + a.acceptStorageEvent(key, data.get(key) ?? null) + const writes = events.length + gate.resolve() + await delayed + expect(server).toStrictEqual({ locale: 'auto', revision: '2' }) + expect(a.preference).toBe('auto') + expect(b.preference).toBe('auto') + expect(events.length).toBe(writes) + expect(JSON.parse(data.get(key) ?? 'null')).toStrictEqual(server) +}) + +test('out-of-order storage and profile reads preserve the latest decimal revision', () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '9007199254740993') + const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) + data.set(key, old) + runtime.acceptStorageEvent(key, old) + runtime.setAccount(7, 'zh-CN', '9007199254740992') + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('9007199254740993') + expect(JSON.parse(data.get(key) ?? 'null')?.revision).toBe('9007199254740993') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('9007199254740993') +}) + +test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'en-US', revision: '2' }), + }) + expect(runtime.preferenceRevision).toBe('2') + await expect( + runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }) + ).rejects.toThrow(/Invalid locale snapshot/) + expect(runtime.preference).toBe('en-US') +}) + +test('offline account snapshots and API instances are isolated', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '1') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('1') + restored.setAccount(8, 'zh-CN', '0') + restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) + expect(restored.preference).toBe('zh-CN') + restored.setAccount(null) + expect(restored.preference).toBe('zh-CN') + expect(restored.loginPreference).toBe(null) + const other = setup(storage, { scope: 'other:api' }) + other.initialize(true) + expect(other.accountId).toBe(null) + expect(other.preference).toBe('zh-CN') +}) + +test('refreshing the same account does not cancel a pending save', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '0') + const save = Promise.withResolvers<{ locale: string; revision: string }>() + const pending = runtime.setPreference('en-US', { + save: () => save.promise, + }) + await Promise.resolve() + runtime.setAccount(7, 'zh-CN', '0') + save.resolve({ locale: 'en-US', revision: '1' }) + await pending + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('1') +}) + +test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'auto', revision: '3' }), + }) + ).rejects.toThrow(/timeout/) + expect(runtime.preference).toBe('auto') + expect(runtime.preferenceRevision).toBe('3') +}) + +test('invalid profile snapshots leave the current account and its revision intact', () => { + const runtime = setup() + runtime.setAccount(7, 'en-US', '4') + expect(() => Reflect.apply(runtime.setAccount, runtime, [undefined, 'zh-CN', '4'])).toThrow( + /Missing locale account/ + ) + expect(() => Reflect.apply(runtime.setAccount, runtime, [8, 'zh-CN', 4])).toThrow( + /Invalid locale snapshot/ + ) + expect(() => runtime.setAccount(8, 'zh-CN')).toThrow(/Invalid locale snapshot/) + expect(runtime.accountId).toBe('7') + expect(runtime.preferenceRevision).toBe('4') + expect(runtime.preference).toBe('en-US') +}) + +test('dynamic names keep the database source when an application uses English source catalogs', async () => { + const expanded = { + ...localeMetadata, + sourceLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { code: 'ja-JP', nativeName: 'ja-JP', direction: 'ltr', enabled: true, fallback: [] }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + const translations = { 'en-US': 'Users' } + await runtime.setPreference('en-US') + expect(runtime.resolveText('用户管理', translations)).toBe('Users') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('English') + expect(runtime.resolveText('用户管理', translations)).toBe('用户管理') +}) + +test('a missing key keeps explicit fallback text or uses a safe label and reports only once', () => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) + const runtime = setup(undefined, { + appVersion: '2.0.0', + resources: { + ...resources, + 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, + }, + }) + const t = runtime.engine.getFixedT('en-US', 'layout') + const options = { name: 'Private name' } + expect(t('missing', { ...options, defaultValue: 'Hello {{name}}' })).toBe('Hello Private name') + expect(t('missing', options)).toBe('Text unavailable') + expect(warn.mock.calls.length).toBe(1) + expect(warn.mock.calls[0]).toStrictEqual([ + 'Missing translation', + { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs deleted file mode 100644 index a39121551..000000000 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.mjs +++ /dev/null @@ -1,195 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readdirSync, readFileSync } from 'node:fs' -import { fileURLToPath } from 'node:url' -import { createServer } from 'vite' -import { - createLocaleRuntime, - createLocaleRegistry, - normalizeLocale, -} from '../../src/i18n/runtime.ts' -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) - -test('the bundled registry includes every enabled locale and namespace', async () => { - const server = await createServer({ - root: fileURLToPath(new URL('../../', import.meta.url)), - configFile: false, - css: { postcss: { plugins: [] } }, - server: { middlewareMode: true, hmr: false }, - optimizeDeps: { noDiscovery: true }, - }) - try { - const { resources } = await server.ssrLoadModule('/src/i18n/registry.ts') - for (const { code } of meta.locales.filter((entry) => entry.enabled)) { - const dir = new URL(`../../src/i18n/locales/${code}/`, import.meta.url) - const files = readdirSync(dir).filter((name) => name.endsWith('.json')) - const expected = Object.fromEntries( - files.map((name) => [name.slice(0, -5), JSON.parse(readFileSync(new URL(name, dir)))]) - ) - assert.deepEqual(resources[code], expected) - } - } finally { - await server.close() - } -}) - -const resources = Object.fromEntries( - meta.locales.map(({ code }) => [ - code, - { - common: JSON.parse( - readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url)) - ), - }, - ]) -) -function setup(extra = {}) { - const data = new Map() - return createLocaleRuntime({ - meta, - resources, - scope: 'test:api', - storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }, - ...extra, - }) -} -test('canonical locales, explicit aliases, and precise region fallback', () => { - const runtime = setup() - assert.equal(normalizeLocale('en_us'), 'en-US') - assert.equal(normalizeLocale('../en'), null) - assert.equal(normalizeLocale('x-acme'), 'x-acme') - assert.equal(runtime.registry.resolve('en'), 'en-US') - assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN') - assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US') -}) -test('third language is configured, not a two-language branch', async () => { - const expanded = { - ...meta, - locales: [ - ...meta.locales, - { - code: 'ja-JP', - nativeName: '日本語', - enabled: true, - direction: 'ltr', - aliases: ['ja'], - fallback: ['en-US'], - }, - ], - } - const runtime = setup({ - meta: expanded, - resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, - }) - await runtime.setPreference('ja-JP') - assert.equal(runtime.locale, 'ja-JP') - assert.equal(runtime.t('common:language'), '言語') - assert.equal(runtime.headers['Accept-Language'], 'ja-JP') - assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name') -}) -test('save failure leaves active language and preference intact', async () => { - const runtime = setup() - runtime.setAccount(1, 'zh-CN', '0') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('network') - }, - }) - ) - assert.equal(runtime.locale, 'zh-CN') - assert.equal(runtime.preference, 'zh-CN') -}) -test('an old save cannot overwrite a new account', async () => { - const runtime = setup() - runtime.setAccount(1, 'zh-CN', '0') - let done - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - done = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(2, 'zh-CN', '0') - done() - await assert.rejects(pending) - assert.equal(runtime.accountId, '2') - assert.equal(runtime.locale, 'zh-CN') -}) -test('an explicit login choice survives reload and is consumed only by a matching login', async () => { - const data = new Map() - const storage = { get: (key) => data.get(key), set: (key, value) => data.set(key, value) } - const runtime = setup({ storage }) - await runtime.setPreference('en-US') - const submitted = runtime.loginPreference - await runtime.setPreference('auto') - runtime.confirmLoginPreference(submitted) - assert.equal(runtime.loginPreference, 'auto') - - const reloaded = setup({ storage }) - reloaded.initialize(false) - assert.equal(reloaded.preference, 'auto') - assert.equal(reloaded.loginPreference, 'auto') - reloaded.confirmLoginPreference('auto') - reloaded.setAccount(1, 'auto', '1') - assert.equal(reloaded.loginPreference, null) - await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) - reloaded.setAccount(null) - assert.equal(reloaded.preference, 'en-US') - assert.equal(reloaded.loginPreference, null) - - const next = setup({ storage }) - next.initialize(false) - assert.equal(next.preference, 'en-US') - assert.equal(next.loginPreference, null) - next.setAccount(2, 'fr-CA', '0') - assert.equal(next.preference, 'fr-CA') - assert.equal(next.locale, 'zh-CN') -}) -test('auto follows changed device locale without changing the preference', async () => { - let device = 'en-US' - const runtime = setup({ deviceLocales: () => [device] }) - const languages = [] - const preferences = [] - runtime.engine.on('languageChanged', (code) => languages.push(code)) - runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) - await runtime.setPreference('auto') - const oldHeaders = runtime.headers - device = 'en-GB' - runtime.refreshDeviceLocale() - device = 'zh-CN' - runtime.refreshDeviceLocale() - runtime.refreshDeviceLocale() - assert.deepEqual(languages, ['en-US', 'zh-CN']) - assert.deepEqual(preferences, ['auto']) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.locale, 'zh-CN') - assert.equal(oldHeaders['Accept-Language'], 'en-US') -}) -test('preference switches are serialized and recover after failed requests', async () => { - const runtime = setup() - runtime.setAccount(1, 'zh-CN', '0') - const seen = [] - const save = async (value) => { - seen.push(value) - return { locale: value, revision: String(seen.length) } - } - await Promise.all([ - runtime.setPreference('en-US', { save }), - runtime.setPreference('zh-CN', { save }), - ]) - assert.deepEqual(seen, ['en-US', 'zh-CN']) - assert.equal(runtime.locale, 'zh-CN') -}) -test('fallback cycles and missing resources fail at registration', () => { - assert.throws( - () => - createLocaleRegistry( - { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, - resources - ), - /cycle/ - ) - assert.throws(() => createLocaleRegistry(meta, {}), /Missing/) -}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.ts new file mode 100644 index 000000000..c05143462 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/runtime.test.ts @@ -0,0 +1,183 @@ +import { expect, test } from 'vitest' +import { readdirSync, readFileSync } from 'node:fs' +import { resources as bundledResources } from '../../src/i18n/registry.ts' +import { + createLocaleRuntime, + createLocaleRegistry, + normalizeLocale, +} from '../../src/i18n/runtime.ts' +import localeMetadata from '../../src/i18n/locale-meta.json' + +test('the bundled registry includes every enabled locale and namespace', () => { + for (const { code } of localeMetadata.locales.filter((entry) => entry.enabled)) { + const dir = new URL(`../../src/i18n/locales/${code}/`, import.meta.url) + const files = readdirSync(dir).filter((name) => name.endsWith('.json')) + const expected = Object.fromEntries( + files.map((name) => [name.slice(0, -5), JSON.parse(readFileSync(new URL(name, dir), 'utf8'))]) + ) + const catalogs: import('../../src/i18n/runtime').LocaleResources = bundledResources + expect(catalogs[code]).toStrictEqual(expected) + } +}) + +const resources = Object.fromEntries( + localeMetadata.locales.map(({ code }) => [ + code, + { + common: JSON.parse( + readFileSync(new URL(`../../src/i18n/locales/${code}/common.json`, import.meta.url), 'utf8') + ), + }, + ]) +) +function setup(extra: Partial[0]> = {}) { + const data = new Map() + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'test:api', + storage: { get: (k) => data.get(k) ?? null, set: (k, v) => data.set(k, v) }, + ...extra, + }) +} +test('canonical locales, explicit aliases, and precise region fallback', () => { + const runtime = setup() + expect(normalizeLocale('en_us')).toBe('en-US') + expect(normalizeLocale('../en')).toBe(null) + expect(normalizeLocale('x-acme')).toBe('x-acme') + expect(runtime.registry.resolve('en')).toBe('en-US') + expect(runtime.registry.resolve('zh-TW')).toBe('zh-CN') + expect(runtime.registry.resolve('auto', ['ja-JP', 'en-US'])).toBe('en-US') +}) +test('third language is configured, not a two-language branch', async () => { + const expanded = { + ...localeMetadata, + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + enabled: true, + direction: 'ltr', + aliases: ['ja'], + fallback: ['en-US'], + }, + ], + } + const runtime = setup({ + meta: expanded, + resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, + }) + await runtime.setPreference('ja-JP') + expect(runtime.locale).toBe('ja-JP') + expect(runtime.t('common:language')).toBe('言語') + expect(runtime.headers['Accept-Language']).toBe('ja-JP') + expect(runtime.resolveText('原名', { 'en-US': 'Fallback name' })).toBe('Fallback name') +}) +test('save failure leaves active language and preference intact', async () => { + const runtime = setup() + runtime.setAccount(1, 'zh-CN', '0') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('network') + }, + }) + ).rejects.toThrow() + expect(runtime.locale).toBe('zh-CN') + expect(runtime.preference).toBe('zh-CN') +}) +test('an old save cannot overwrite a new account', async () => { + const runtime = setup() + runtime.setAccount(1, 'zh-CN', '0') + const save = Promise.withResolvers() + const pending = runtime.setPreference('en-US', { + save: () => save.promise, + }) + await Promise.resolve() + runtime.setAccount(2, 'zh-CN', '0') + save.resolve() + await expect(pending).rejects.toThrow() + expect(runtime.accountId).toBe('2') + expect(runtime.locale).toBe('zh-CN') +}) +test('an explicit login choice survives reload and is consumed only by a matching login', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (key) => data.get(key) ?? null, + set: (key, value) => data.set(key, value), + } + const runtime = setup({ storage }) + await runtime.setPreference('en-US') + const submitted = runtime.loginPreference + await runtime.setPreference('auto') + runtime.confirmLoginPreference(submitted) + expect(runtime.loginPreference).toBe('auto') + + const reloaded = setup({ storage }) + reloaded.initialize(false) + expect(reloaded.preference).toBe('auto') + expect(reloaded.loginPreference).toBe('auto') + reloaded.confirmLoginPreference('auto') + reloaded.setAccount(1, 'auto', '1') + expect(reloaded.loginPreference).toBe(null) + await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) + reloaded.setAccount(null) + expect(reloaded.preference).toBe('en-US') + expect(reloaded.loginPreference).toBe(null) + + const next = setup({ storage }) + next.initialize(false) + expect(next.preference).toBe('en-US') + expect(next.loginPreference).toBe(null) + next.setAccount(2, 'fr-CA', '0') + expect(next.preference).toBe('fr-CA') + expect(next.locale).toBe('zh-CN') +}) +test('auto follows changed device locale without changing the preference', async () => { + let device = 'en-US' + const runtime = setup({ deviceLocales: () => [device] }) + const languages: string[] = [] + const preferences: string[] = [] + runtime.engine.on('languageChanged', (code) => languages.push(code)) + runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) + await runtime.setPreference('auto') + const oldHeaders = runtime.headers + device = 'en-GB' + runtime.refreshDeviceLocale() + device = 'zh-CN' + runtime.refreshDeviceLocale() + runtime.refreshDeviceLocale() + expect(languages).toStrictEqual(['en-US', 'zh-CN']) + expect(preferences).toStrictEqual(['auto']) + expect(runtime.preference).toBe('auto') + expect(runtime.locale).toBe('zh-CN') + expect(oldHeaders['Accept-Language']).toBe('en-US') +}) +test('preference switches are serialized and recover after failed requests', async () => { + const runtime = setup() + runtime.setAccount(1, 'zh-CN', '0') + const seen: string[] = [] + const save = async (value: string) => { + seen.push(value) + return { locale: value, revision: String(seen.length) } + } + await Promise.all([ + runtime.setPreference('en-US', { save }), + runtime.setPreference('zh-CN', { save }), + ]) + expect(seen).toStrictEqual(['en-US', 'zh-CN']) + expect(runtime.locale).toBe('zh-CN') +}) +test('fallback cycles and missing resources fail at registration', () => { + expect(() => + createLocaleRegistry( + { + ...localeMetadata, + locales: localeMetadata.locales.map((item) => ({ ...item, fallback: [item.code] })), + }, + resources + ) + ).toThrow(/cycle/) + expect(() => createLocaleRegistry(localeMetadata, {})).toThrow(/Missing/) +}) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.ts similarity index 70% rename from ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs rename to ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.ts index c5a32834c..ed1c8b55f 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/i18n/x18n.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -15,7 +15,7 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a items_one: '{{count}} item', items_other: '{{count}} items', } - async function catalog(code, values) { + async function catalog(code: string, values: Record) { const dir = join(root, 'locales', code) await mkdir(dir, { recursive: true }) await writeFile(join(dir, 'common.json'), JSON.stringify(values)) @@ -24,7 +24,8 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -47,24 +48,28 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a await catalog('en-US', english) await catalog('ja-JP', { greeting: 'こんにちは、{{name}}', items_other: '{{count}} 件' }) let result = check() - assert.equal(result.status, 0, JSON.stringify(result.report.errors)) - assert.equal(result.report.data.projects[0].coverage.length, 3) - assert.ok( + expect(result.status, JSON.stringify(result.report.errors)).toBe(0) + expect(result.report.data.projects[0].coverage.length).toBe(3) + expect( result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0) - ) - assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key')) + ).toBeTruthy() + expect(!result.report.diagnostics.some((item) => item.code === 'unused-key')).toBeTruthy() await catalog('en-US', { items_one: english.items_one, items_other: english.items_other }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'missing-translation') + ).toBeTruthy() await catalog('en-US', { ...english, greeting: 'Hello' }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch') + ).toBeTruthy() await writeFile(join(root, 'src/missing.js'), "t('common:missing')") result = check() - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key')) + expect(result.report.diagnostics.some((item) => item.code === 'missing-key')).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } -}) +}, 30000) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.js b/ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.ts similarity index 54% rename from ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.js rename to ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.ts index bff51277e..fd45e7afa 100644 --- a/ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.js +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/time-polyfill.test.ts @@ -1,5 +1,7 @@ -import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mjs' +import { afterAll, test, vi } from 'vitest' +import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mts' // 在独立测试进程中模拟缺少原生 Intl 的运行时,再加载 App 时间工具。 -globalThis.Intl = undefined +vi.stubGlobal('Intl', undefined) +afterAll(() => vi.unstubAllGlobals()) const time = await import('../src/utils/time.ts') -testTimeContract(time) +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.mjs b/ruoyi-fastapi-frontend/vue3/mobile/tests/time.test.ts similarity index 55% rename from ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.mjs rename to ruoyi-fastapi-frontend/vue3/mobile/tests/time.test.ts index 4944f1178..9fd694b0c 100644 --- a/ruoyi-fastapi-frontend/vue2/mobile/tests/time.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/time.test.ts @@ -1,3 +1,4 @@ +import { test } from 'vitest' import * as time from '../src/utils/time.ts' -import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mjs' -testTimeContract(time) +import { testTimeContract } from '../../../../ruoyi-fastapi-test/time-contract/contract.mts' +testTimeContract(time, test) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tests/vitest/webview.test.ts b/ruoyi-fastapi-frontend/vue3/mobile/tests/vitest/webview.test.ts new file mode 100644 index 000000000..b0e6136a3 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tests/vitest/webview.test.ts @@ -0,0 +1,15 @@ +import { expect, it } from 'vitest' +import { resolveWebviewUrl } from '@/utils/webview' + +it('preserves an encoded query value in both raw and route-encoded URLs', () => { + const url = 'https://example.org/detail?next=%2Fhome%3Fitem%3D2' + expect(resolveWebviewUrl(url)).toBe(url) + expect(resolveWebviewUrl(encodeURIComponent(url))).toBe(url) +}) + +it.each(['ftp://example.org/', '//example.org/', 'https%3A%2F%2F%ZZ'])( + 'rejects an unsupported or malformed webview URL %s', + (url) => { + expect(resolveWebviewUrl(url)).toBe('') + } +) diff --git a/ruoyi-fastapi-frontend/vue3/mobile/tsconfig.test.json b/ruoyi-fastapi-frontend/vue3/mobile/tsconfig.test.json new file mode 100644 index 000000000..43b0761bf --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/tsconfig.test.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["node", "vite/client", "@dcloudio/types"], + "lib": ["ES2024", "DOM", "DOM.Iterable"], + "paths": { + "@/*": ["./src/*"], + "vitest": ["./node_modules/vitest"] + } + }, + "include": ["tests/**/*.ts", "tests/**/*.tsx", "vitest.config.ts", "src/**/*.d.ts"] +} diff --git a/ruoyi-fastapi-frontend/vue3/mobile/vitest.config.ts b/ruoyi-fastapi-frontend/vue3/mobile/vitest.config.ts new file mode 100644 index 000000000..d202ab2a9 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/mobile/vitest.config.ts @@ -0,0 +1,17 @@ +import { fileURLToPath } from 'node:url' +import vue from '@vitejs/plugin-vue' +import { defineConfig } from 'vitest/config' +import postcssPlugins from './postcss.config' + +export default defineConfig({ + plugins: [vue()], + css: { postcss: { plugins: postcssPlugins } }, + resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, + test: { + include: ['tests/**/*.{test,spec}.?(c|m)[jt]s?(x)'], + pool: 'forks', + maxWorkers: 4, + poolOptions: { forks: { execArgv: ['--experimental-vm-modules'] } }, + restoreMocks: true, + }, +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/eslint.config.mjs b/ruoyi-fastapi-frontend/vue3/web/eslint.config.mjs new file mode 100644 index 000000000..2ab5b0424 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/eslint.config.mjs @@ -0,0 +1,54 @@ +import vue from 'eslint-plugin-vue' +import tseslint from 'typescript-eslint' +import vueParser from 'vue-eslint-parser' + +// Rule reference: https://github.com/vuejs/core/blob/main/eslint.config.js +export default [ + { + ignores: [ + '**/{dist,coverage,.cache,.vite,target,playwright-report,test-results}/**', + '**/*.min.js', + '**/*.config.*.timestamp-*.{mjs,cjs}', + '**/auto-imports.d.ts', + '**/components.d.ts', + 'tests/plugins/fixtures/bridge-b0d16a3e/pluginBridge.js', + ], + }, + { + files: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx,vue}'], + rules: { + 'no-debugger': 'error', + 'no-dupe-keys': 'error', + 'no-unsafe-finally': 'error', + 'no-unreachable': 'error', + 'use-isnan': 'error', + 'valid-typeof': 'error', + }, + }, + { + files: ['{src,plugins}/**/*.{js,jsx,ts,tsx,vue}'], + rules: { 'no-console': ['error', { allow: ['warn', 'error', 'info'] }] }, + }, + { + files: ['**/*.{ts,cts,mts,tsx,vue}'], + plugins: { '@typescript-eslint': tseslint.plugin }, + languageOptions: { parser: tseslint.parser }, + rules: { + '@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 0 }], + '@typescript-eslint/no-import-type-side-effects': 'error', + }, + }, + { + files: ['**/*.vue'], + plugins: { vue }, + languageOptions: { parser: vueParser, parserOptions: { parser: tseslint.parser } }, + rules: { + 'vue/no-duplicate-attributes': 'error', + 'vue/no-parsing-error': 'error', + 'vue/no-deprecated-slot-attribute': 'error', + 'vue/valid-v-else': 'error', + 'vue/valid-v-else-if': 'error', + 'vue/valid-v-if': 'error', + }, + }, +] diff --git a/ruoyi-fastapi-frontend/vue3/web/package.json b/ruoyi-fastapi-frontend/vue3/web/package.json index 0a0b8854e..0a7f83b1f 100644 --- a/ruoyi-fastapi-frontend/vue3/web/package.json +++ b/ruoyi-fastapi-frontend/vue3/web/package.json @@ -14,17 +14,22 @@ "typecheck": "vue-tsc --noEmit && tsc --noEmit -p tsconfig.node.json", "format": "prettier --write .", "format:check": "prettier --check .", - "test": "pnpm run test:unit && pnpm run test:contract", - "test:unit": "pnpm run test:auth-center && pnpm run test:plugin && pnpm run test:job && pnpm run test:session", + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test": "vitest run", + "test:unit": "vitest run tests/auth-center tests/plugins tests/job tests/security tests/vitest", + "test:vitest": "vitest run", + "test:watch": "vitest watch", "test:contract": "pnpm run test:time", - "test:job": "node tests/run-tests.js job", - "test:plugin": "node tests/run-tests.js plugins", - "test:auth-center": "node tests/run-tests.js auth-center", - "test:time": "node --test tests/time/time.test.js", + "test:job": "vitest run tests/job", + "test:plugin": "vitest run tests/plugins", + "test:auth-center": "vitest run tests/auth-center", + "test:time": "vitest run tests/time", "preview": "vite preview", - "test:session": "node --experimental-vm-modules --test tests/security/logout.test.mjs", + "test:session": "vitest run tests/security", "i18n:check": "node scripts/check-i18n.mjs && x18n --root . check --json", - "test:i18n": "node --test tests/i18n/*.test.mjs" + "test:i18n": "vitest run tests/i18n", + "typecheck:tests": "tsc --noEmit -p tsconfig.test.json" }, "repository": { "type": "git", @@ -78,16 +83,21 @@ "@x18n/builtins": "0.1.14", "@x18n/cli": "0.1.14", "esbuild": "0.28.2", + "eslint": "9.39.1", + "eslint-plugin-vue": "10.6.2", "less": "4.9.1", "prettier": "3.9.10", "sass-embedded": "1.105.2", "typescript": "5.9.3", + "typescript-eslint": "8.48.1", "unplugin-auto-import": "0.18.6", "unplugin-vue-setup-extend-plus": "1.0.1", "vite": "8.3.4", "vite-plugin-compression": "0.5.1", "vite-plugin-monaco-editor-esm": "2.0.3", "vite-plugin-svg-icons": "2.0.1", + "vitest": "5.0.5", + "vue-eslint-parser": "10.2.0", "vue-tsc": "3.2.4" }, "packageManager": "pnpm@11.28.6", diff --git a/ruoyi-fastapi-frontend/vue3/web/pnpm-lock.yaml b/ruoyi-fastapi-frontend/vue3/web/pnpm-lock.yaml index dc0a790e8..2eaea2caa 100644 --- a/ruoyi-fastapi-frontend/vue3/web/pnpm-lock.yaml +++ b/ruoyi-fastapi-frontend/vue3/web/pnpm-lock.yaml @@ -140,13 +140,19 @@ importers: version: 3.5.44 '@x18n/builtins': specifier: 0.1.14 - version: 0.1.14(typescript@5.9.3) + version: 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/cli': specifier: 0.1.14 - version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + version: 0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) esbuild: specifier: 0.28.2 version: 0.28.2 + eslint: + specifier: 9.39.1 + version: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-plugin-vue: + specifier: 10.6.2 + version: 10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)) less: specifier: 4.9.1 version: 4.9.1(supports-color@8.1.1) @@ -159,6 +165,9 @@ importers: typescript: specifier: 5.9.3 version: 5.9.3 + typescript-eslint: + specifier: 8.48.1 + version: 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) unplugin-auto-import: specifier: 0.18.6 version: 0.18.6(@vueuse/core@14.4.0(vue@3.5.44(typescript@5.9.3)))(rollup@4.64.7) @@ -177,6 +186,12 @@ importers: vite-plugin-svg-icons: specifier: 2.0.1 version: 2.0.1(supports-color@8.1.1)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1)) + vitest: + specifier: 5.0.5 + version: 5.0.5(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1)) + vue-eslint-parser: + specifier: 10.2.0 + version: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) vue-tsc: specifier: 3.2.4 version: 3.2.4(typescript@5.9.3) @@ -500,6 +515,44 @@ packages: cpu: [x64] os: [win32] + '@eslint-community/eslint-utils@4.10.1': + resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.4': + resolution: {integrity: sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.21.2': + resolution: {integrity: sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/config-helpers@0.4.2': + resolution: {integrity: sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/core@0.17.0': + resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/eslintrc@3.3.7': + resolution: {integrity: sha512-F42g89Qd5oAWtp0k0nnSrjziAKza7w8SVT4mStc18LZMaRb4J1HQAHLCalEtDCxrTuksx7NU9qsmeLwpOfPqWw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/js@9.39.1': + resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/object-schema@2.1.7': + resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@eslint/plugin-kit@0.4.1': + resolution: {integrity: sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@floating-ui/core@1.8.0': resolution: {integrity: sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ==} @@ -509,6 +562,26 @@ packages: '@floating-ui/utils@0.2.12': resolution: {integrity: sha512-HpCo8tmWzLVad5s2d19EhAz5zqrrQ6s69qd6moPMQvkOuSwDT1YgRfWSVuc4ennqrgv3OHppiOGMQ7oC13yIww==} + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} @@ -1127,6 +1200,9 @@ packages: '@terrastruct/d2@0.1.33': resolution: {integrity: sha512-eK5hyfGIJFolC7sUsiKvWdY9xGFctTe3d+PSijo09IYDso8psztC+A4SammizXtlwYZpnnW0AtDjfBYauceSeA==} + '@types/chai@5.2.3': + resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + '@types/d3-array@3.2.2': resolution: {integrity: sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==} @@ -1223,6 +1299,9 @@ packages: '@types/d3@7.4.3': resolution: {integrity: sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==} + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -1241,6 +1320,9 @@ packages: '@types/js-cookie@3.0.6': resolution: {integrity: sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==} + '@types/json-schema@7.0.15': + resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/lodash-es@4.17.12': resolution: {integrity: sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==} @@ -1271,6 +1353,65 @@ packages: '@types/web-bluetooth@0.0.21': resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@typescript-eslint/eslint-plugin@8.48.1': + resolution: {integrity: sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.48.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/parser@8.48.1': + resolution: {integrity: sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/project-service@8.48.1': + resolution: {integrity: sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/scope-manager@8.48.1': + resolution: {integrity: sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/tsconfig-utils@8.48.1': + resolution: {integrity: sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/type-utils@8.48.1': + resolution: {integrity: sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/types@8.48.1': + resolution: {integrity: sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.48.1': + resolution: {integrity: sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/utils@8.48.1': + resolution: {integrity: sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + + '@typescript-eslint/visitor-keys@8.48.1': + resolution: {integrity: sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.4.0': resolution: {integrity: sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==} @@ -1289,6 +1430,20 @@ packages: vite: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 vue: ^3.2.25 || ^3.6.0-rc.10 + '@vitest/mocker@5.0.5': + resolution: {integrity: sha512-xLL3lkDegJZw+MGoGaCCsFayDZthGgpAtr3Vziyfc4p7xH89K7KRPcRBBh/kEYm0Aqkt5DtTmkYpBtRV/FrHZg==} + peerDependencies: + msw: ^2.4.9 || ^3.0.0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/spy@5.0.5': + resolution: {integrity: sha512-lwJRExuH417257Q5wv9QYugN9IMJkoxcrKrYxGPQkBzl7wlNpTUxD/5yNX4ESKVUIShKPgkGchYPFMWOOk0wzw==} + '@volar/language-core@2.4.27': resolution: {integrity: sha512-DjmjBWZ4tJKxfNC1F6HyYERNHPYS7L7OPFyCrestykNdUZMFYzI9WTyvwPcaNaHlrEUwESHYsfEw3isInncZxQ==} @@ -1402,6 +1557,11 @@ packages: 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: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 + acorn@8.19.0: resolution: {integrity: sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==} engines: {node: '>=0.4.0'} @@ -1411,6 +1571,9 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + alien-signals@3.2.1: resolution: {integrity: sha512-I8FjmltrfnDFoZedi5CG8DghVYNhzb/Ijluz7tCSJH0xpd0484Kowhbb1XDYOxfJpU1p5wnM2X54dA+IfGyD1g==} @@ -1452,6 +1615,9 @@ packages: peerDependencies: vue: '>=3.2.0' + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-query@5.3.1: resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} engines: {node: '>= 0.4'} @@ -1483,6 +1649,10 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + assign-symbols@1.0.0: resolution: {integrity: sha512-Q+JC7Whu8HhmTdBph/Tq59IoRtoy6KAm5zzPv00WdujX82lbAL8K7WVjne7vdCsAmbF4AYaDOPyO3k0kl8qIrw==} engines: {node: '>=0.10.0'} @@ -1570,6 +1740,10 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} + callsites@3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} + camelcase@1.2.1: resolution: {integrity: sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==} engines: {node: '>=0.10.0'} @@ -1581,6 +1755,10 @@ packages: resolution: {integrity: sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==} engines: {node: '>=0.10.0'} + chai@6.3.0: + resolution: {integrity: sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==} + engines: {node: '>=18'} + chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -1985,6 +2163,9 @@ packages: resolution: {integrity: sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==} engines: {node: '>= 0.4'} + deep-is@0.1.4: + resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -2189,6 +2370,9 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} + es-module-lexer@2.3.2: + resolution: {integrity: sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==} + es-object-atoms@1.1.2: resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} @@ -2213,13 +2397,61 @@ packages: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} + eslint-plugin-vue@10.6.2: + resolution: {integrity: sha512-nA5yUs/B1KmKzvC42fyD0+l9Yd+LtEpVhWRbXuDj0e+ZURcTtyRbMDWUeJmTAh2wC6jC83raS63anNM2YT3NPw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@stylistic/eslint-plugin': ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 + '@typescript-eslint/parser': ^7.0.0 || ^8.0.0 + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 + peerDependenciesMeta: + '@stylistic/eslint-plugin': + optional: true + '@typescript-eslint/parser': + optional: true + + eslint-scope@8.4.0: + resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint-visitor-keys@3.4.3: + resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + + eslint-visitor-keys@4.2.1: + resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + eslint@9.39.1: + resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + esm-env@1.2.2: resolution: {integrity: sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==} + espree@10.4.0: + resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} + engines: {node: '>=0.10'} + esrap@2.4.0: resolution: {integrity: sha512-CQPcneEHw/czj32uwQC52nYnax8H4SXt25FCM+LIwGZ49cMIxpOj3bP8wmzcI+Z0HIy5KkClaPhRLfCySzwHPA==} peerDependencies: @@ -2228,12 +2460,24 @@ packages: '@typescript-eslint/types': optional: true + esrecurse@4.3.0: + resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} + engines: {node: '>=4.0'} + + estraverse@5.3.0: + resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} + engines: {node: '>=4.0'} + 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'} + etag@1.8.1: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} @@ -2253,6 +2497,10 @@ packages: resolution: {integrity: sha512-w/ozOKR9Obk3qoWeY/WDi6MFta9AoMR+zud60mdnbniMcBxRuFJyDt2LdX/14A1UABeqk+Uk+LDfUpvoGKppZA==} engines: {node: '>=0.10.0'} + expect-type@1.4.0: + resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} + engines: {node: '>=12.0.0'} + exsolve@1.1.3: resolution: {integrity: sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==} @@ -2278,6 +2526,12 @@ packages: resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==} engines: {node: '>=8.6.0'} + fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + + fast-levenshtein@2.0.6: + resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} + fastq@1.20.3: resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==} @@ -2293,6 +2547,10 @@ packages: fecha@4.2.3: resolution: {integrity: sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==} + file-entry-cache@8.0.0: + resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} + engines: {node: '>=16.0.0'} + file-saver@2.0.5: resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==} @@ -2304,6 +2562,17 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} + find-up@5.0.0: + resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} + engines: {node: '>=10'} + + flat-cache@4.0.1: + resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} + engines: {node: '>=16'} + + flatted@3.6.0: + resolution: {integrity: sha512-1Szo+c/GCm/cKBovrfT0Wpqw7fiqZg/xzlZtLtvWlYyvT4zUGZTS8Qo3sXPQ0nWqMg3N4nEFL2Ukzrjnsopwbg==} + flru@1.0.2: resolution: {integrity: sha512-kWyh8ADvHBFz6ua5xYOPnUroZTT/bwWfrCeL0Wj1dzG4/YOmOcfJ99W8dOVyyynJN35rZ9aCOtHChqQovV7yog==} engines: {node: '>=6'} @@ -2393,6 +2662,10 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob-parent@6.0.2: + resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} + engines: {node: '>=10.13.0'} + glob@10.5.0: resolution: {integrity: sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me @@ -2402,6 +2675,10 @@ packages: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + globals@14.0.0: + resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + engines: {node: '>=18'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -2416,6 +2693,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + graphemer@1.4.0: + resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graphlib@2.1.8: resolution: {integrity: sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==} @@ -2535,6 +2815,10 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + engines: {node: '>= 4'} + ignore@7.0.14: resolution: {integrity: sha512-wCBiZ77u1tuWde6G/nfOtLaCTYcFDU5yCzARzK10y+rLhzYoL7a7yEemcopcc2Mzow7gZOIjnV2ym1NYmdiJOQ==} engines: {node: '>= 4'} @@ -2547,9 +2831,17 @@ packages: immutable@5.1.9: resolution: {integrity: sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==} + import-fresh@3.3.1: + resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} + engines: {node: '>=6'} + import-meta-resolve@4.2.0: resolution: {integrity: sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==} + imurmurhash@0.1.4: + resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} + engines: {node: '>=0.8.19'} + inflight@1.0.6: resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. @@ -2788,9 +3080,22 @@ packages: js-tokens@9.0.1: resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + js-yaml@4.3.2: + resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==} + hasBin: true + jsencrypt@3.5.4: resolution: {integrity: sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA==} + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json2module@0.0.3: resolution: {integrity: sha512-qYGxqrRrt4GbB8IEOy1jJGypkNsjWoIMlZt4bAsmUScCA507Hbc2p1JOhBzqn45u3PWafUgH2OnzyNU7udO/GA==} hasBin: true @@ -2818,6 +3123,9 @@ packages: resolution: {integrity: sha512-v6Tznz3zJ7u3niRCoDTsumM2+HA2XXcCu+WAacCeHD2z3p9A9Ks987o5FzfTGBN0e8A0vjEgIDvLbICrXpdw/Q==} hasBin: true + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + khroma@2.1.0: resolution: {integrity: sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==} @@ -2852,6 +3160,10 @@ packages: engines: {node: '>=18'} hasBin: true + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + lightningcss-android-arm64@1.33.0: resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==} engines: {node: '>= 12.0.0'} @@ -2953,6 +3265,10 @@ packages: locate-character@3.0.0: resolution: {integrity: sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==} + locate-path@6.0.0: + resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} + engines: {node: '>=10'} + lodash-es@4.18.1: resolution: {integrity: sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==} @@ -2997,6 +3313,9 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.4.5: + resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==} + make-dir@5.1.0: resolution: {integrity: sha512-IfpFq6UM39dUNiphpA6uDezNx/AvWyhwfICWPR3t1VspkgkMZrL+Rk1RbN1bx+aeNYwOrqGJgEgV3yotk+ZUVw==} engines: {node: '>=18'} @@ -3199,6 +3518,9 @@ packages: nanopop@2.4.2: resolution: {integrity: sha512-NzOgmMQ+elxxHeIha+OG/Pv3Oc3p4RU2aBhwWwAqDpXrdTbtRylbRLQztLy8dMMwfl6pclznBdfUhccEn9ZIzw==} + natural-compare@1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + needle@2.9.1: resolution: {integrity: sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==} engines: {node: '>= 4.4.x'} @@ -3268,6 +3590,10 @@ packages: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} + obug@3.0.0: + resolution: {integrity: sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==} + engines: {node: '>=12.20.0'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -3277,6 +3603,10 @@ packages: oniguruma-to-es@4.3.6: resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + engines: {node: '>= 0.8.0'} + own-keys@1.0.2: resolution: {integrity: sha512-19YVAg7T+WTrxggPukVq7DjTv6+PJ867TmhCvBsYwmbFCsZd344rq2Ld1p0wo8f8Qrrhgp82c6FJRqdXWtSEhg==} engines: {node: '>= 0.4'} @@ -3285,6 +3615,14 @@ packages: resolution: {integrity: sha512-C/ReSf1JUFukK/zvk6jhcNibSssvas5+ktIzK7fbKVd3CedWe59C3QwHEOrEZj/4Rt9+xg0Jeis/Jv1F/KM1mw==} engines: {node: ^20.19.0 || >=22.12.0} + p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + + p-locate@5.0.0: + resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} + engines: {node: '>=10'} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -3294,6 +3632,10 @@ packages: parchment@3.0.0: resolution: {integrity: sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==} + parent-module@1.0.1: + resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + engines: {node: '>=6'} + parse-node-version@1.0.1: resolution: {integrity: sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==} engines: {node: '>= 0.10'} @@ -3308,6 +3650,10 @@ packages: path-data-parser@0.1.0: resolution: {integrity: sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==} + path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + path-is-absolute@1.0.1: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} @@ -3384,6 +3730,10 @@ packages: peerDependencies: postcss: '>4 <9' + postcss-selector-parser@7.2.1: + resolution: {integrity: sha512-GwxlMgTTXwIom+ebC7an3k6RaJDwklRQQnfiXsLPGicu8FYV/k/+1/9YY2OU2+r938H2t4X0TDxoif+HP2rjzQ==} + engines: {node: '>=4'} + postcss@5.2.18: resolution: {integrity: sha512-zrUjRRe1bpXKsX1qAJNJjqZViErVuyEkMTRrwu4ud4sbTtIBRmtaYDrHmcGgmrbsW3MHfmtIf+vJumgQn+PrXg==} engines: {node: '>=0.12'} @@ -3409,6 +3759,10 @@ packages: resolution: {integrity: sha512-spBB5sgC4cv2YcW03f/IAUN1pgDJWNWD8FzkyY4mArLUMJW+KlQhlmUdKAHQuPfb00Jl5xIfImeOsf6YL8QK7Q==} engines: {node: '>=0.10.0'} + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + engines: {node: '>= 0.8.0'} + prettier@3.9.10: resolution: {integrity: sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==} engines: {node: '>=14'} @@ -3434,6 +3788,10 @@ packages: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} engines: {node: '>=6'} + punycode@2.3.1: + resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} + engines: {node: '>=6'} + quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} @@ -3492,6 +3850,10 @@ packages: resize-observer-polyfill@1.5.1: resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==} + resolve-from@4.0.0: + resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} + engines: {node: '>=4'} + resolve-url@0.2.1: resolution: {integrity: sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==} deprecated: https://github.com/lydell/resolve-url#deprecated @@ -3839,6 +4201,9 @@ packages: resolution: {integrity: sha512-72E9+uLc27Mt718pMHt9VMNiAL4LMsmDbBva8mxWUCkT07fSzEGMYUCk0XWY6lp0j6RBAG4cJ3mWuZv2OE3s0g==} engines: {node: '>=0.10.0'} + std-env@4.3.0: + resolution: {integrity: sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==} + stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} @@ -3899,6 +4264,10 @@ packages: resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} engines: {node: '>=12'} + strip-json-comments@3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + strip-literal@2.1.1: resolution: {integrity: sha512-631UJ6O00eNGfMiWG78ck80dfBab8X6IVFB51jZK5Icd7XAs60Z5y7QdSd/wGIklnWvRbUNloVzhOKKmutxQ6Q==} @@ -3960,6 +4329,10 @@ packages: tiny-emitter@2.1.0: resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} + tinybench@6.2.5: + resolution: {integrity: sha512-b/8GRMdnY4cqkfCLyaFpTGIv1qwfi3oT0mWaepwT++6Z/ZrYehNfZZ2JDKVLKGhNoEkS3IIB1ELtCT0XS5DtOA==} + engines: {node: '>=20.0.0'} + tinycolor2@1.6.0: resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} @@ -3994,6 +4367,12 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} + engines: {node: '>=18.12'} + peerDependencies: + typescript: '>=4.8.4' + ts-dedent@2.3.0: resolution: {integrity: sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==} engines: {node: '>=6.10'} @@ -4007,6 +4386,10 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + type-check@0.4.0: + resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} + engines: {node: '>= 0.8.0'} + typed-array-buffer@1.0.3: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} engines: {node: '>= 0.4'} @@ -4027,6 +4410,13 @@ packages: resolution: {integrity: sha512-r+7YvGfM5TkTiDQ5EqWi/Z4L4KP3jUI+YCmTtWg1tmTHUw6xladLJqzR2heMaHBIM0TTFLZmn/EkIaEHYs/bIA==} engines: {node: '>= 0.4'} + typescript-eslint@8.48.1: + resolution: {integrity: sha512-FbOKN1fqNoXp1hIl5KYpObVrp0mCn+CLgn479nmu2IsRMrx2vyv74MmsBLVlhg8qVwNFGbXSp8fh1zp8pEoC2A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <6.0.0' + typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -4105,6 +4495,9 @@ packages: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} + uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + urix@0.1.0: resolution: {integrity: sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==} deprecated: Please see https://github.com/lydell/urix#deprecated @@ -4199,6 +4592,47 @@ packages: yaml: optional: true + vitest@5.0.5: + resolution: {integrity: sha512-cPODOMF8YnkiiYtDdHo6n4wWmBrOBBbOIYH2d33M4l3CdNn72h+qMmO6uXffUN6A5AZFXNND/d+krS9mgkXRfg==} + engines: {node: ^22.12.0 || ^24.0.0 || >=26.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@opentelemetry/api': ^1.9.0 + '@types/node': ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 5.0.5 + '@vitest/browser-preview': 5.0.5 + '@vitest/browser-webdriverio': ^5.0.0-beta.5 || >=5.0.0 + '@vitest/coverage-istanbul': 5.0.5 + '@vitest/coverage-v8': 5.0.5 + '@vitest/ui': 5.0.5 + happy-dom: '*' + jsdom: '*' + vite: ^6.4.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.2.0: resolution: {integrity: sha512-m2gXo3bn0G1kT9InzMf07fTbqMbGtyckj3bH5ktLO+1Ssv+yiATZ4dhwaQv9UZWxJh6E9IFGnQyjgWVDWVBDrg==} @@ -4208,6 +4642,12 @@ packages: vue-cropper@1.1.4: resolution: {integrity: sha512-5m98vBsCEI9rbS4JxELxXidtAui3qNyTHLHg67Qbn7g8cg+E6LcnC+hh3SM/p94x6mFh6KRxT1ttnta+wCYqWA==} + vue-eslint-parser@10.2.0: + resolution: {integrity: sha512-CydUvFOQKD928UzZhTp4pr2vWz1L+H99t7Pkln2QSPdvmURT0MoC4wUccfCnuEaihNsu9aYYyk+bep8rlfkUXw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + vue-router@4.6.4: resolution: {integrity: sha512-Hz9q5sa33Yhduglwz6g9skT8OBPii+4bFn88w6J+J4MfEo4KRRpmiNG/hHHkdbRFlLBOqxN8y8gf2Fb0MTUgVg==} peerDependencies: @@ -4265,10 +4705,19 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@3.2.1: + resolution: {integrity: sha512-Tb2FUhB4vUsGQlfSquQLYkApkuPAFQXGFzxWKHHumVz2dK+X1RUm/HnID4+TfIGYJ1kTcwOaCk/buYCEJr6YjQ==} + engines: {node: '>=20.11'} + hasBin: true + window-size@0.1.0: resolution: {integrity: sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==} engines: {node: '>= 0.8.0'} + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@0.0.2: resolution: {integrity: sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==} engines: {node: '>=0.4.0'} @@ -4284,6 +4733,10 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + xml-name-validator@4.0.0: + resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} + engines: {node: '>=12'} + yaml@2.9.1: resolution: {integrity: sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==} engines: {node: '>= 14.6'} @@ -4292,6 +4745,10 @@ packages: yargs@3.10.0: resolution: {integrity: sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==} + yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + zimmerframe@1.1.5: resolution: {integrity: sha512-msJxIvYDYcoNL+PJsu+7qmpDWsYmAxTY+2TNYXXF0hzBzBk0BMecOqDOG/EckUoKCuKwObfbugIl8QpqHDXeFA==} @@ -4657,6 +5114,52 @@ snapshots: '@esbuild/win32-x64@0.28.2': optional: true + '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))': + dependencies: + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-visitor-keys: 3.4.3 + + '@eslint-community/regexpp@4.12.4': {} + + '@eslint/config-array@0.21.2(supports-color@8.1.1)': + dependencies: + '@eslint/object-schema': 2.1.7 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 3.1.5 + transitivePeerDependencies: + - supports-color + + '@eslint/config-helpers@0.4.2': + dependencies: + '@eslint/core': 0.17.0 + + '@eslint/core@0.17.0': + dependencies: + '@types/json-schema': 7.0.15 + + '@eslint/eslintrc@3.3.7(supports-color@8.1.1)': + dependencies: + ajv: 6.15.0 + debug: 4.4.3(supports-color@8.1.1) + espree: 10.4.0 + globals: 14.0.0 + ignore: 5.3.2 + import-fresh: 3.3.1 + js-yaml: 4.3.2 + minimatch: 3.1.5 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + + '@eslint/js@9.39.1': {} + + '@eslint/object-schema@2.1.7': {} + + '@eslint/plugin-kit@0.4.1': + dependencies: + '@eslint/core': 0.17.0 + levn: 0.4.1 + '@floating-ui/core@1.8.0': dependencies: '@floating-ui/utils': 0.2.12 @@ -4668,6 +5171,22 @@ snapshots: '@floating-ui/utils@0.2.12': {} + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 + + '@humanfs/node@0.16.8': + dependencies: + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 + + '@humanfs/types@0.15.0': {} + + '@humanwhocodes/module-importer@1.0.1': {} + + '@humanwhocodes/retry@0.4.3': {} + '@iconify/types@2.0.0': {} '@iconify/utils@3.1.7': @@ -5093,6 +5612,11 @@ snapshots: '@terrastruct/d2@0.1.33': {} + '@types/chai@5.2.3': + dependencies: + '@types/deep-eql': 4.0.2 + assertion-error: 2.0.1 + '@types/d3-array@3.2.2': {} '@types/d3-axis@3.0.6': @@ -5212,6 +5736,8 @@ snapshots: '@types/d3-transition': 3.0.9 '@types/d3-zoom': 3.0.9 + '@types/deep-eql@4.0.2': {} + '@types/estree@1.0.9': {} '@types/file-saver@2.0.7': {} @@ -5226,6 +5752,8 @@ snapshots: '@types/js-cookie@3.0.6': {} + '@types/json-schema@7.0.15': {} + '@types/lodash-es@4.17.12': dependencies: '@types/lodash': 4.17.26 @@ -5255,6 +5783,98 @@ snapshots: '@types/web-bluetooth@0.0.21': {} + '@typescript-eslint/eslint-plugin@8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@eslint-community/regexpp': 4.12.4 + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/type-utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + graphemer: 1.4.0 + ignore: 7.0.14 + natural-compare: 1.4.0 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/project-service@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/scope-manager@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + + '@typescript-eslint/tsconfig-utils@8.48.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + + '@typescript-eslint/type-utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/types@8.48.1': {} + + '@typescript-eslint/typescript-estree@8.48.1(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.48.1(typescript@5.9.3) + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/visitor-keys': 8.48.1 + debug: 4.4.3(supports-color@8.1.1) + minimatch: 9.0.9 + semver: 7.8.5 + tinyglobby: 0.2.17 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@typescript-eslint/scope-manager': 8.48.1 + '@typescript-eslint/types': 8.48.1 + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/visitor-keys@8.48.1': + dependencies: + '@typescript-eslint/types': 8.48.1 + eslint-visitor-keys: 4.2.1 + '@ungap/structured-clone@1.4.0': {} '@upsetjs/venn.js@2.0.0': @@ -5272,6 +5892,17 @@ snapshots: vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1) vue: 3.5.44(typescript@5.9.3) + '@vitest/mocker@5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1))': + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + '@vitest/spy': 5.0.5 + estree-walker: 3.0.3 + magic-string: 1.4.5 + optionalDependencies: + vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1) + + '@vitest/spy@5.0.5': {} + '@volar/language-core@2.4.27': dependencies: '@volar/source-map': 2.4.27 @@ -5402,25 +6033,25 @@ snapshots: dependencies: vue: 3.5.44(typescript@5.9.3) - '@x18n/builtins@0.1.14(typescript@5.9.3)': + '@x18n/builtins@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: '@vue/compiler-sfc': 3.5.44 '@x18n/core': 0.1.14(typescript@5.9.3) json5: 2.2.3 jsonc-parser: 3.3.1 oxc-parser: 0.155.0 - svelte: 5.57.3 + svelte: 5.57.3(@typescript-eslint/types@8.48.1) yaml: 2.9.1 transitivePeerDependencies: - '@typescript-eslint/types' - typescript - '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/cli@0.1.14(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(@typescript-eslint/types@8.48.1)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) - '@x18n/node': 0.1.14(typescript@5.9.3) - '@x18n/ui': 0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) + '@x18n/node': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) + '@x18n/ui': 0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3) cac: 7.1.0 devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) nostics: 1.3.0 @@ -5440,9 +6071,9 @@ snapshots: transitivePeerDependencies: - typescript - '@x18n/node@0.1.14(typescript@5.9.3)': + '@x18n/node@0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3)': dependencies: - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) chokidar: 6.0.0 ignore: 7.0.14 @@ -5454,11 +6085,11 @@ snapshots: - '@typescript-eslint/types' - typescript - '@x18n/ui@0.1.14(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': + '@x18n/ui@0.1.14(@typescript-eslint/types@8.48.1)(cac@7.1.0)(crossws@0.4.17(srvx@1.0.8))(srvx@1.0.8)(typescript@5.9.3)': dependencies: '@devframes/agentic': 1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6) '@valibot/to-json-schema': 1.8.0(valibot@1.5.0(typescript@5.9.3)) - '@x18n/builtins': 0.1.14(typescript@5.9.3) + '@x18n/builtins': 0.1.14(@typescript-eslint/types@8.48.1)(typescript@5.9.3) '@x18n/core': 0.1.14(typescript@5.9.3) devframe: 1.2.6(@devframes/agentic@1.2.5(crossws@0.4.17(srvx@1.0.8))(devframe@1.2.6))(cac@7.1.0)(srvx@1.0.8) valibot: 1.5.0(typescript@5.9.3) @@ -5472,6 +6103,10 @@ snapshots: abbrev@2.0.0: {} + acorn-jsx@5.3.2(acorn@8.19.0): + dependencies: + acorn: 8.19.0 + acorn@8.19.0: {} agent-base@6.0.2(supports-color@8.1.1): @@ -5480,6 +6115,13 @@ snapshots: transitivePeerDependencies: - supports-color + ajv@6.15.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + alien-signals@3.2.1: {} align-text@0.1.4: @@ -5530,6 +6172,8 @@ snapshots: vue-types: 3.0.2(vue@3.5.44(typescript@5.9.3)) warning: 4.0.3 + argparse@2.0.1: {} + aria-query@5.3.1: {} arr-diff@4.0.0: {} @@ -5557,6 +6201,8 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + assertion-error@2.0.1: {} + assign-symbols@1.0.0: {} async-function@1.0.0: {} @@ -5664,6 +6310,8 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 + callsites@3.1.0: {} + camelcase@1.2.1: {} ccount@2.0.1: {} @@ -5673,6 +6321,8 @@ snapshots: align-text: 0.1.4 lazy-cache: 1.0.4 + chai@6.3.0: {} + chalk@1.1.3: dependencies: ansi-styles: 2.2.1 @@ -6103,6 +6753,8 @@ snapshots: object-keys: 1.1.1 regexp.prototype.flags: 1.5.4 + deep-is@0.1.4: {} + define-data-property@1.1.4: dependencies: es-define-property: 1.0.1 @@ -6379,6 +7031,8 @@ snapshots: es-errors@1.3.0: {} + es-module-lexer@2.3.2: {} + es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 @@ -6432,13 +7086,96 @@ snapshots: escape-string-regexp@1.0.5: {} + escape-string-regexp@4.0.0: {} + escape-string-regexp@5.0.0: {} + eslint-plugin-vue@10.6.2(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + natural-compare: 1.4.0 + nth-check: 2.1.1 + postcss-selector-parser: 7.2.1 + semver: 7.8.5 + vue-eslint-parser: 10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1) + xml-name-validator: 4.0.0 + optionalDependencies: + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + + eslint-scope@8.4.0: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.4.3: {} + + eslint-visitor-keys@4.2.1: {} + + eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1): + dependencies: + '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1)) + '@eslint-community/regexpp': 4.12.4 + '@eslint/config-array': 0.21.2(supports-color@8.1.1) + '@eslint/config-helpers': 0.4.2 + '@eslint/core': 0.17.0 + '@eslint/eslintrc': 3.3.7(supports-color@8.1.1) + '@eslint/js': 9.39.1 + '@eslint/plugin-kit': 0.4.1 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.7.0 + transitivePeerDependencies: + - supports-color + esm-env@1.2.2: {} - esrap@2.4.0: + espree@10.4.0: + dependencies: + acorn: 8.19.0 + acorn-jsx: 5.3.2(acorn@8.19.0) + eslint-visitor-keys: 4.2.1 + + esquery@1.7.0: + dependencies: + estraverse: 5.3.0 + + esrap@2.4.0(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + optionalDependencies: + '@typescript-eslint/types': 8.48.1 + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} estree-walker@2.0.2: {} @@ -6446,6 +7183,8 @@ snapshots: dependencies: '@types/estree': 1.0.9 + esutils@2.0.3: {} + etag@1.8.1: {} eventemitter3@5.0.4: {} @@ -6468,6 +7207,8 @@ snapshots: transitivePeerDependencies: - supports-color + expect-type@1.4.0: {} + exsolve@1.1.3: {} extend-shallow@2.0.1: @@ -6504,6 +7245,10 @@ snapshots: merge2: 1.4.1 micromatch: 4.0.8 + fast-json-stable-stringify@2.1.0: {} + + fast-levenshtein@2.0.6: {} + fastq@1.20.3: dependencies: reusify: 1.1.0 @@ -6514,6 +7259,10 @@ snapshots: fecha@4.2.3: {} + file-entry-cache@8.0.0: + dependencies: + flat-cache: 4.0.1 + file-saver@2.0.5: {} fill-range@4.0.0: @@ -6527,6 +7276,18 @@ snapshots: dependencies: to-regex-range: 5.0.1 + find-up@5.0.0: + dependencies: + locate-path: 6.0.0 + path-exists: 4.0.0 + + flat-cache@4.0.1: + dependencies: + flatted: 3.6.0 + keyv: 4.5.4 + + flatted@3.6.0: {} + flru@1.0.2: {} fmin@0.0.2: @@ -6627,6 +7388,10 @@ snapshots: dependencies: is-glob: 4.0.3 + glob-parent@6.0.2: + dependencies: + is-glob: 4.0.3 + glob@10.5.0: dependencies: foreground-child: 3.3.1 @@ -6645,6 +7410,8 @@ snapshots: once: 1.4.0 path-is-absolute: 1.0.1 + globals@14.0.0: {} + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -6658,6 +7425,8 @@ snapshots: graceful-fs@4.2.11: {} + graphemer@1.4.0: {} + graphlib@2.1.8: dependencies: lodash: 4.18.1 @@ -6782,14 +7551,23 @@ snapshots: dependencies: safer-buffer: 2.1.2 + ignore@5.3.2: {} + ignore@7.0.14: {} image-size@0.5.5: {} immutable@5.1.9: {} + import-fresh@3.3.1: + dependencies: + parent-module: 1.0.1 + resolve-from: 4.0.0 + import-meta-resolve@4.2.0: {} + imurmurhash@0.1.4: {} + inflight@1.0.6: dependencies: once: 1.4.0 @@ -7019,8 +7797,18 @@ snapshots: js-tokens@9.0.1: {} + js-yaml@4.3.2: + dependencies: + argparse: 2.0.1 + jsencrypt@3.5.4: {} + json-buffer@3.0.1: {} + + json-schema-traverse@0.4.1: {} + + json-stable-stringify-without-jsonify@1.0.1: {} + json2module@0.0.3: dependencies: rw: 1.3.3 @@ -7047,6 +7835,10 @@ snapshots: dependencies: commander: 15.0.0 + keyv@4.5.4: + dependencies: + json-buffer: 3.0.1 + khroma@2.1.0: {} kind-of@3.2.2: @@ -7082,6 +7874,11 @@ snapshots: transitivePeerDependencies: - supports-color + levn@0.4.1: + dependencies: + prelude-ls: 1.2.1 + type-check: 0.4.0 + lightningcss-android-arm64@1.33.0: optional: true @@ -7162,6 +7959,10 @@ snapshots: locate-character@3.0.0: {} + locate-path@6.0.0: + dependencies: + p-locate: 5.0.0 + lodash-es@4.18.1: {} lodash-unified@1.0.3(@types/lodash-es@4.17.12)(lodash-es@4.18.1)(lodash@4.18.1): @@ -7174,8 +7975,7 @@ snapshots: lodash.isequal@4.5.0: {} - lodash.merge@4.6.2: - optional: true + lodash.merge@4.6.2: {} lodash@4.18.1: {} @@ -7197,6 +7997,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + magic-string@1.4.5: + dependencies: + '@jridgewell/sourcemap-codec': 1.6.0 + make-dir@5.1.0: optional: true @@ -7433,6 +8237,8 @@ snapshots: nanopop@2.4.2: {} + natural-compare@1.4.0: {} + needle@2.9.1(supports-color@8.1.1): dependencies: debug: 3.2.7(supports-color@8.1.1) @@ -7505,6 +8311,8 @@ snapshots: dependencies: isobject: 3.0.1 + obug@3.0.0: {} + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -7517,6 +8325,15 @@ snapshots: regex: 6.1.0 regex-recursion: 6.0.2 + optionator@0.9.4: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.4.1 + prelude-ls: 1.2.1 + type-check: 0.4.0 + word-wrap: 1.2.5 + own-keys@1.0.2: dependencies: call-bound: 1.0.4 @@ -7548,12 +8365,24 @@ snapshots: '@oxc-parser/binding-win32-ia32-msvc': 0.155.0 '@oxc-parser/binding-win32-x64-msvc': 0.155.0 + p-limit@3.1.0: + dependencies: + yocto-queue: 0.1.0 + + p-locate@5.0.0: + dependencies: + p-limit: 3.1.0 + package-json-from-dist@1.0.1: {} package-manager-detector@1.9.0: {} parchment@3.0.0: {} + parent-module@1.0.1: + dependencies: + callsites: 3.1.0 + parse-node-version@1.0.1: {} pascalcase@0.1.1: {} @@ -7562,6 +8391,8 @@ snapshots: path-data-parser@0.1.0: {} + path-exists@4.0.0: {} + path-is-absolute@1.0.1: {} path-key@3.1.1: {} @@ -7623,6 +8454,10 @@ snapshots: dependencies: postcss: 5.2.18 + postcss-selector-parser@7.2.1: + dependencies: + util-deprecate: 1.0.2 + postcss@5.2.18: dependencies: chalk: 1.1.3 @@ -7659,6 +8494,8 @@ snapshots: posthtml-parser: 0.2.1 posthtml-render: 1.4.0 + prelude-ls@1.2.1: {} + prettier@3.9.10: {} probe-image-size@7.4.0(supports-color@8.1.1): @@ -7681,6 +8518,8 @@ snapshots: punycode.js@2.3.1: {} + punycode@2.3.1: {} + quansync@0.2.11: {} query-string@4.3.4: @@ -7752,6 +8591,8 @@ snapshots: resize-observer-polyfill@1.5.1: {} + resolve-from@4.0.0: {} + resolve-url@0.2.1: {} resolve@1.22.13: @@ -8139,6 +8980,8 @@ snapshots: define-property: 0.2.5 object-copy: 0.1.0 + std-env@4.3.0: {} + stop-iteration-iterator@1.1.0: dependencies: es-errors: 1.3.0 @@ -8230,6 +9073,8 @@ snapshots: dependencies: ansi-regex: 6.4.0 + strip-json-comments@3.1.1: {} + strip-literal@2.1.1: dependencies: js-tokens: 9.0.1 @@ -8256,7 +9101,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.57.3: + svelte@5.57.3(@typescript-eslint/types@8.48.1): dependencies: '@jridgewell/remapping': 2.3.5 '@jridgewell/sourcemap-codec': 1.6.0 @@ -8268,7 +9113,7 @@ snapshots: clsx: 2.1.1 devalue: 5.9.4 esm-env: 1.2.2 - esrap: 2.4.0 + esrap: 2.4.0(@typescript-eslint/types@8.48.1) is-reference: 3.0.3 locate-character: 3.0.0 magic-string: 0.30.21 @@ -8333,6 +9178,8 @@ snapshots: tiny-emitter@2.1.0: {} + tinybench@6.2.5: {} + tinycolor2@1.6.0: {} tinyexec@1.3.1: {} @@ -8372,6 +9219,10 @@ snapshots: trim-lines@3.0.1: {} + ts-api-utils@2.5.0(typescript@5.9.3): + dependencies: + typescript: 5.9.3 + ts-dedent@2.3.0: {} tslib@1.14.1: {} @@ -8380,6 +9231,10 @@ snapshots: tslib@2.8.1: {} + type-check@0.4.0: + dependencies: + prelude-ls: 1.2.1 + typed-array-buffer@1.0.3: dependencies: call-bound: 1.0.4 @@ -8423,6 +9278,17 @@ snapshots: typed-array-buffer: 1.0.3 typed-array-byte-offset: 1.0.5 + typescript-eslint@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.48.1(@typescript-eslint/parser@8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3))(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/parser': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/typescript-estree': 8.48.1(supports-color@8.1.1)(typescript@5.9.3) + '@typescript-eslint/utils': 8.48.1(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1)(typescript@5.9.3) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + typescript@5.9.3: {} uc.micro@3.0.0: {} @@ -8532,6 +9398,10 @@ snapshots: has-value: 0.3.1 isobject: 3.0.1 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + urix@0.1.0: {} use@3.1.1: {} @@ -8602,12 +9472,45 @@ snapshots: sass-embedded: 1.105.2 yaml: 2.9.1 + vitest@5.0.5(@types/node@26.6.5)(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1)): + dependencies: + '@types/chai': 5.2.3 + '@vitest/mocker': 5.0.5(vite@8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1)) + chai: 6.3.0 + es-module-lexer: 2.3.2 + expect-type: 1.4.0 + magic-string: 1.4.5 + obug: 3.0.0 + picomatch: 4.0.7 + std-env: 4.3.0 + tinybench: 6.2.5 + tinyexec: 1.3.1 + tinyglobby: 0.2.17 + vite: 8.3.4(@types/node@26.6.5)(esbuild@0.28.2)(jiti@2.7.0)(less@4.9.1(supports-color@8.1.1))(sass-embedded@1.105.2)(sass@1.105.2)(yaml@2.9.1) + why-is-node-running: 3.2.1 + optionalDependencies: + '@types/node': 26.6.5 + transitivePeerDependencies: + - msw + vscode-uri@3.2.0: {} vue-component-type-helpers@3.3.13: {} vue-cropper@1.1.4: {} + vue-eslint-parser@10.2.0(eslint@9.39.1(jiti@2.7.0)(supports-color@8.1.1))(supports-color@8.1.1): + dependencies: + debug: 4.4.3(supports-color@8.1.1) + eslint: 9.39.1(jiti@2.7.0)(supports-color@8.1.1) + eslint-scope: 8.4.0 + eslint-visitor-keys: 4.2.1 + espree: 10.4.0 + esquery: 1.7.0 + semver: 7.8.5 + transitivePeerDependencies: + - supports-color + vue-router@4.6.4(vue@3.5.44(typescript@5.9.3)): dependencies: '@vue/devtools-api': 6.6.4 @@ -8690,8 +9593,12 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@3.2.1: {} + window-size@0.1.0: {} + word-wrap@1.2.5: {} + wordwrap@0.0.2: {} wrap-ansi@7.0.0: @@ -8708,6 +9615,8 @@ snapshots: wrappy@1.0.2: {} + xml-name-validator@4.0.0: {} + yaml@2.9.1: {} yargs@3.10.0: @@ -8717,6 +9626,8 @@ snapshots: decamelize: 1.2.0 window-size: 0.1.0 + yocto-queue@0.1.0: {} + zimmerframe@1.1.5: {} zod@4.6.7: {} diff --git a/ruoyi-fastapi-frontend/vue3/web/src/utils/generator/html.ts b/ruoyi-fastapi-frontend/vue3/web/src/utils/generator/html.ts index 7f4d1ad27..c567523d3 100644 --- a/ruoyi-fastapi-frontend/vue3/web/src/utils/generator/html.ts +++ b/ruoyi-fastapi-frontend/vue3/web/src/utils/generator/html.ts @@ -4,7 +4,6 @@ import type { GenerationType, Layout, } from '@/types/utils/generator/types' -/* eslint-disable max-len */ import { translateMessage } from '../../i18n/message.ts' import { trigger } from './config' diff --git a/ruoyi-fastapi-frontend/vue3/web/src/utils/request.ts b/ruoyi-fastapi-frontend/vue3/web/src/utils/request.ts index c0520f74e..8e0ab3564 100644 --- a/ruoyi-fastapi-frontend/vue3/web/src/utils/request.ts +++ b/ruoyi-fastapi-frontend/vue3/web/src/utils/request.ts @@ -123,7 +123,7 @@ service.interceptors.request.use( return config }, (error: unknown) => { - console.log(error) + console.error(error) return Promise.reject(error) } ) @@ -206,7 +206,7 @@ service.interceptors.response.use( resetTransportRequestConfig(config) return service.request(config) } - console.log('err' + error) + console.error(error) const response = axiosError?.response const responseStatus = response?.status const responseCode = response?.data?.code diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.js deleted file mode 100644 index 30d40ee20..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.js +++ /dev/null @@ -1,45 +0,0 @@ -import assert from 'node:assert/strict' -import { checkAuthCenterAccess } from '../../src/utils/authCenterAccess.ts' - -const route = { - path: '/auth-center/login', - meta: { requiresAuthCenter: true }, - query: { interaction: 'private-interaction' }, - hash: '#csrf=private-csrf', -} -let enabled = true -let calls = 0 -const loadStatus = async () => { - calls++ - return { data: { enabled } } -} -assert.equal(await checkAuthCenterAccess(route, loadStatus), undefined) -enabled = false -assert.deepEqual(await checkAuthCenterAccess(route, loadStatus), { - path: '/auth-center/error', - query: { reason: 'disabled' }, - replace: true, -}) -enabled = true -assert.equal(await checkAuthCenterAccess(route, loadStatus), undefined) -assert.equal(calls, 3, '每次进入都检查开关,不沿用上次结果') - -for (const path of ['/auth-center/error', '/login', '/system/user']) { - assert.equal(await checkAuthCenterAccess({ path, meta: {} }, loadStatus), undefined) -} -assert.equal(calls, 3, '错误说明页与普通页面不请求认证状态') - -const unavailable = { - path: '/auth-center/error', - query: { reason: 'unavailable' }, - replace: true, -} -for (const response of [{}, { data: {} }, { data: { enabled: 'false' } }, null]) { - assert.deepEqual(await checkAuthCenterAccess(route, async () => response), unavailable) -} -assert.deepEqual( - await checkAuthCenterAccess(route, async () => { - throw new Error('network unavailable') - }), - unavailable -) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.ts new file mode 100644 index 000000000..83026f594 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/availability.test.ts @@ -0,0 +1,49 @@ +import { expect, test } from 'vitest' +import { checkAuthCenterAccess } from '../../src/utils/authCenterAccess.ts' + +test('checks authentication center availability on each protected navigation', async () => { + const route = { + path: '/auth-center/login', + meta: { requiresAuthCenter: true }, + query: { interaction: 'private-interaction' }, + hash: '#csrf=private-csrf', + } + let enabled = true + let calls = 0 + const loadStatus = async () => { + calls++ + return { data: { enabled } } + } + expect(await checkAuthCenterAccess(route, loadStatus)).toBe(undefined) + enabled = false + expect(await checkAuthCenterAccess(route, loadStatus)).toStrictEqual({ + path: '/auth-center/error', + query: { reason: 'disabled' }, + replace: true, + }) + enabled = true + expect(await checkAuthCenterAccess(route, loadStatus)).toBe(undefined) + expect(calls, '每次进入都检查开关,不沿用上次结果').toBe(3) + + for (const path of ['/auth-center/error', '/login', '/system/user']) { + const publicRoute = { path, meta: {} } + expect(await checkAuthCenterAccess(publicRoute, loadStatus)).toBe(undefined) + } + expect(calls, '错误说明页与普通页面不请求认证状态').toBe(3) + + const unavailable = { + path: '/auth-center/error', + query: { reason: 'unavailable' }, + replace: true, + } + for (const response of [{}, { data: {} }, { data: { enabled: 'false' } }, null]) { + expect( + await Reflect.apply(checkAuthCenterAccess, undefined, [route, async () => response]) + ).toStrictEqual(unavailable) + } + expect( + await checkAuthCenterAccess(route, async () => { + throw new Error('network unavailable') + }) + ).toStrictEqual(unavailable) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.js deleted file mode 100644 index 34858aebe..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.js +++ /dev/null @@ -1,51 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { stripTypeScriptTypes } from 'node:module' -import { compileFunction } from 'node:vm' -import { compileScript, parse } from 'vue/compiler-sfc' -import { splitRegisteredUris } from '../../src/utils/oauthUri.ts' - -// 执行真实组件的表单转换,覆盖从后台详情重新打开后切换授权方式的场景。 -const source = readFileSync( - new URL('../../src/views/system/oauth/client/index.vue', import.meta.url), - 'utf8' -) -const { descriptor } = parse(source) -const { scriptSetupAst } = compileScript(descriptor, { id: 'client-form-regression' }) -const functions = scriptSetupAst - .filter( - (node) => - node.type === 'FunctionDeclaration' && - ['emptyForm', 'toEditor', 'payload'].includes(node.id.name) - ) - .map((node) => descriptor.scriptSetup.content.slice(node.start, node.end)) - .join('\n') -const { form, toEditor, payload } = compileFunction( - `${stripTypeScriptTypes(functions)}\nconst form = emptyForm(); return { form, toEditor, payload };`, - ['splitRegisteredUris'] -)(splitRegisteredUris) - -Object.assign( - form, - toEditor({ - clientId: 'machine-client', - clientName: '服务应用', - clientType: 'confidential', - tokenEndpointAuthMethod: 'client_secret_basic', - grantTypes: ['client_credentials'], - responseTypes: [], - scopeCodes: ['openid'], - }) -) -form.grantTypes.push('authorization_code') -form.redirectUris = ['https://app.example/callback'] -const withLogin = payload() -assert.deepEqual(withLogin.responseTypes, ['code']) -assert.deepEqual(withLogin.grantTypes, ['client_credentials', 'authorization_code']) -assert.deepEqual(withLogin.redirectUris, ['https://app.example/callback']) - -Object.assign(form, toEditor(withLogin)) -form.grantTypes = ['client_credentials'] -assert.deepEqual(payload().responseTypes, []) -form.grantTypes = ['authorization_code', 'refresh_token'] -assert.deepEqual(payload().responseTypes, ['code']) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.ts new file mode 100644 index 000000000..5a3c2b1d5 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/clientForm.test.ts @@ -0,0 +1,52 @@ +import { expect, test } from 'vitest' +import { readFileSync } from 'node:fs' +import { stripTypeScriptTypes } from 'node:module' +import { compileFunction } from 'node:vm' +import { componentSetup } from '../fixtures/componentSetup' +import { splitRegisteredUris } from '../../src/utils/oauthUri.ts' + +test('preserves redirect URIs and response types across OAuth grant changes', () => { + // 执行真实组件的表单转换,覆盖从后台详情重新打开后切换授权方式的场景。 + const source = readFileSync( + new URL('../../src/views/system/oauth/client/index.vue', import.meta.url), + 'utf8' + ) + const { statements, sourceOf } = componentSetup(source, 'client-form-regression') + const functions = statements + .filter( + (node) => + node.type === 'FunctionDeclaration' && + ['emptyForm', 'toEditor', 'payload'].includes(node.id?.name ?? '') + ) + .map(sourceOf) + .join('\n') + const { form, toEditor, payload } = compileFunction( + `${stripTypeScriptTypes(functions)}\nconst form = emptyForm(); return { form, toEditor, payload };`, + ['splitRegisteredUris'] + )(splitRegisteredUris) + + Object.assign( + form, + toEditor({ + clientId: 'machine-client', + clientName: '服务应用', + clientType: 'confidential', + tokenEndpointAuthMethod: 'client_secret_basic', + grantTypes: ['client_credentials'], + responseTypes: [], + scopeCodes: ['openid'], + }) + ) + form.grantTypes.push('authorization_code') + form.redirectUris = ['https://app.example/callback'] + const withLogin = payload() + expect(withLogin.responseTypes).toStrictEqual(['code']) + expect(withLogin.grantTypes).toStrictEqual(['client_credentials', 'authorization_code']) + expect(withLogin.redirectUris).toStrictEqual(['https://app.example/callback']) + + Object.assign(form, toEditor(withLogin)) + form.grantTypes = ['client_credentials'] + expect(payload().responseTypes).toStrictEqual([]) + form.grantTypes = ['authorization_code', 'refresh_token'] + expect(payload().responseTypes).toStrictEqual(['code']) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.js deleted file mode 100644 index d6c41f1d9..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.js +++ /dev/null @@ -1,28 +0,0 @@ -import assert from 'node:assert/strict' - -import { - interactionRouteLocation, - readInteractionCsrf, - trustedCompletionUrl, -} from '../../src/views/auth-center/interactionSecurity.ts' - -assert.equal(readInteractionCsrf('#csrf=token%2Bvalue&ignored=1'), 'token+value') -assert.equal(readInteractionCsrf('#ignored=1'), '') -assert.equal(readInteractionCsrf(null), '') -assert.equal( - interactionRouteLocation('/auth-center/login', 'id/with space'), - '/auth-center/login?interaction=id%2Fwith%20space' -) - -const origin = 'https://auth.example.com' -const interactionId = 'interaction-1' -assert.equal( - trustedCompletionUrl('/auth/interaction/interaction-1/complete', origin, interactionId)?.origin, - origin -) -assert.equal(trustedCompletionUrl('https://evil.example/complete', origin, interactionId), null) -assert.equal(trustedCompletionUrl('/auth/interaction/other/complete', origin, interactionId), null) -assert.equal( - trustedCompletionUrl('/auth/interaction/interaction-1/complete.evil', origin, interactionId), - null -) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.ts new file mode 100644 index 000000000..5dc477ad2 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/interactionSecurity.test.ts @@ -0,0 +1,27 @@ +import { expect, test } from 'vitest' + +import { + interactionRouteLocation, + readInteractionCsrf, + trustedCompletionUrl, +} from '../../src/views/auth-center/interactionSecurity.ts' + +test('validates the completion URL and preserves CSRF state during navigation', () => { + expect(readInteractionCsrf('#csrf=token%2Bvalue&ignored=1')).toBe('token+value') + expect(readInteractionCsrf('#ignored=1')).toBe('') + expect(readInteractionCsrf(null)).toBe('') + expect(interactionRouteLocation('/auth-center/login', 'id/with space')).toBe( + '/auth-center/login?interaction=id%2Fwith%20space' + ) + + const origin = 'https://auth.example.com' + const interactionId = 'interaction-1' + expect( + trustedCompletionUrl('/auth/interaction/interaction-1/complete', origin, interactionId)?.origin + ).toBe(origin) + expect(trustedCompletionUrl('https://evil.example/complete', origin, interactionId)).toBe(null) + expect(trustedCompletionUrl('/auth/interaction/other/complete', origin, interactionId)).toBe(null) + expect( + trustedCompletionUrl('/auth/interaction/interaction-1/complete.evil', origin, interactionId) + ).toBe(null) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.js deleted file mode 100644 index 313731037..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.js +++ /dev/null @@ -1,46 +0,0 @@ -import assert from 'node:assert/strict' - -import { - splitRegisteredUris, - validateRegisteredUri, - validateRegisteredUriList, -} from '../../src/utils/oauthUri.ts' - -assert.deepEqual(splitRegisteredUris('https://one.example/cb,\nhttps://two.example/cb'), [ - 'https://one.example/cb', - 'https://two.example/cb', -]) -assert.equal( - validateRegisteredUri('https://portal.example/callback?tenant=one', 'redirect'), - 'https://portal.example/callback?tenant=one' -) -assert.equal( - validateRegisteredUri('http://localhost:8080/callback', 'redirect'), - 'http://localhost:8080/callback' -) -assert.equal( - validateRegisteredUri('https://portal.example', 'cors_origin'), - 'https://portal.example' -) -assert.equal( - validateRegisteredUri('https://portal.example:443', 'cors_origin'), - 'https://portal.example:443' -) -assert.throws(() => validateRegisteredUri('http://portal.example/callback', 'redirect'), /本地开发/) -assert.throws( - () => validateRegisteredUri('https://user@portal.example/callback', 'redirect'), - /用户信息/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/callback#fragment', 'redirect'), - /Fragment/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/logout?token=1', 'backchannel_logout'), - /查询参数/ -) -assert.throws( - () => validateRegisteredUri('https://portal.example/', 'cors_origin'), - /协议、主机和端口/ -) -assert.throws(() => validateRegisteredUriList('', 'redirect', true), /至少填写/) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.ts new file mode 100644 index 000000000..044d31145 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/oauthUri.test.ts @@ -0,0 +1,42 @@ +import { expect, test } from 'vitest' + +import { + splitRegisteredUris, + validateRegisteredUri, + validateRegisteredUriList, +} from '../../src/utils/oauthUri.ts' + +test('validates and splits registered OAuth redirect URIs', () => { + expect(splitRegisteredUris('https://one.example/cb,\nhttps://two.example/cb')).toStrictEqual([ + 'https://one.example/cb', + 'https://two.example/cb', + ]) + expect(validateRegisteredUri('https://portal.example/callback?tenant=one', 'redirect')).toBe( + 'https://portal.example/callback?tenant=one' + ) + expect(validateRegisteredUri('http://localhost:8080/callback', 'redirect')).toBe( + 'http://localhost:8080/callback' + ) + expect(validateRegisteredUri('https://portal.example', 'cors_origin')).toBe( + 'https://portal.example' + ) + expect(validateRegisteredUri('https://portal.example:443', 'cors_origin')).toBe( + 'https://portal.example:443' + ) + expect(() => validateRegisteredUri('http://portal.example/callback', 'redirect')).toThrow( + /本地开发/ + ) + expect(() => validateRegisteredUri('https://user@portal.example/callback', 'redirect')).toThrow( + /用户信息/ + ) + expect(() => + validateRegisteredUri('https://portal.example/callback#fragment', 'redirect') + ).toThrow(/Fragment/) + expect(() => + validateRegisteredUri('https://portal.example/logout?token=1', 'backchannel_logout') + ).toThrow(/查询参数/) + expect(() => validateRegisteredUri('https://portal.example/', 'cors_origin')).toThrow( + /协议、主机和端口/ + ) + expect(() => validateRegisteredUriList('', 'redirect', true)).toThrow(/至少填写/) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.js deleted file mode 100644 index 99259c758..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.js +++ /dev/null @@ -1,118 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { stripTypeScriptTypes } from 'node:module' -import { setImmediate } from 'node:timers/promises' -import { compileFunction } from 'node:vm' -import { reactive, ref } from 'vue' -import { compileScript, parse } from 'vue/compiler-sfc' - -function loadView(view, bindings, exports, functionsOnly = false) { - const source = readFileSync(new URL(`../../src/views/${view}.vue`, import.meta.url), 'utf8') - const { descriptor } = parse(source) - const { scriptSetupAst } = compileScript(descriptor, { id: view }) - const body = scriptSetupAst - .filter((node) => - functionsOnly - ? node.type === 'FunctionDeclaration' && exports.includes(node.id.name) - : node.type !== 'ImportDeclaration' - ) - .map((node) => descriptor.scriptSetup.content.slice(node.start, node.end)) - .join('\n') - return compileFunction( - `${stripTypeScriptTypes(body)}\nreturn { ${exports.join(', ')} }`, - Object.keys(bindings) - )(...Object.values(bindings)) -} - -// Role IDs coming from the router must reach both lists and every mutation without rounding. -{ - const roleId = '9007199254740993' - const calls = {} - const api = (name) => async (params) => { - calls[name] = params.roleId - return { rows: [], total: 0 } - } - const bindings = { - ref, - reactive, - useDict: () => ({}), - modal: { confirm: async () => {}, msgSuccess() {} }, - t: (key) => key, - } - const page = loadView( - 'system/role/authUser', - { - ...bindings, - useRoute: () => ({ params: { roleId } }), - allocatedUserList: api('allocated'), - authUserCancel: api('cancel'), - authUserCancelAll: api('cancelAll'), - }, - ['queryParams', 'handleSelectionChange', 'cancelAuthUser', 'cancelAuthUserAll'] - ) - const dialog = loadView( - 'system/role/selectUser', - { - ...bindings, - defineProps: () => ({ roleId: page.queryParams.roleId }), - defineExpose() {}, - defineEmits: () => () => {}, - unallocatedUserList: api('unallocated'), - authUserSelectAll: api('grant'), - }, - ['show', 'handleSelectionChange', 'handleSelectUser'] - ) - const user = { userId: 7 } - dialog.show() - dialog.handleSelectionChange([user]) - dialog.handleSelectUser() - page.cancelAuthUser(user) - page.handleSelectionChange([user]) - page.cancelAuthUserAll() - await setImmediate() - assert.deepEqual(calls, { - allocated: roleId, - unallocated: roleId, - grant: roleId, - cancel: roleId, - cancelAll: roleId, - }) -} - -// Switching accounts with an unencryptable password still logs in and clears prior credentials. -{ - const cookies = new Map([ - ['username', 'old-user'], - ['password', 'old-ciphertext'], - ['rememberMe', 'true'], - ]) - const loginForm = ref({ username: 'new-user', password: 'new-password', rememberMe: true }) - let submittedUser - const { handleLogin } = loadView( - 'login', - { - loginRef: ref({ validate: (callback) => callback(true) }), - loading: ref(false), - loginForm, - Cookies: { - set: (key, value) => cookies.set(key, value), - remove: (key) => cookies.delete(key), - }, - encrypt: () => false, - userStore: { - async login(form) { - submittedUser = form.username - }, - }, - route: { query: {} }, - redirect: ref(''), - router: { push() {} }, - }, - ['handleLogin'], - true - ) - handleLogin() - assert.equal(submittedUser, 'new-user') - assert.equal(loginForm.value.rememberMe, false) - assert.equal(cookies.size, 0) -} diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.ts new file mode 100644 index 000000000..45d1d1abe --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/roleAndLogin.test.ts @@ -0,0 +1,124 @@ +import { expect, test } from 'vitest' +import { readFileSync } from 'node:fs' +import { stripTypeScriptTypes } from 'node:module' +import { setImmediate } from 'node:timers/promises' +import { compileFunction } from 'node:vm' +import { reactive, ref } from 'vue' +import { componentSetup } from '../fixtures/componentSetup' + +test('preserves role identifiers and login state in the authorization views', async () => { + function loadView( + view: string, + bindings: Record, + exports: string[], + functionsOnly = false + ) { + const source = readFileSync(new URL(`../../src/views/${view}.vue`, import.meta.url), 'utf8') + const { statements, sourceOf } = componentSetup(source, view) + const body = statements + .filter((node) => + functionsOnly + ? node.type === 'FunctionDeclaration' && exports.includes(node.id?.name ?? '') + : node.type !== 'ImportDeclaration' + ) + .map(sourceOf) + .join('\n') + return compileFunction( + `${stripTypeScriptTypes(body)}\nreturn { ${exports.join(', ')} }`, + Object.keys(bindings) + )(...Object.values(bindings)) + } + + // Role IDs coming from the router must reach both lists and every mutation without rounding. + { + const roleId = '9007199254740993' + const calls: Record = {} + const api = (name: string) => async (params: { roleId: string }) => { + calls[name] = params.roleId + return { rows: [], total: 0 } + } + const bindings = { + ref, + reactive, + useDict: () => ({}), + modal: { confirm: async () => {}, msgSuccess() {} }, + t: (key: string) => key, + } + const page = loadView( + 'system/role/authUser', + { + ...bindings, + useRoute: () => ({ params: { roleId } }), + allocatedUserList: api('allocated'), + authUserCancel: api('cancel'), + authUserCancelAll: api('cancelAll'), + }, + ['queryParams', 'handleSelectionChange', 'cancelAuthUser', 'cancelAuthUserAll'] + ) + const dialog = loadView( + 'system/role/selectUser', + { + ...bindings, + defineProps: () => ({ roleId: page.queryParams.roleId }), + defineExpose() {}, + defineEmits: () => () => {}, + unallocatedUserList: api('unallocated'), + authUserSelectAll: api('grant'), + }, + ['show', 'handleSelectionChange', 'handleSelectUser'] + ) + const user = { userId: 7 } + dialog.show() + dialog.handleSelectionChange([user]) + dialog.handleSelectUser() + page.cancelAuthUser(user) + page.handleSelectionChange([user]) + page.cancelAuthUserAll() + await setImmediate() + expect(calls).toStrictEqual({ + allocated: roleId, + unallocated: roleId, + grant: roleId, + cancel: roleId, + cancelAll: roleId, + }) + } + + // Switching accounts with an unencryptable password still logs in and clears prior credentials. + { + const cookies = new Map([ + ['username', 'old-user'], + ['password', 'old-ciphertext'], + ['rememberMe', 'true'], + ]) + const loginForm = ref({ username: 'new-user', password: 'new-password', rememberMe: true }) + let submittedUser + const { handleLogin } = loadView( + 'login', + { + loginRef: ref({ validate: (callback: (valid: boolean) => void) => callback(true) }), + loading: ref(false), + loginForm, + Cookies: { + set: (key: string, value: string) => cookies.set(key, value), + remove: (key: string) => cookies.delete(key), + }, + encrypt: () => false, + userStore: { + async login(form: { username: string }) { + submittedUser = form.username + }, + }, + route: { query: {} }, + redirect: ref(''), + router: { push() {} }, + }, + ['handleLogin'], + true + ) + handleLogin() + expect(submittedUser).toBe('new-user') + expect(loginForm.value.rememberMe).toBe(false) + expect(cookies.size).toBe(0) + } +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.js deleted file mode 100644 index 48efe5388..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.js +++ /dev/null @@ -1,74 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { compileFunction } from 'node:vm' -import { computed, reactive } from 'vue' -import { transform } from 'esbuild' -import { babelParse } from 'vue/compiler-sfc' -import * as interactionSecurity from '../../src/views/auth-center/interactionSecurity.ts' - -// 只隔离请求和浏览器资源,执行真实交互上下文;Vue 的响应式计算保持不变。 -const { code: source } = await transform( - readFileSync(new URL('../../src/views/auth-center/useInteraction.ts', import.meta.url), 'utf8'), - { loader: 'ts' } -) -const code = babelParse(source, { sourceType: 'module' }) - .program.body.filter((node) => node.type !== 'ImportDeclaration') - .map((node) => { - const declaration = node.type === 'ExportNamedDeclaration' ? node.declaration : node - return source.slice(declaration.start, declaration.end) - }) - .join('\n') - -function createContext(completeInteraction) { - const storage = new Map() - const navigations = [] - const redirects = [] - const route = reactive({ path: '/auth-center/consent', query: { interaction: 'pending-1' } }) - const bindings = { - ...interactionSecurity, - t: (key) => key, - completeInteraction, - computed, - useRoute: () => route, - useRouter: () => ({ replace: async (location) => navigations.push(location) }), - sessionStorage: { - getItem: (key) => storage.get(key), - setItem: (key, value) => storage.set(key, value), - removeItem: (key) => storage.delete(key), - }, - window: { - location: { - hash: '#csrf=csrf-1', - origin: 'https://issuer.example', - assign: (url) => redirects.push(url), - }, - history: { state: {}, replaceState() {} }, - }, - } - const context = compileFunction( - `${code}\nreturn useInteractionContext();`, - Object.keys(bindings) - )(...Object.values(bindings)) - return { context, navigations, redirects } -} - -const completed = [] -const { context, navigations, redirects } = createContext(async (...args) => { - completed.push(args) - return { data: { redirectUrl: 'https://app.example/callback?code=opaque' } } -}) -await context.goToAction('login') -assert.deepEqual(navigations, [{ path: '/auth-center/login', query: { interaction: 'pending-1' } }]) -await assert.rejects(context.followServerRedirect('/auth/interaction/another/complete')) -assert.equal(completed.length, 0) -await context.goToAction('redirect') -assert.deepEqual(completed, [['pending-1', 'csrf-1']]) -assert.deepEqual(redirects, ['https://app.example/callback?code=opaque']) -assert.equal(context.csrfToken(), '') - -const failed = createContext(async () => { - throw new Error('completion unavailable') -}) -await assert.rejects(failed.context.goToAction('redirect'), /completion unavailable/) -assert.equal(failed.context.csrfToken(), 'csrf-1') -assert.deepEqual(failed.redirects, []) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.ts new file mode 100644 index 000000000..70a3ba012 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/auth-center/useInteraction.test.ts @@ -0,0 +1,83 @@ +import { nodeSource } from '../fixtures/componentSetup' +import { expect, test } from 'vitest' +import { readFileSync } from 'node:fs' +import { compileFunction } from 'node:vm' +import { computed, reactive } from 'vue' +import { transform } from 'esbuild' +import { babelParse } from 'vue/compiler-sfc' +import * as interactionSecurity from '../../src/views/auth-center/interactionSecurity.ts' + +test('loads the OAuth interaction and propagates submission state', async () => { + // 只隔离请求和浏览器资源,执行真实交互上下文;Vue 的响应式计算保持不变。 + const { code: source } = await transform( + readFileSync(new URL('../../src/views/auth-center/useInteraction.ts', import.meta.url), 'utf8'), + { loader: 'ts' } + ) + const code = babelParse(source, { sourceType: 'module' }) + .program.body.filter((node) => node.type !== 'ImportDeclaration') + .map((node) => { + const declaration = node.type === 'ExportNamedDeclaration' ? node.declaration : node + return nodeSource(source, declaration) + }) + .join('\n') + + function createContext( + completeInteraction: (interaction: string, csrf: string) => Promise + ) { + const storage = new Map() + const navigations: { path: string; query: Record }[] = [] + const redirects: string[] = [] + const route = reactive({ path: '/auth-center/consent', query: { interaction: 'pending-1' } }) + const bindings = { + ...interactionSecurity, + t: (key: string) => key, + completeInteraction, + computed, + useRoute: () => route, + useRouter: () => ({ + replace: async (location: (typeof navigations)[number]) => navigations.push(location), + }), + sessionStorage: { + getItem: (key: string) => storage.get(key), + setItem: (key: string, value: string) => storage.set(key, value), + removeItem: (key: string) => storage.delete(key), + }, + window: { + location: { + hash: '#csrf=csrf-1', + origin: 'https://issuer.example', + assign: (url: string) => redirects.push(url), + }, + history: { state: {}, replaceState() {} }, + }, + } + const context = compileFunction( + `${code}\nreturn useInteractionContext();`, + Object.keys(bindings) + )(...Object.values(bindings)) + return { context, navigations, redirects } + } + + const completed: [string, string][] = [] + const { context, navigations, redirects } = createContext(async (...args) => { + completed.push(args) + return { data: { redirectUrl: 'https://app.example/callback?code=opaque' } } + }) + await context.goToAction('login') + expect(navigations).toStrictEqual([ + { path: '/auth-center/login', query: { interaction: 'pending-1' } }, + ]) + await expect(context.followServerRedirect('/auth/interaction/another/complete')).rejects.toThrow() + expect(completed.length).toBe(0) + await context.goToAction('redirect') + expect(completed).toStrictEqual([['pending-1', 'csrf-1']]) + expect(redirects).toStrictEqual(['https://app.example/callback?code=opaque']) + expect(context.csrfToken()).toBe('') + + const failed = createContext(async () => { + throw new Error('completion unavailable') + }) + await expect(failed.context.goToAction('redirect')).rejects.toThrow(/completion unavailable/) + expect(failed.context.csrfToken()).toBe('csrf-1') + expect(failed.redirects).toStrictEqual([]) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/fixtures/componentSetup.ts b/ruoyi-fastapi-frontend/vue3/web/tests/fixtures/componentSetup.ts new file mode 100644 index 000000000..e7c89236c --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/fixtures/componentSetup.ts @@ -0,0 +1,20 @@ +import { compileScript, parse } from '@vue/compiler-sfc' + +export function nodeSource( + source: string, + node?: { start?: number | null; end?: number | null } | null +) { + if (node?.start == null || node.end == null) throw new Error('Missing source range') + return source.slice(node.start, node.end) +} + +export function componentSetup(source: string, id: string) { + const { descriptor } = parse(source) + const script = descriptor.scriptSetup + const { scriptSetupAst } = compileScript(descriptor, { id }) + if (!script || !scriptSetupAst) throw new Error(`Missing script setup in ${id}`) + return { + statements: scriptSetupAst, + sourceOf: (node: Parameters[1]) => nodeSource(script.content, node), + } +} diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.ts similarity index 59% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.ts index 074f744e2..b4af8cde8 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/dict-cache.test.ts @@ -1,10 +1,9 @@ -import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { transformSync } from 'esbuild' import { computed, reactive, watch, nextTick, effectScope } from 'vue' -function read(path) { +function read(path: string) { const source = readFileSync(new URL(`../../src/${path}`, import.meta.url), 'utf8') .replace(/^import .*$/gm, '') .replace(/^export default .*$/gm, '') @@ -13,14 +12,24 @@ function read(path) { } test('dictionary invalidation updates held refs and rejects late requests across edits and logout', async () => { - let token = 'account-one' - const requests = [] + let token: string | null = 'account-one' + const requests: ((reply: { + data: { dictLabel: string; dictValue: string; dictLabelI18n?: Record }[] + }) => void)[] = [] const getDicts = () => new Promise((resolve) => requests.push(resolve)) - const defineStore = (_id, definition) => () => { - const state = reactive(definition.state()) - for (const [name, fn] of Object.entries(definition.actions)) state[name] = fn.bind(state) - return state - } + const defineStore = + ( + _id: string, + definition: { state: () => Record; actions: Record } + ) => + () => { + const state = reactive(definition.state()) + for (const [name, action] of Object.entries(definition.actions)) { + if (typeof action !== 'function') throw new TypeError('Expected a store action: ' + name) + state[name] = action.bind(state) + } + return state + } const useStore = new Function( 'getDicts', 'getToken', @@ -36,25 +45,25 @@ test('dictionary invalidation updates held refs and rejects late requests across 'resolveText', read('utils/dict.ts') + '; return useDict' )( - (rows) => rows, + (rows: unknown[]) => rows, () => store, computed, watch, - (text) => text + (text: string) => text ) const scope = effectScope() const held = scope.run(() => useDict('status')).status scope.run(() => useDict('status')) - assert.equal(requests.length, 1, 'concurrent consumers share the pending request') + expect(requests.length, 'concurrent consumers share the pending request').toBe(1) store.removeDict('status') await nextTick() - assert.equal(requests.length, 2) + expect(requests.length).toBe(2) requests[1]({ data: [{ dictLabel: 'new', dictLabelI18n: { 'en-US': 'New' }, dictValue: '1' }] }) await new Promise(setImmediate) - assert.equal(held.value[0].originalLabel, 'new') + expect(held.value[0].originalLabel).toBe('new') requests[0]({ data: [{ dictLabel: 'old', dictLabelI18n: {}, dictValue: '1' }] }) await new Promise(setImmediate) - assert.equal(held.value[0].originalLabel, 'new', 'late response cannot replace refreshed data') + expect(held.value[0].originalLabel, 'late response cannot replace refreshed data').toBe('new') store.removeDict('status') await nextTick() token = null @@ -62,7 +71,7 @@ test('dictionary invalidation updates held refs and rejects late requests across await nextTick() requests[2]({ data: [{ dictLabel: 'previous account', dictValue: '1' }] }) await new Promise(setImmediate) - assert.deepEqual(held.value, []) - assert.equal(requests.length, 3, 'logout does not refetch protected dictionaries') + expect(held.value).toStrictEqual([]) + expect(requests.length, 'logout does not refetch protected dictionaries').toBe(3) scope.stop() }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.ts similarity index 73% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.ts index e9e440e96..e950bdd3e 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generated.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' import { registerGeneratedResources } from '../../src/i18n/generated.ts' @@ -11,6 +10,8 @@ test('generated module namespaces support additional registered languages and so defaultLocale: 'zh-CN', locales: locales.map((code) => ({ code, + nativeName: code, + direction: 'ltr', enabled: true, aliases: [], fallback: code === 'zh-CN' ? [] : ['zh-CN'], @@ -18,7 +19,7 @@ test('generated module namespaces support additional registered languages and so }, resources: Object.fromEntries(locales.map((code) => [code, { common: {} }])), scope: 'generated-test', - storage: { get() {}, set() {} }, + storage: { get: () => null, set() {} }, }) registerGeneratedResources(runtime, { './i18n/locales/zh-CN/generated.demo.tasks.json': { @@ -30,9 +31,9 @@ test('generated module namespaces support additional registered languages and so './i18n/locales/fr-FR/generated.demo.tasks.json': { title: 'Tâches' }, }) await runtime.setPreference('en-US') - assert.equal(runtime.t('generated.demo.tasks:title'), 'Tasks') - assert.equal(runtime.t('generated.demo.tasks:fields.name.label'), '名称') + expect(runtime.t('generated.demo.tasks:title')).toBe('Tasks') + expect(runtime.t('generated.demo.tasks:fields.name.label')).toBe('名称') await runtime.setPreference('ja-JP') - assert.equal(runtime.t('generated.demo.tasks:title'), 'タスク') - assert.equal(runtime.engine.hasResourceBundle('fr-FR', 'generated.demo.tasks'), false) + expect(runtime.t('generated.demo.tasks:title')).toBe('タスク') + expect(runtime.engine.hasResourceBundle('fr-FR', 'generated.demo.tasks')).toBe(false) }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.ts similarity index 62% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.ts index c64da786c..3ece06956 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/generator.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { inputComponents, selectComponents } from '../../src/utils/generator/config.ts' import { cleanDrawingDefaultValue, @@ -9,7 +8,7 @@ import { import { setMessageTranslator } from '../../src/i18n/message.ts' import { normalizePluginOperationLogDetail } from '../../src/utils/pluginPlanFormatter.ts' import { getPluginReleaseView } from '../../src/utils/pluginReleaseFormatter.ts' -import { testLocale } from './localeFixture.mjs' +import { testLocale } from './localeFixture.ts' import { initialPreviewFile, previewFileLabel } from '../../src/views/tool/gen/preview.ts' test('generated locale resources retain distinct preview labels and full file identities', () => { @@ -21,46 +20,46 @@ test('generated locale resources retain distinct preview labels and full file id 'backend/i18n/catalogs/en-US/LC_MESSAGES/core/generated.demo.item.po': 'msgid "demo"', 'backend/i18n/catalogs/zh-CN/LC_MESSAGES/core/generated.demo.item.po': 'msgid "demo"', } - assert.equal(initialPreviewFile(files), 'python/do.py.jinja2') - assert.equal(previewFileLabel('vue/index.vue.jinja2'), 'index.vue') - assert.equal(previewFileLabel('do.py.jinja2'), 'do.py') + expect(initialPreviewFile(files)).toBe('python/do.py.jinja2') + expect(previewFileLabel('vue/index.vue.jinja2')).toBe('index.vue') + expect(previewFileLabel('do.py.jinja2')).toBe('do.py') const jsonKeys = Object.keys(files).filter((key) => key.endsWith('.json')) - assert.deepEqual(jsonKeys.map(previewFileLabel), jsonKeys) + expect(jsonKeys.map(previewFileLabel)).toStrictEqual(jsonKeys) for (const locale of ['zh-CN', 'en-US']) { - assert.equal( - previewFileLabel(`backend/i18n/catalogs/${locale}/LC_MESSAGES/core/generated.demo.item.po`), - `${locale}/core/generated.demo.item.po` - ) + expect( + previewFileLabel(`backend/i18n/catalogs/${locale}/LC_MESSAGES/core/generated.demo.item.po`) + ).toBe(`${locale}/core/generated.demo.item.po`) } - assert.equal(new Set(Object.keys(files).map(previewFileLabel)).size, Object.keys(files).length) + expect(new Set(Object.keys(files).map(previewFileLabel)).size).toBe(Object.keys(files).length) }) test('preview defaults to an available resource when no Python model template exists', () => { - assert.equal( - initialPreviewFile({ 'frontend/src/i18n/locales/en-US/demo.json': '{}' }), + expect(initialPreviewFile({ 'frontend/src/i18n/locales/en-US/demo.json': '{}' })).toBe( 'frontend/src/i18n/locales/en-US/demo.json' ) - assert.equal(initialPreviewFile({}), '') + expect(initialPreviewFile({})).toBe('') }) test('palette labels follow the locale while cloned form values remain unchanged', async () => { setMessageTranslator(testLocale.t) await testLocale.setPreference('zh-CN') - assert.equal(inputComponents[0].label, '单行文本') - const existing = JSON.parse(JSON.stringify(selectComponents[0])) + expect(inputComponents[0].label).toBe('单行文本') + const existing = JSON.parse( + JSON.stringify(selectComponents[0]) + ) as (typeof selectComponents)[number] await testLocale.setPreference('en-US') - assert.equal(inputComponents[0].label, 'Single-line text') - assert.equal(existing.label, '下拉选择') - assert.deepEqual( - selectComponents[0].options.map((item) => item.value), + expect(inputComponents[0].label).toBe('Single-line text') + expect(existing.label).toBe('下拉选择') + if (!selectComponents[0].options || !existing.options) throw new Error('Expected select options') + expect(selectComponents[0].options.map((item) => item.value)).toStrictEqual( existing.options.map((item) => item.value) ) cleanDrawingDefaultValue() initDrawingDefaultValue() - assert.equal(drawingDefaultValue[0].label, 'Phone number') - assert.equal(drawingDefaultValue[0].vModel, 'mobile') + expect(drawingDefaultValue[0].label).toBe('Phone number') + expect(drawingDefaultValue[0].vModel).toBe('mobile') await testLocale.setPreference('zh-CN') - assert.equal(drawingDefaultValue[0].label, 'Phone number') + expect(drawingDefaultValue[0].label).toBe('Phone number') cleanDrawingDefaultValue() setMessageTranslator(undefined) }) @@ -75,12 +74,10 @@ test('translated release summaries retain the selected worker count', async () = liveWorkers: 5, expectedWorkers: 6, } - assert.match( - getPluginReleaseView({ enabled: '0', release }).workerSummary, + expect(getPluginReleaseView({ enabled: '0', release }).workerSummary).toMatch( /2.*Live 5.*Expected 6/ ) - assert.match( - getPluginReleaseView({ enabled: '1', release }).workerSummary, + expect(getPluginReleaseView({ enabled: '1', release }).workerSummary).toMatch( /3.*Live 5.*Expected 6/ ) setMessageTranslator(undefined) @@ -94,10 +91,11 @@ test('plugin validation groups retain their severity in each language', async () const detail = normalizePluginOperationLogDetail({ result: { manifestIssues: [{}], manifestWarnings: [{}, { level: 'info' }] }, }) - assert.deepEqual( - detail.validationItems.map((item) => item.level), - ['error', 'warning', 'info'] - ) + expect(detail.validationItems.map((item) => item.level)).toStrictEqual([ + 'error', + 'warning', + 'info', + ]) } } finally { setMessageTranslator(undefined) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.ts similarity index 72% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.ts index 25ea71ebb..4896b3729 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localeFixture.ts @@ -1,7 +1,9 @@ import { readFileSync, readdirSync } from 'node:fs' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) +const meta: import('../../src/i18n/runtime').LocaleMetadata = JSON.parse( + readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url), 'utf8') +) const resources = Object.fromEntries( meta.locales.map(({ code }) => [ code, @@ -11,7 +13,7 @@ const resources = Object.fromEntries( .map((file) => [ file.slice(0, -5), JSON.parse( - readFileSync(new URL(`../../src/i18n/locales/${code}/${file}`, import.meta.url)) + readFileSync(new URL(`../../src/i18n/locales/${code}/${file}`, import.meta.url), 'utf8') ), ]) ), @@ -21,5 +23,5 @@ export const testLocale = createLocaleRuntime({ meta, resources, scope: 'fixture', - storage: { get() {}, set() {} }, + storage: { get: () => null, set() {} }, }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.ts similarity index 75% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.ts index a01f4b918..690aff60e 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/localizedMessage.test.ts @@ -1,12 +1,11 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { readFile } from 'node:fs/promises' import { createRequire } from 'node:module' import { parse, compileScript } from '@vue/compiler-sfc' import { transform } from 'esbuild' import { createSSRApp, h } from 'vue' import { renderToString } from 'vue/server-renderer' -import { testLocale } from './localeFixture.mjs' +import { testLocale } from './localeFixture.ts' const source = await readFile( new URL('../../src/components/LocalizedMessage/index.vue', import.meta.url), @@ -15,7 +14,7 @@ const source = await readFile( const { descriptor } = parse(source) const compiled = compileScript(descriptor, { id: 'localized-message-test', inlineTemplate: true }) const { code } = await transform(compiled.content, { format: 'cjs', loader: 'ts' }) -const module = { exports: {} } +const module = { exports: {} as { default: import('vue').Component } } new Function('require', 'module', 'exports', code)( createRequire(import.meta.url), module, @@ -23,7 +22,7 @@ new Function('require', 'module', 'exports', code)( ) const LocalizedMessage = module.exports.default -function render(message) { +function render(message: string) { return renderToString( createSSRApp({ render: () => @@ -45,10 +44,10 @@ test('translated sentences reorder named input slots and preserve text escaping' const chinese = await render(testLocale.t('components:cron.every.days', options)) await testLocale.setPreference('en-US') const english = await render(testLocale.t('components:cron.every.days', options)) - assert.ok(chinese.indexOf('value="7"') < chinese.indexOf('value="2"')) - assert.ok(english.indexOf('value="2"') < english.indexOf('value="7"')) + expect(chinese.indexOf('value="7"') < chinese.indexOf('value="2"')).toBeTruthy() + expect(english.indexOf('value="2"') < english.indexOf('value="7"')).toBeTruthy() const escaped = await render(' {start} {unknown}') - assert.ok(escaped.includes('<img')) - assert.ok(!escaped.includes(' { + const write = async (file: string, content: string) => { const path = join(root, file) await mkdir(dirname(path), { recursive: true }) await writeFile(path, content) } - const metadata = (codes) => ({ + const metadata = (codes: string[]) => ({ sourceLocale: 'zh-CN', defaultLocale: 'zh-CN', locales: codes.map((code) => ({ @@ -53,7 +52,7 @@ const dynamic = 'common:' + name; t(dynamic);` ` ` ) - assert.deepEqual(await checkLocaleRegistration(url), [ + expect(await checkLocaleRegistration(url)).toStrictEqual([ { name: 'host', locales: ['zh-CN', 'en-US'] }, { name: 'plugin.example', locales: ['zh-CN'] }, ]) @@ -81,12 +80,14 @@ for (const locale of ['zh-CN', 'en-US']) { 'src/views/tool/build/Example.vue', `` ) - await assert.rejects(checkLocaleRegistration(url), (error) => { - assert.match(error.message, /Invalid translation message shape/) - assert.ok(error.message.includes(`common:invalid resolves to ${shape} in ${locale}`)) - assert.ok(error.message.includes('src/script.js:1')) - assert.ok(error.message.includes('src/views/tool/build/Example.vue:1')) - assert.equal(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN'), false) + await expect(checkLocaleRegistration(url)).rejects.toSatisfy((error) => { + expect(error.message).toMatch(/Invalid translation message shape/) + expect( + error.message.includes(`common:invalid resolves to ${shape} in ${locale}`) + ).toBeTruthy() + expect(error.message.includes('src/script.js:1')).toBeTruthy() + expect(error.message.includes('src/views/tool/build/Example.vue:1')).toBeTruthy() + expect(error.message.includes(locale === 'zh-CN' ? 'in en-US' : 'in zh-CN')).toBe(false) return true }) } finally { diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.mjs deleted file mode 100644 index aceb7ac1a..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.mjs +++ /dev/null @@ -1,49 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { updateTranslationPatch, localizeDictionary } from '../../src/i18n/names.ts' -import { createLocaleRuntime } from '../../src/i18n/runtime.ts' - -test('translation edits preserve unknown languages and distinguish removal from no edit', () => { - const original = { 'en-US': 'Users', 'ja-JP': 'ユーザー' } - let patch = updateTranslationPatch({}, original, 'en-US', 'Accounts') - assert.deepEqual(patch, { 'en-US': 'Accounts' }) - patch = updateTranslationPatch(patch, original, 'en-US', '') - assert.deepEqual(patch, { 'en-US': null }) - assert.equal(original['ja-JP'], 'ユーザー') - assert.deepEqual(updateTranslationPatch(patch, original, 'en-US', 'Users'), {}) -}) - -test('cached dictionaries switch through a third language without changing business values', async () => { - const locale = createLocaleRuntime({ - meta: { - sourceLocale: 'zh-CN', - defaultLocale: 'zh-CN', - locales: [ - { code: 'zh-CN', enabled: true, fallback: [] }, - { code: 'en-US', enabled: true, fallback: ['zh-CN'] }, - { code: 'ja-JP', enabled: true, fallback: ['en-US'] }, - ], - }, - resources: { 'zh-CN': { common: {} }, 'en-US': { common: {} }, 'ja-JP': { common: {} } }, - storage: { get() {}, set() {} }, - }) - const cache = [ - { originalLabel: '正常', value: '0', labelI18n: { 'en-US': 'Enabled', 'ja-JP': '有効' } }, - { originalLabel: '普通', value: 'basic' }, - ] - await locale.setPreference('en-US') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.label), - ['Enabled', '普通'] - ) - await locale.setPreference('ja-JP') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.label), - ['有効', '普通'] - ) - assert.equal(cache[0].originalLabel, '正常') - assert.deepEqual( - localizeDictionary(cache, locale.resolveText).map((item) => item.value), - ['0', 'basic'] - ) -}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.ts new file mode 100644 index 000000000..89b95f8c0 --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/names.test.ts @@ -0,0 +1,61 @@ +import { expect, test } from 'vitest' +import { updateTranslationPatch, localizeDictionary } from '../../src/i18n/names.ts' +import { createLocaleRuntime } from '../../src/i18n/runtime.ts' + +test('translation edits preserve unknown languages and distinguish removal from no edit', () => { + const original = { 'en-US': 'Users', 'ja-JP': 'ユーザー' } + let patch = updateTranslationPatch({}, original, 'en-US', 'Accounts') + expect(patch).toStrictEqual({ 'en-US': 'Accounts' }) + patch = updateTranslationPatch(patch, original, 'en-US', '') + expect(patch).toStrictEqual({ 'en-US': null }) + expect(original['ja-JP']).toBe('ユーザー') + expect(updateTranslationPatch(patch, original, 'en-US', 'Users')).toStrictEqual({}) +}) + +test('cached dictionaries switch through a third language without changing business values', async () => { + const locale = createLocaleRuntime({ + meta: { + sourceLocale: 'zh-CN', + defaultLocale: 'zh-CN', + locales: [ + { code: 'zh-CN', nativeName: 'zh-CN', direction: 'ltr', enabled: true, fallback: [] }, + { + code: 'en-US', + nativeName: 'en-US', + direction: 'ltr', + enabled: true, + fallback: ['zh-CN'], + }, + { + code: 'ja-JP', + nativeName: 'ja-JP', + direction: 'ltr', + enabled: true, + fallback: ['en-US'], + }, + ], + }, + resources: { 'zh-CN': { common: {} }, 'en-US': { common: {} }, 'ja-JP': { common: {} } }, + scope: 'dictionary-test', + storage: { get: () => null, set() {} }, + }) + const cache = [ + { originalLabel: '正常', value: '0', labelI18n: { 'en-US': 'Enabled', 'ja-JP': '有効' } }, + { originalLabel: '普通', value: 'basic' }, + ] + await locale.setPreference('en-US') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.label)).toStrictEqual([ + 'Enabled', + '普通', + ]) + await locale.setPreference('ja-JP') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.label)).toStrictEqual([ + '有効', + '普通', + ]) + expect(cache[0].originalLabel).toBe('正常') + expect(localizeDictionary(cache, locale.resolveText).map((item) => item.value)).toStrictEqual([ + '0', + 'basic', + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.ts similarity index 68% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.ts index 05e3effb1..f3faa4044 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/navigation.test.ts @@ -1,6 +1,5 @@ -import assert from 'node:assert/strict' import { registerGeneratedResources } from '../../src/i18n/generated.ts' -import { after, test } from 'node:test' +import { expect, afterAll, test } from 'vitest' import { mkdtemp, mkdir, rm, writeFile, readdir, readFile } from 'node:fs/promises' import { fileURLToPath, pathToFileURL } from 'node:url' import { join } from 'node:path' @@ -13,7 +12,7 @@ const root = fileURLToPath(new URL('../../', import.meta.url)) const cache = join(root, 'node_modules/.cache') await mkdir(cache, { recursive: true }) const temporary = await mkdtemp(join(cache, 'i18n-tests-')) -after(() => rm(temporary, { recursive: true, force: true })) +afterAll(() => rm(temporary, { recursive: true, force: true })) const inject = join(temporary, 'auto-imports.mjs') await writeFile(inject, "export { ref, computed } from 'vue'\n") const output = join(temporary, 'application.mjs') @@ -38,14 +37,18 @@ await build({ }) const previousStorage = globalThis.sessionStorage -globalThis.sessionStorage = { getItem: () => null } +Object.defineProperty(globalThis, 'sessionStorage', { + configurable: true, + writable: true, + value: { getItem: () => null }, +}) const { t, useI18n, resolveRouteTitle, useLocaleForm, usePasswordRule, pluginI18n } = await import( - pathToFileURL(output) + pathToFileURL(output).href ) -if (previousStorage === undefined) delete globalThis.sessionStorage +if (previousStorage === undefined) Reflect.deleteProperty(globalThis, 'sessionStorage') else globalThis.sessionStorage = previousStorage const { i18n } = useI18n() -const generatedResources = {} +const generatedResources: Parameters[1] = {} for (const entry of i18n.registry.entries) { const directory = join(root, 'src/i18n/locales', entry.code) for (const file of (await readdir(directory)).filter((name) => @@ -96,15 +99,15 @@ test('route titles react to language changes without replacing route or form sta const input = reactive({ nickname: '未保存的输入' }) const title = computed(() => resolveRouteTitle(router.currentRoute.value)) await i18n.setPreference('zh-CN') - assert.equal(title.value, '个人中心') + expect(title.value).toBe('个人中心') await i18n.setPreference('en-US') - assert.equal(title.value, 'Profile') - assert.equal(router.currentRoute.value, route) - assert.equal(input.nickname, '未保存的输入') - assert.equal(route.meta.title, '个人中心') - assert.equal(resolveRouteTitle(router.resolve('/custom')), 'Custom menu') + expect(title.value).toBe('Profile') + expect(router.currentRoute.value).toBe(route) + expect(input.nickname).toBe('未保存的输入') + expect(route.meta.title).toBe('个人中心') + expect(resolveRouteTitle(router.resolve('/custom'))).toBe('Custom menu') await i18n.setPreference('zh-CN') - assert.equal(resolveRouteTitle(router.resolve('/custom')), '原始名称') + expect(resolveRouteTitle(router.resolve('/custom'))).toBe('原始名称') }) test('persisted tabs retain route parameters and explicit titles, not translated metadata', () => { @@ -115,23 +118,23 @@ test('persisted tabs retain route parameters and explicit titles, not translated { ...profile, title: 'Stale translated title' }, { ...router.resolve('/custom'), customTitle: 'layout:routes.home' }, ]) - assert.equal(snapshot.version, 1) - assert.equal(snapshot.views.length, 2) - assert.ok(snapshot.views.every((view) => !('title' in view) && !('meta' in view))) + expect(snapshot.version).toBe(1) + expect(snapshot.views.length).toBe(2) + expect(snapshot.views.every((view) => !('title' in view) && !('meta' in view))).toBeTruthy() const restored = restoreVisitedViews(JSON.parse(JSON.stringify(snapshot)), (view) => router.resolve(view) ) - assert.equal(restored[0].params.id, '42') - assert.equal(restored[0].query.tab, 'profile') - assert.equal(restored[0].hash, '#details') - assert.equal(restored[0].meta.titleKey, 'layout:routes.profile') - assert.equal(restored[1].customTitle, 'layout:routes.home') + expect(restored[0].params?.id).toBe('42') + expect(restored[0].query?.tab).toBe('profile') + expect(restored[0].hash).toBe('#details') + expect(restored[0].meta.titleKey).toBe('layout:routes.profile') + expect(restored[1].customTitle).toBe('layout:routes.home') }) test('malformed saved tabs are ignored', () => { const router = createTestRouter() - assert.deepEqual(restoreVisitedViews({ version: 99, views: [] }, router.resolve), []) - assert.deepEqual(restoreVisitedViews({ version: 1, views: 'invalid' }, router.resolve), []) + expect(restoreVisitedViews({ version: 99, views: [] }, router.resolve)).toStrictEqual([]) + expect(restoreVisitedViews({ version: 1, views: 'invalid' }, router.resolve)).toStrictEqual([]) }) test('language changes revalidate visible errors only and stop when the form is disposed', async () => { @@ -149,8 +152,8 @@ test('language changes revalidate visible errors only and stop when the form is throw new Error(message.value) }, }, - { validateState: '', validate: () => assert.fail('untouched field was validated') }, - { validateState: 'success', validate: () => assert.fail('valid field was validated') }, + { validateState: '', validate: () => expect.fail('untouched field was validated') }, + { validateState: 'success', validate: () => expect.fail('valid field was validated') }, ], }) const scope = effectScope() @@ -158,70 +161,68 @@ test('language changes revalidate visible errors only and stop when the form is try { await i18n.setPreference('en-US') await nextTick() - assert.equal(message.value, 'Enter your password') - assert.equal(validations, 1) - assert.deepEqual(input, { username: 'retained', password: '' }) + expect(message.value).toBe('Enter your password') + expect(validations).toBe(1) + expect(input).toStrictEqual({ username: 'retained', password: '' }) } finally { scope.stop() } await i18n.setPreference('zh-CN') await nextTick() - assert.equal(validations, 1) + expect(validations).toBe(1) }) test('password rules translate at validation time while retaining the rule instances', async () => { await i18n.setPreference('zh-CN') const { registerPwdValidator, pwdPromptValidator } = usePasswordRule() const rules = registerPwdValidator.value - assert.equal(rules[0].message(), '请输入您的密码') + expect(rules[0].message()).toBe('请输入您的密码') await i18n.setPreference('en-US') - assert.equal(registerPwdValidator.value, rules) - assert.equal(rules[0].message(), 'Enter your password') - assert.equal(pwdPromptValidator('short'), 'Password must be between 6 and 20 characters') - assert.equal(rules[2].pattern.test('safePassword1'), true) - assert.equal(rules[2].pattern.test(''), false) - assert.ok(rules[2].message().includes('Password must not contain')) + expect(registerPwdValidator.value).toBe(rules) + expect(rules[0].message()).toBe('Enter your password') + expect(pwdPromptValidator('short')).toBe('Password must be between 6 and 20 characters') + expect(rules[2].pattern.test('safePassword1')).toBe(true) + expect(rules[2].pattern.test('')).toBe(false) + expect(rules[2].message().includes('Password must not contain')).toBeTruthy() }) test('registered namespaces provide English plurals and complete interpolated messages', async () => { await i18n.setPreference('en-US') - assert.equal(t('layout:search.results', { count: 1 }), 'Found 1 result') - assert.equal(t('layout:search.results', { count: 2 }), 'Found 2 results') - assert.equal( - t('auth:register.success', { username: 'Ada' }), + expect(t('layout:search.results', { count: 1 })).toBe('Found 1 result') + expect(t('layout:search.results', { count: 2 })).toBe('Found 2 results') + expect(t('auth:register.success', { username: 'Ada' })).toBe( 'Your account Ada has been created successfully!' ) await i18n.setPreference('zh-CN') - assert.equal(t('layout:search.results', { count: 1 }), '找到 1 个结果') + expect(t('layout:search.results', { count: 1 })).toBe('找到 1 个结果') }) test('application and plugin namespaces are registered in their own runtime', async () => { for (const entry of i18n.registry.entries) { const files = await readdir(join(root, 'src/i18n/locales', entry.code)) for (const file of files.filter((name) => name.endsWith('.json'))) { - assert.equal( + expect( i18n.engine.hasResourceBundle(entry.code, file.slice(0, -5)), - true, entry.code + ':' + file - ) + ).toBe(true) } - assert.equal(i18n.engine.hasResourceBundle(entry.code, 'plugin.ai'), false) + expect(i18n.engine.hasResourceBundle(entry.code, 'plugin.ai')).toBe(false) } }) test('the actual plugin translator follows reactive locale changes without replacing draft state', async () => { for (const entry of pluginI18n.registry.entries) - assert.equal(pluginI18n.engine.hasResourceBundle(entry.code, 'plugin.ai'), true) + expect(pluginI18n.engine.hasResourceBundle(entry.code, 'plugin.ai')).toBe(true) const draft = reactive({ value: 'unsaved' }) const label = computed(() => pluginI18n.t('plugin.ai:modelCode')) await i18n.setPreference('zh-CN') const chinese = label.value - const observed = [] + const observed: string[] = [] const stop = watch(label, (value) => observed.push(value), { flush: 'sync' }) await i18n.setPreference('en-US') - assert.notEqual(label.value, chinese) - assert.equal(label.value, 'Model code') - assert.deepEqual(observed, ['Model code']) + expect(label.value).not.toBe(chinese) + expect(label.value).toBe('Model code') + expect(observed).toStrictEqual(['Model code']) stop() - assert.equal(draft.value, 'unsaved') + expect(draft.value).toBe('unsaved') }) diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.ts similarity index 60% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.ts index f6763d17e..b60057c47 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/plugin.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/plugin.test.ts @@ -1,10 +1,10 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { createLocaleRuntime } from '../../src/i18n/runtime.ts' import { createPluginLocaleRuntime } from '../../src/i18n/plugin.ts' -const entry = (code, fallback = []) => ({ +const entry = (code: string, fallback: string[] = []) => ({ code, + nativeName: code, enabled: true, direction: 'ltr', aliases: [], @@ -21,11 +21,11 @@ function hostRuntime() { resources: Object.fromEntries( hostMeta.locales.map(({ code }) => [code, { common: { hello: code } }]) ), - storage: { get() {}, set() {} }, + storage: { get: () => null, set() {} }, scope: 'plugin-test', }) } -function plugin(host, namespace = 'plugin.demo') { +function plugin(host: ReturnType, namespace = 'plugin.demo') { return createPluginLocaleRuntime({ host, namespace, @@ -46,18 +46,18 @@ test('source plugins resolve the host language using only their own defaults and const host = hostRuntime() const first = plugin(host) const second = plugin(host, 'plugin.other') - assert.equal(first.t('hello'), '你好') + expect(first.t('hello')).toBe('你好') await host.setPreference('en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('hello')).toBe('Hello') + expect(first.t('sourceOnly')).toBe('源语言') await host.setPreference('ja-JP') - assert.equal(host.locale, 'ja-JP') - assert.equal(host.headers['Accept-Language'], 'ja-JP') - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') - assert.equal(host.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.other'), false) - assert.equal(second.t('hello'), 'Hello') + expect(host.locale).toBe('ja-JP') + expect(host.headers['Accept-Language']).toBe('ja-JP') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') + expect(host.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(first.engine.hasResourceBundle('en-US', 'plugin.other')).toBe(false) + expect(second.t('hello')).toBe('Hello') }) test('unregistering and registering a plugin changes only its instance and preserves its catalogs', async () => { @@ -66,15 +66,15 @@ test('unregistering and registering a plugin changes only its instance and prese const second = plugin(host, 'plugin.other') first.removePluginLocales() await host.setPreference('en-US') - assert.equal(first.locale, 'zh-CN') - assert.equal(first.engine.hasResourceBundle('en-US', 'plugin.demo'), false) - assert.equal(second.t('hello'), 'Hello') - assert.equal(host.t('common:hello'), 'en-US') + expect(first.locale).toBe('zh-CN') + expect(first.engine.hasResourceBundle('en-US', 'plugin.demo')).toBe(false) + expect(second.t('hello')).toBe('Hello') + expect(host.t('common:hello')).toBe('en-US') first.registerPluginLocales() first.registerPluginLocales() - assert.equal(first.locale, 'en-US') - assert.equal(first.t('hello'), 'Hello') + expect(first.locale).toBe('en-US') + expect(first.t('hello')).toBe('Hello') first.removePluginLocales() first.registerPluginLocales() - assert.equal(first.t('sourceOnly'), '源语言') + expect(first.t('sourceOnly')).toBe('源语言') }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.ts similarity index 57% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.ts index 42f204ca5..0b0a3612c 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/pluginSdk.test.ts @@ -1,20 +1,19 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { mkdtemp, copyFile, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join } from 'node:path' -import { pathToFileURL } from 'node:url' +import { createRequire } from 'node:module' test('the copied bridge SDK imports without host modules', async () => { const directory = await mkdtemp(join(tmpdir(), 'ruoyi-vue3-plugin-sdk-')) try { const file = join(directory, 'pluginBridge.mjs') await copyFile(new URL('../../src/utils/pluginBridge.js', import.meta.url), file) - const sdk = await import(pathToFileURL(file).href) - assert.equal(typeof sdk.createPluginClient, 'function') - assert.equal(typeof sdk.setPluginBridgeTranslator, 'function') - sdk.setPluginBridgeTranslator((key) => key) - assert.throws(() => sdk.validatePluginApiPath('../invalid')) + const sdk = createRequire(file)(file) + expect(typeof sdk.createPluginClient).toBe('function') + expect(typeof sdk.setPluginBridgeTranslator).toBe('function') + sdk.setPluginBridgeTranslator((key: string) => key) + expect(() => sdk.validatePluginApiPath('../invalid')).toThrow() sdk.setPluginBridgeTranslator(undefined) } finally { await rm(directory, { recursive: true, force: true }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.ts similarity index 83% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.ts index fb1bbcd96..0b79b1f08 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/project-tooling.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, mkdir, writeFile, readFile, access, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -12,11 +12,11 @@ const plugin = new URL('../../scripts/x18n-project.mjs', import.meta.url).href test('the CLI creates isolated plugin catalogs and scans the form designer source directory', async () => { const root = await mkdtemp(join(tmpdir(), 'vue3-x18n-project-')) - const run = (...args) => { + const run = (...args: string[]) => { const result = spawnSync(process.execPath, [cli, '--root', root, ...args, '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + return { status: result.status, report: JSON.parse(result.stdout) as CliReport } } try { await writeFile( @@ -50,28 +50,27 @@ export default { }) ) const applied = run('apply', payload) - assert.equal(applied.status, 0, JSON.stringify(applied.report.errors)) - assert.deepEqual( - JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')), - { reply: 'Reply' } - ) - await assert.rejects(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))) + expect(applied.status, JSON.stringify(applied.report.errors)).toBe(0) + expect( + JSON.parse(await readFile(join(root, 'plugins/ai/locales/en-US.json'), 'utf8')) + ).toStrictEqual({ reply: 'Reply' }) + await expect(access(join(root, 'src/i18n/locales/en-US/plugin.ai.json'))).rejects.toThrow() const checked = run('check') - assert.equal(checked.status, 1) - assert.ok( + expect(checked.status).toBe(1) + expect( checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'common:designerMissing' && item.file === 'src/views/tool/build/Example.vue' ) - ) - assert.ok( + ).toBeTruthy() + expect( !checked.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'plugin.ai:reply' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } -}) +}, 30000) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.mjs deleted file mode 100644 index 55e80954e..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.mjs +++ /dev/null @@ -1,226 +0,0 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' -import { readFileSync } from 'node:fs' -import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' - -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) -const resources = { - 'zh-CN': { common: { sample: '中文' } }, - 'en-US': { common: { sample: 'English' } }, -} -function setup(storage = { get: () => null, set: () => {} }, extra = {}) { - return createLocaleRuntime({ meta, resources, scope: 'contract:api', storage, ...extra }) -} -const key = 'contract:api:locale:v2:user:7' - -test('declared language families preserve exact variants', () => { - const registry = createLocaleRegistry(meta, resources) - assert.equal(registry.resolve('auto', ['en-GB']), 'en-US') - assert.equal(registry.resolve('auto', ['en-AU']), 'en-US') - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'en-GB', enabled: true, aliases: [], fallback: ['en-US'] }], - } - const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) - assert.equal(precise.resolve('en-GB'), 'en-GB') - assert.equal(precise.resolve('zh-TW'), 'en-US') - assert.throws( - () => createLocaleRegistry({ ...meta, languageFallbacks: { en: 'missing' } }, resources), - /Invalid language fallback/ - ) -}) - -test('source language supplies missing text independently of the negotiation default', async () => { - const expanded = { - ...meta, - defaultLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, aliases: [], fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - assert.equal(runtime.registry.resolve('unknown'), 'en-US') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), '中文') - assert.equal(runtime.resolveText('原始名称', { 'en-US': 'English name' }), '原始名称') -}) - -test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { - const data = new Map() - const events = [] - const storage = { - get: (k) => data.get(k), - set: (k, v) => { - data.set(k, v) - events.push([k, v]) - }, - } - const a = setup(storage), - b = setup(storage) - a.setAccount(7, 'zh-CN', '0') - b.setAccount(7, 'zh-CN', '0') - let release - let server = { locale: 'zh-CN', revision: '0' } - const delayed = a.setPreference('en-US', { - save: async () => { - server = { locale: 'en-US', revision: '1' } - const response = { ...server } - await new Promise((resolve) => { - release = resolve - }) - return response - }, - }) - await Promise.resolve() - await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) - a.acceptStorageEvent(key, data.get(key)) - const writes = events.length - release() - await delayed - assert.deepEqual(server, { locale: 'auto', revision: '2' }) - assert.equal(a.preference, 'auto') - assert.equal(b.preference, 'auto') - assert.equal(events.length, writes) - assert.deepEqual(JSON.parse(data.get(key)), server) -}) - -test('out-of-order storage and profile reads preserve the latest decimal revision', () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '9007199254740993') - const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) - data.set(key, old) - runtime.acceptStorageEvent(key, old) - runtime.setAccount(7, 'zh-CN', '9007199254740992') - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '9007199254740993') - assert.equal(JSON.parse(data.get(key)).revision, '9007199254740993') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '9007199254740993') -}) - -test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'en-US', revision: '2' }), - }) - assert.equal(runtime.preferenceRevision, '2') - await assert.rejects( - runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }), - /Invalid locale snapshot/ - ) - assert.equal(runtime.preference, 'en-US') -}) - -test('offline account snapshots and API instances are isolated', async () => { - const data = new Map() - const storage = { get: (k) => data.get(k), set: (k, v) => data.set(k, v) } - const runtime = setup(storage) - runtime.setAccount(7, 'en-US', '1') - const restored = setup(storage) - restored.initialize(true) - assert.equal(restored.preference, 'en-US') - assert.equal(restored.preferenceRevision, '1') - restored.setAccount(8, 'zh-CN', '0') - restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) - assert.equal(restored.preference, 'zh-CN') - restored.setAccount(null) - assert.equal(restored.preference, 'zh-CN') - assert.equal(restored.loginPreference, null) - const other = setup(storage, { scope: 'other:api' }) - other.initialize(true) - assert.equal(other.accountId, null) - assert.equal(other.preference, 'zh-CN') -}) - -test('refreshing the same account does not cancel a pending save', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '0') - let finish - const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - finish = resolve - }), - }) - await Promise.resolve() - runtime.setAccount(7, 'zh-CN', '0') - finish({ locale: 'en-US', revision: '1' }) - await pending - assert.equal(runtime.preference, 'en-US') - assert.equal(runtime.preferenceRevision, '1') -}) - -test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { - const runtime = setup() - runtime.setAccount(7, 'zh-CN', '1') - await assert.rejects( - runtime.setPreference('en-US', { - save: async () => { - throw Error('timeout') - }, - readBack: async () => ({ locale: 'auto', revision: '3' }), - }), - /timeout/ - ) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.preferenceRevision, '3') -}) - -test('invalid profile snapshots leave the current account and its revision intact', () => { - const runtime = setup() - runtime.setAccount(7, 'en-US', '4') - assert.throws(() => runtime.setAccount(undefined, 'zh-CN', '4'), /Missing locale account/) - assert.throws(() => runtime.setAccount(8, 'zh-CN', 4), /Invalid locale snapshot/) - assert.throws(() => runtime.setAccount(8, 'zh-CN'), /Invalid locale snapshot/) - assert.equal(runtime.accountId, '7') - assert.equal(runtime.preferenceRevision, '4') - assert.equal(runtime.preference, 'en-US') -}) - -test('dynamic names keep the database source when an application uses English source catalogs', async () => { - const expanded = { - ...meta, - sourceLocale: 'en-US', - locales: [...meta.locales, { code: 'ja-JP', enabled: true, fallback: [] }], - } - const runtime = setup(undefined, { - meta: expanded, - resources: { ...resources, 'ja-JP': { common: {} } }, - }) - const translations = { 'en-US': 'Users' } - await runtime.setPreference('en-US') - assert.equal(runtime.resolveText('用户管理', translations), 'Users') - await runtime.setPreference('ja-JP') - assert.equal(runtime.t('common:sample'), 'English') - assert.equal(runtime.resolveText('用户管理', translations), '用户管理') -}) - -test('a missing key keeps explicit fallback text or uses a safe label and reports only once', (ctx) => { - const warn = ctx.mock.method(console, 'warn', () => {}) - const runtime = setup(undefined, { - appVersion: '2.0.0', - resources: { - ...resources, - 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, - }, - }) - const t = runtime.engine.getFixedT('en-US', 'layout') - const options = { name: 'Private name' } - assert.equal(t('missing', { ...options, defaultValue: 'Hello {{name}}' }), 'Hello Private name') - assert.equal(t('missing', options), 'Text unavailable') - assert.equal(warn.mock.callCount(), 1) - assert.deepEqual(warn.mock.calls[0].arguments, [ - 'Missing translation', - { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, - ]) -}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.ts new file mode 100644 index 000000000..edd42579e --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/protocol.test.ts @@ -0,0 +1,261 @@ +import { expect, test, vi } from 'vitest' +import { createLocaleRuntime, createLocaleRegistry } from '../../src/i18n/runtime.ts' + +import localeMetadata from '../../src/i18n/locale-meta.json' +const resources = { + 'zh-CN': { common: { sample: '中文' } }, + 'en-US': { common: { sample: 'English' } }, +} +function setup( + storage: Parameters[0]['storage'] = { + get: () => null, + set: () => {}, + }, + extra: Partial[0]> = {} +) { + return createLocaleRuntime({ + meta: localeMetadata, + resources, + scope: 'contract:api', + storage, + ...extra, + }) +} +const key = 'contract:api:locale:v2:user:7' + +test('declared language families preserve exact variants', () => { + const registry = createLocaleRegistry(localeMetadata, resources) + expect(registry.resolve('auto', ['en-GB'])).toBe('en-US') + expect(registry.resolve('auto', ['en-AU'])).toBe('en-US') + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'en-GB', + nativeName: 'British English', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: ['en-US'], + }, + ], + } + const precise = createLocaleRegistry(expanded, { ...resources, 'en-GB': {} }) + expect(precise.resolve('en-GB')).toBe('en-GB') + expect(precise.resolve('zh-TW')).toBe('en-US') + expect(() => + createLocaleRegistry({ ...localeMetadata, languageFallbacks: { en: 'missing' } }, resources) + ).toThrow(/Invalid language fallback/) +}) + +test('source language supplies missing text independently of the negotiation default', async () => { + const expanded = { + ...localeMetadata, + defaultLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { + code: 'ja-JP', + nativeName: '日本語', + direction: 'ltr', + enabled: true, + aliases: [], + fallback: [], + }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + expect(runtime.registry.resolve('unknown')).toBe('en-US') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('中文') + expect(runtime.resolveText('原始名称', { 'en-US': 'English name' })).toBe('原始名称') +}) + +test('delayed save responses cannot overwrite a newer server revision from another tab', async () => { + const data = new Map() + const events: [string, string][] = [] + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => { + data.set(k, v) + events.push([k, v]) + }, + } + const a = setup(storage), + b = setup(storage) + a.setAccount(7, 'zh-CN', '0') + b.setAccount(7, 'zh-CN', '0') + const gate = Promise.withResolvers() + let server = { locale: 'zh-CN', revision: '0' } + const delayed = a.setPreference('en-US', { + save: async () => { + server = { locale: 'en-US', revision: '1' } + const response = { ...server } + await gate.promise + return response + }, + }) + await Promise.resolve() + await b.setPreference('auto', { save: async () => (server = { locale: 'auto', revision: '2' }) }) + a.acceptStorageEvent(key, data.get(key) ?? null) + const writes = events.length + gate.resolve() + await delayed + expect(server).toStrictEqual({ locale: 'auto', revision: '2' }) + expect(a.preference).toBe('auto') + expect(b.preference).toBe('auto') + expect(events.length).toBe(writes) + expect(JSON.parse(data.get(key) ?? 'null')).toStrictEqual(server) +}) + +test('out-of-order storage and profile reads preserve the latest decimal revision', () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '9007199254740993') + const old = JSON.stringify({ locale: 'zh-CN', revision: '9007199254740992' }) + data.set(key, old) + runtime.acceptStorageEvent(key, old) + runtime.setAccount(7, 'zh-CN', '9007199254740992') + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('9007199254740993') + expect(JSON.parse(data.get(key) ?? 'null')?.revision).toBe('9007199254740993') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('9007199254740993') +}) + +test('timeout recovery uses the authoritative snapshot and rejects malformed snapshots', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'en-US', revision: '2' }), + }) + expect(runtime.preferenceRevision).toBe('2') + await expect( + runtime.setPreference('zh-CN', { save: async () => ({ locale: 'zh-CN' }) }) + ).rejects.toThrow(/Invalid locale snapshot/) + expect(runtime.preference).toBe('en-US') +}) + +test('offline account snapshots and API instances are isolated', async () => { + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (k) => data.get(k) ?? null, + set: (k, v) => data.set(k, v), + } + const runtime = setup(storage) + runtime.setAccount(7, 'en-US', '1') + const restored = setup(storage) + restored.initialize(true) + expect(restored.preference).toBe('en-US') + expect(restored.preferenceRevision).toBe('1') + restored.setAccount(8, 'zh-CN', '0') + restored.acceptStorageEvent(key, JSON.stringify({ locale: 'auto', revision: '9' })) + expect(restored.preference).toBe('zh-CN') + restored.setAccount(null) + expect(restored.preference).toBe('zh-CN') + expect(restored.loginPreference).toBe(null) + const other = setup(storage, { scope: 'other:api' }) + other.initialize(true) + expect(other.accountId).toBe(null) + expect(other.preference).toBe('zh-CN') +}) + +test('refreshing the same account does not cancel a pending save', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '0') + const save = Promise.withResolvers<{ locale: string; revision: string }>() + const pending = runtime.setPreference('en-US', { + save: () => save.promise, + }) + await Promise.resolve() + runtime.setAccount(7, 'zh-CN', '0') + save.resolve({ locale: 'en-US', revision: '1' }) + await pending + expect(runtime.preference).toBe('en-US') + expect(runtime.preferenceRevision).toBe('1') +}) + +test('timeout read-back adopts a newer remote preference even when the requested change lost', async () => { + const runtime = setup() + runtime.setAccount(7, 'zh-CN', '1') + await expect( + runtime.setPreference('en-US', { + save: async () => { + throw Error('timeout') + }, + readBack: async () => ({ locale: 'auto', revision: '3' }), + }) + ).rejects.toThrow(/timeout/) + expect(runtime.preference).toBe('auto') + expect(runtime.preferenceRevision).toBe('3') +}) + +test('invalid profile snapshots leave the current account and its revision intact', () => { + const runtime = setup() + runtime.setAccount(7, 'en-US', '4') + expect(() => Reflect.apply(runtime.setAccount, runtime, [undefined, 'zh-CN', '4'])).toThrow( + /Missing locale account/ + ) + expect(() => Reflect.apply(runtime.setAccount, runtime, [8, 'zh-CN', 4])).toThrow( + /Invalid locale snapshot/ + ) + expect(() => runtime.setAccount(8, 'zh-CN')).toThrow(/Invalid locale snapshot/) + expect(runtime.accountId).toBe('7') + expect(runtime.preferenceRevision).toBe('4') + expect(runtime.preference).toBe('en-US') +}) + +test('dynamic names keep the database source when an application uses English source catalogs', async () => { + const expanded = { + ...localeMetadata, + sourceLocale: 'en-US', + locales: [ + ...localeMetadata.locales, + { code: 'ja-JP', nativeName: 'ja-JP', direction: 'ltr', enabled: true, fallback: [] }, + ], + } + const runtime = setup(undefined, { + meta: expanded, + resources: { ...resources, 'ja-JP': { common: {} } }, + }) + const translations = { 'en-US': 'Users' } + await runtime.setPreference('en-US') + expect(runtime.resolveText('用户管理', translations)).toBe('Users') + await runtime.setPreference('ja-JP') + expect(runtime.t('common:sample')).toBe('English') + expect(runtime.resolveText('用户管理', translations)).toBe('用户管理') +}) + +test('a missing key keeps explicit fallback text or uses a safe label and reports only once', () => { + const warn = vi.spyOn(console, 'warn').mockImplementation(() => {}) + const runtime = setup(undefined, { + appVersion: '2.0.0', + resources: { + ...resources, + 'en-US': { common: { translationUnavailable: 'Text unavailable' } }, + }, + }) + const t = runtime.engine.getFixedT('en-US', 'layout') + const options = { name: 'Private name' } + expect(t('missing', { ...options, defaultValue: 'Hello {{name}}' })).toBe('Hello Private name') + expect(t('missing', options)).toBe('Text unavailable') + expect(warn.mock.calls.length).toBe(1) + expect(warn.mock.calls[0]).toStrictEqual([ + 'Missing translation', + { namespace: 'layout', key: 'missing', locale: 'en-US', version: '2.0.0' }, + ]) +}) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.ts similarity index 55% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.ts index 6b3176e40..c77501c4b 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/runtime.test.ts @@ -1,14 +1,13 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { readFileSync, readdirSync } from 'node:fs' import { createLocaleRuntime, createLocaleRegistry, normalizeLocale, } from '../../src/i18n/runtime.ts' -const meta = JSON.parse(readFileSync(new URL('../../src/i18n/locale-meta.json', import.meta.url))) +import localeMetadata from '../../src/i18n/locale-meta.json' const resources = Object.fromEntries( - meta.locales.map(({ code }) => [ + localeMetadata.locales.map(({ code }) => [ code, Object.fromEntries( readdirSync(new URL(`../../src/i18n/locales/${code}/`, import.meta.url)) @@ -16,19 +15,19 @@ const resources = Object.fromEntries( .map((file) => [ file.slice(0, -5), JSON.parse( - readFileSync(new URL(`../../src/i18n/locales/${code}/${file}`, import.meta.url)) + readFileSync(new URL(`../../src/i18n/locales/${code}/${file}`, import.meta.url), 'utf8') ), ]) ), ]) ) -function setup(extra = {}) { - const data = new Map() +function setup(extra: Partial[0]> = {}) { + const data = new Map() return createLocaleRuntime({ - meta, + meta: localeMetadata, resources, scope: 'test:api', - storage: { get: (k) => data.get(k), set: (k, v) => data.set(k, v) }, + storage: { get: (k) => data.get(k) ?? null, set: (k, v) => data.set(k, v) }, ...extra, }) } @@ -38,32 +37,32 @@ test('profile heading resolves to text without replacing nested profile messages 'utf8' ) const headingKey = profile.match(/\{\{ \$t\('([^']+)'\) \}\}<\/span>/)?.[1] - assert.ok(headingKey, 'profile card must have a translated heading') + if (!headingKey) throw new Error('Profile card must have a translated heading') const runtime = setup() for (const [locale, title] of [ ['zh-CN', '个人中心'], ['en-US', 'Profile'], ]) { await runtime.setPreference(locale) - assert.equal(runtime.t(headingKey), title) - assert.equal(typeof resources[locale].system.profile.noPost, 'string') - assert.equal(typeof resources[locale].system.profile.noRole, 'string') + expect(runtime.t(headingKey)).toBe(title) + expect(typeof resources[locale].system.profile.noPost).toBe('string') + expect(typeof resources[locale].system.profile.noRole).toBe('string') } }) test('canonical locales, explicit aliases, and precise region fallback', () => { const runtime = setup() - assert.equal(normalizeLocale('en_us'), 'en-US') - assert.equal(normalizeLocale('../en'), null) - assert.equal(normalizeLocale('x-acme'), 'x-acme') - assert.equal(runtime.registry.resolve('en'), 'en-US') - assert.equal(runtime.registry.resolve('zh-TW'), 'zh-CN') - assert.equal(runtime.registry.resolve('auto', ['ja-JP', 'en-US']), 'en-US') + expect(normalizeLocale('en_us')).toBe('en-US') + expect(normalizeLocale('../en')).toBe(null) + expect(normalizeLocale('x-acme')).toBe('x-acme') + expect(runtime.registry.resolve('en')).toBe('en-US') + expect(runtime.registry.resolve('zh-TW')).toBe('zh-CN') + expect(runtime.registry.resolve('auto', ['ja-JP', 'en-US'])).toBe('en-US') }) test('third language is configured, not a two-language branch', async () => { const expanded = { - ...meta, + ...localeMetadata, locales: [ - ...meta.locales, + ...localeMetadata.locales, { code: 'ja-JP', nativeName: '日本語', @@ -79,76 +78,76 @@ test('third language is configured, not a two-language branch', async () => { resources: { ...resources, 'ja-JP': { common: { language: '言語' } } }, }) await runtime.setPreference('ja-JP') - assert.equal(runtime.locale, 'ja-JP') - assert.equal(runtime.t('common:language'), '言語') - assert.equal(runtime.headers['Accept-Language'], 'ja-JP') - assert.equal(runtime.resolveText('原名', { 'en-US': 'Fallback name' }), 'Fallback name') + expect(runtime.locale).toBe('ja-JP') + expect(runtime.t('common:language')).toBe('言語') + expect(runtime.headers['Accept-Language']).toBe('ja-JP') + expect(runtime.resolveText('原名', { 'en-US': 'Fallback name' })).toBe('Fallback name') }) test('save failure leaves active language and preference intact', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - await assert.rejects( + await expect( runtime.setPreference('en-US', { save: async () => { throw Error('network') }, }) - ) - assert.equal(runtime.locale, 'zh-CN') - assert.equal(runtime.preference, 'zh-CN') + ).rejects.toThrow() + expect(runtime.locale).toBe('zh-CN') + expect(runtime.preference).toBe('zh-CN') }) test('an old save cannot overwrite a new account', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - let done + const save = Promise.withResolvers() const pending = runtime.setPreference('en-US', { - save: () => - new Promise((resolve) => { - done = resolve - }), + save: () => save.promise, }) await Promise.resolve() runtime.setAccount(2, 'zh-CN', '0') - done() - await assert.rejects(pending) - assert.equal(runtime.accountId, '2') - assert.equal(runtime.locale, 'zh-CN') + save.resolve() + await expect(pending).rejects.toThrow() + expect(runtime.accountId).toBe('2') + expect(runtime.locale).toBe('zh-CN') }) test('an explicit login choice survives reload and is consumed only by a matching login', async () => { - const data = new Map() - const storage = { get: (key) => data.get(key), set: (key, value) => data.set(key, value) } + const data = new Map() + const storage: Parameters[0]['storage'] = { + get: (key) => data.get(key) ?? null, + set: (key, value) => data.set(key, value), + } const runtime = setup({ storage }) await runtime.setPreference('en-US') const submitted = runtime.loginPreference await runtime.setPreference('auto') runtime.confirmLoginPreference(submitted) - assert.equal(runtime.loginPreference, 'auto') + expect(runtime.loginPreference).toBe('auto') const reloaded = setup({ storage }) reloaded.initialize(false) - assert.equal(reloaded.preference, 'auto') - assert.equal(reloaded.loginPreference, 'auto') + expect(reloaded.preference).toBe('auto') + expect(reloaded.loginPreference).toBe('auto') reloaded.confirmLoginPreference('auto') reloaded.setAccount(1, 'auto', '1') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.loginPreference).toBe(null) await reloaded.setPreference('en-US', { save: async (locale) => ({ locale, revision: '2' }) }) reloaded.setAccount(null) - assert.equal(reloaded.preference, 'en-US') - assert.equal(reloaded.loginPreference, null) + expect(reloaded.preference).toBe('en-US') + expect(reloaded.loginPreference).toBe(null) const next = setup({ storage }) next.initialize(false) - assert.equal(next.preference, 'en-US') - assert.equal(next.loginPreference, null) + expect(next.preference).toBe('en-US') + expect(next.loginPreference).toBe(null) next.setAccount(2, 'fr-CA', '0') - assert.equal(next.preference, 'fr-CA') - assert.equal(next.locale, 'zh-CN') + expect(next.preference).toBe('fr-CA') + expect(next.locale).toBe('zh-CN') }) test('auto follows changed device locale without changing the preference', async () => { let device = 'en-US' const runtime = setup({ deviceLocales: () => [device] }) - const languages = [] - const preferences = [] + const languages: string[] = [] + const preferences: string[] = [] runtime.engine.on('languageChanged', (code) => languages.push(code)) runtime.engine.on('preferenceChanged', (value) => preferences.push(value)) await runtime.setPreference('auto') @@ -158,17 +157,17 @@ test('auto follows changed device locale without changing the preference', async device = 'zh-CN' runtime.refreshDeviceLocale() runtime.refreshDeviceLocale() - assert.deepEqual(languages, ['en-US', 'zh-CN']) - assert.deepEqual(preferences, ['auto']) - assert.equal(runtime.preference, 'auto') - assert.equal(runtime.locale, 'zh-CN') - assert.equal(oldHeaders['Accept-Language'], 'en-US') + expect(languages).toStrictEqual(['en-US', 'zh-CN']) + expect(preferences).toStrictEqual(['auto']) + expect(runtime.preference).toBe('auto') + expect(runtime.locale).toBe('zh-CN') + expect(oldHeaders['Accept-Language']).toBe('en-US') }) test('preference switches are serialized and recover after failed requests', async () => { const runtime = setup() runtime.setAccount(1, 'zh-CN', '0') - const seen = [] - const save = async (value) => { + const seen: string[] = [] + const save = async (value: string) => { seen.push(value) return { locale: value, revision: String(seen.length) } } @@ -176,17 +175,18 @@ test('preference switches are serialized and recover after failed requests', asy runtime.setPreference('en-US', { save }), runtime.setPreference('zh-CN', { save }), ]) - assert.deepEqual(seen, ['en-US', 'zh-CN']) - assert.equal(runtime.locale, 'zh-CN') + expect(seen).toStrictEqual(['en-US', 'zh-CN']) + expect(runtime.locale).toBe('zh-CN') }) test('fallback cycles and missing resources fail at registration', () => { - assert.throws( - () => - createLocaleRegistry( - { ...meta, locales: meta.locales.map((item) => ({ ...item, fallback: [item.code] })) }, - resources - ), - /cycle/ - ) - assert.throws(() => createLocaleRegistry(meta, {}), /Missing/) + expect(() => + createLocaleRegistry( + { + ...localeMetadata, + locales: localeMetadata.locales.map((item) => ({ ...item, fallback: [item.code] })), + }, + resources + ) + ).toThrow(/cycle/) + expect(() => createLocaleRegistry(localeMetadata, {})).toThrow(/Missing/) }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.ts similarity index 74% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.ts index 217984772..fdd26e541 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/uploads.test.ts @@ -1,17 +1,16 @@ import { stripTypeScriptTypes } from 'node:module' -import assert from 'node:assert/strict' import { readFileSync } from 'node:fs' -import { test } from 'node:test' +import { expect, test } from 'vitest' import { computed, h, reactive, nextTick } from 'vue' import { parse, compileScript } from '@vue/compiler-sfc' import { transformSync } from 'esbuild' -import { testLocale } from './localeFixture.mjs' +import { testLocale } from './localeFixture.ts' const state = reactive({ locale: testLocale.locale }) testLocale.engine.on('languageChanged', (locale) => { state.locale = locale }) -const t = (key, params) => { +const t = (...[key, params]: Parameters) => { void state.locale return testLocale.t(key, params) } @@ -33,7 +32,8 @@ test('native upload components obtain fresh headers and leave in-flight snapshot // Compile the actual component as well as evaluating its header expression. const { descriptor } = parse(source) compileScript(descriptor, { id: name, inlineTemplate: true }) - const declaration = source.match(/const headers = (computed\(getUploadHeaders\))/)[1] + const declaration = source.match(/const headers = (computed\(getUploadHeaders\))/)?.[1] + if (!declaration) throw new Error('Missing declaration in component source') const headers = new Function('computed', 'getUploadHeaders', `return ${declaration}`)( computed, getUploadHeaders @@ -42,9 +42,9 @@ test('native upload components obtain fresh headers and leave in-flight snapshot const original = headers.value await testLocale.setPreference('en-US') await nextTick() - assert.equal(headers.value['Accept-Language'], 'en-US', name) - assert.equal(headers.value.Authorization, 'Bearer token', name) - assert.equal(original['Accept-Language'], 'zh-CN', name) + expect(headers.value['Accept-Language'], name).toBe('en-US') + expect(headers.value.Authorization, name).toBe('Bearer token') + expect(original['Accept-Language'], name).toBe('zh-CN') } }) @@ -53,13 +53,14 @@ test('editor CSS text changes language without changing the document', async () new URL('../../src/components/Editor/index.vue', import.meta.url), 'utf8' ) - const expression = source.match(/const editorLocaleStyles = (computed\([\s\S]*?\n\}\)\))/)[1] + const expression = source.match(/const editorLocaleStyles = (computed\([\s\S]*?\n\}\)\))/)?.[1] + if (!expression) throw new Error('Missing expression in component source') const styles = new Function('computed', 't', `return ${expression}`)(computed, t) await testLocale.setPreference('zh-CN') - assert.equal(styles.value['--editor-save'], '"保存"') + expect(styles.value['--editor-save']).toBe('"保存"') await testLocale.setPreference('en-US') - assert.equal(styles.value['--editor-save'], '"Save"') - assert.equal(styles.value['--editor-heading1'], '"Heading 1"') + expect(styles.value['--editor-save']).toBe('"Save"') + expect(styles.value['--editor-heading1']).toBe('"Heading 1"') }) test('pasted editor images capture the language separately for each request', async () => { @@ -71,7 +72,7 @@ test('pasted editor images capture the language separately for each request', as source.indexOf('function insertImage('), source.indexOf('') ) - const sent = [] + const sent: Record[] = [] const insertImage = new Function( 'axios', 'uploadUrl', @@ -81,7 +82,7 @@ test('pasted editor images capture the language separately for each request', as `${transformSync(functionSource, { loader: 'ts' }).code}; return insertImage` )( { - post: (_url, _data, options) => { + post: (_url: string, _data: FormData, options: { headers: Record }) => { sent.push(options.headers) return { then() {} } }, @@ -97,8 +98,8 @@ test('pasted editor images capture the language separately for each request', as insertImage({ name: 'first.png' }) await testLocale.setPreference('en-US') insertImage({ name: 'second.png' }) - assert.equal(sent[0]['Accept-Language'], 'zh-CN') - assert.equal(sent[1]['Accept-Language'], 'en-US') + expect(sent[0]['Accept-Language']).toBe('zh-CN') + expect(sent[1]['Accept-Language']).toBe('en-US') }) test('import feedback is a text node and preserves literal markup and newlines', () => { @@ -111,11 +112,11 @@ test('import feedback is a text node and preserves literal markup and newlines', source.indexOf('function handleSubmit(') ) const text = 'Row 1: example\nRow 2' - let message + const messages: import('vue').VNode[] = [] const bindings = { ElMessageBox: { - alert(node) { - message = node + alert(node: import('vue').VNode) { + messages.push(node) }, }, h, @@ -131,9 +132,10 @@ test('import feedback is a text node and preserves literal markup and newlines', ...Object.values(bindings) ) handleSuccess({ msg: text }) - assert.equal(message.type, 'div') - assert.equal(message.children, text) - assert.equal(message.props.innerHTML, undefined) + const message = messages[0] + expect(message.type).toBe('div') + expect(message.children).toBe(text) + expect(message.props?.innerHTML).toBe(undefined) }) test('download errors retain server detail and have a translated string fallback', () => { @@ -144,9 +146,9 @@ test('download errors retain server detail and have a translated string fallback .replace('export default errorCode', '') .replace('export function getResponseMessage', 'return function getResponseMessage') const getResponseMessage = new Function('t', source)(t) - assert.equal(getResponseMessage({ code: 403, msg: 'Specific message' }), 'Specific message') - assert.equal(typeof getResponseMessage({ code: 403 }), 'string') + expect(getResponseMessage({ code: 403, msg: 'Specific message' })).toBe('Specific message') + expect(typeof getResponseMessage({ code: 403 })).toBe('string') const fallback = getResponseMessage({ code: 999, msg: ' ' }) - assert.equal(typeof fallback, 'string') - assert.ok(fallback.trim()) + expect(typeof fallback).toBe('string') + expect(fallback.trim()).toBeTruthy() }) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.mjs deleted file mode 100644 index 54450160c..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.mjs +++ /dev/null @@ -1,23 +0,0 @@ -import assert from 'node:assert/strict' -import { readFileSync } from 'node:fs' -import { test } from 'node:test' -import { testLocale } from './localeFixture.mjs' - -const userPage = readFileSync( - new URL('../../src/views/system/user/index.vue', import.meta.url), - 'utf8' -) -const passwordItem = userPage.match(/]*\bprop="password"[^>]*>/)[0] -const passwordLabel = new Function('$t', `return ${passwordItem.match(/:label="([^"]+)"/)[1]}`) - -for (const [locale, expected] of [ - ['zh-CN', '用户密码'], - ['en-US', 'Password'], -]) { - test(`the actual user password field resolves to a string label in ${locale}`, async () => { - await testLocale.setPreference(locale) - assert.equal(passwordLabel(testLocale.t), expected) - assert.equal(typeof testLocale.t('system:password.prompt', { name: 'test-user' }), 'string') - assert.match(testLocale.t('system:password.prompt', { name: 'test-user' }), /test-user/) - }) -} diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.ts b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.ts new file mode 100644 index 000000000..29b0300cc --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/user-fields.test.ts @@ -0,0 +1,24 @@ +import { readFileSync } from 'node:fs' +import { expect, test } from 'vitest' +import { testLocale } from './localeFixture.ts' + +const userPage = readFileSync( + new URL('../../src/views/system/user/index.vue', import.meta.url), + 'utf8' +) +const passwordItem = userPage.match(/]*\bprop="password"[^>]*>/)?.[0] +const labelExpression = passwordItem?.match(/:label="([^"]+)"/)?.[1] +if (!labelExpression) throw new Error('Missing password field label') +const passwordLabel = new Function('$t', `return ${labelExpression}`) + +for (const [locale, expected] of [ + ['zh-CN', '用户密码'], + ['en-US', 'Password'], +]) { + test(`the actual user password field resolves to a string label in ${locale}`, async () => { + await testLocale.setPreference(locale) + expect(passwordLabel(testLocale.t)).toBe(expected) + expect(typeof testLocale.t('system:password.prompt', { name: 'test-user' })).toBe('string') + expect(testLocale.t('system:password.prompt', { name: 'test-user' })).toMatch(/test-user/) + }) +} diff --git a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.ts similarity index 81% rename from ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.ts index 9f68ee735..601a95f8b 100644 --- a/ruoyi-fastapi-frontend/vue2/web/tests/i18n/workspace.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/workspace.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, readFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { basename, join, dirname, sep } from 'node:path' @@ -14,12 +14,12 @@ const cli = join(dirname(require.resolve('@x18n/cli/package.json')), 'bin.mjs') test('host and plugin checks use independent declared language sets', async () => { const root = await mkdtemp(join(tmpdir(), 'ruoyi-plugin-locales-')) const rootUrl = pathToFileURL(root + sep) - const write = async (file, text) => { + const write = async (file: string, text: string) => { const path = join(root, file) await mkdir(dirname(path), { recursive: true }) await writeFile(path, text) } - const metadata = (codes) => ({ + const metadata = (codes: string[]) => ({ sourceLocale: 'zh-CN', defaultLocale: 'zh-CN', locales: codes.map((code) => ({ @@ -52,39 +52,35 @@ test('host and plugin checks use independent declared language sets', async () = await write('src/example.js', "t('common:greeting')") await write('plugins/ai/views/example.js', "t('plugin.ai:greeting')") const projects = await checkLocaleRegistration(rootUrl) - assert.deepEqual( - projects.map((project) => project.locales.length), - [3, 2] - ) + expect(projects.map((project) => project.locales.length)).toStrictEqual([3, 2]) const check = () => { const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + return { status: result.status, report: JSON.parse(result.stdout) as CliReport } } const valid = check() - assert.equal(valid.status, 0, JSON.stringify(valid.report)) - assert.deepEqual( - valid.report.data.projects.map((project) => [project.name, project.coverage.length]), - [ - ['plugins/ai', 2], - [basename(root), 3], - ] - ) + expect(valid.status, JSON.stringify(valid.report)).toBe(0) + expect( + valid.report.data.projects.map((project) => [project.name, project.coverage.length]) + ).toStrictEqual([ + ['plugins/ai', 2], + [basename(root), 3], + ]) await write( 'plugins/ai/locale-meta.json', JSON.stringify(metadata(['zh-CN', 'en-US', 'ja-JP'])) ) - await assert.rejects(checkLocaleRegistration(rootUrl), /ja-JP/) + await expect(checkLocaleRegistration(rootUrl)).rejects.toThrow(/ja-JP/) await write('plugins/ai/locales/ja-JP.json', JSON.stringify({ greeting: '' })) const missing = check() - assert.equal(missing.status, 1) - assert.ok( + expect(missing.status).toBe(1) + expect( missing.report.diagnostics.some( (item) => item.code === 'empty-translation' && item.locale === 'ja-JP' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } -}) +}, 30000) diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.mjs b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.ts similarity index 75% rename from ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.mjs rename to ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.ts index 10907693d..712996263 100644 --- a/ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.mjs +++ b/ruoyi-fastapi-frontend/vue3/web/tests/i18n/x18n.test.ts @@ -1,5 +1,5 @@ -import assert from 'node:assert/strict' -import { test } from 'node:test' +import type { CliReport } from '../../../../../ruoyi-fastapi-test/frontend/x18n-report' +import { expect, test } from 'vitest' import { mkdtemp, writeFile, mkdir, rm } from 'node:fs/promises' import { tmpdir } from 'node:os' import { join, dirname } from 'node:path' @@ -17,7 +17,7 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a items_other: '{{count}} items', routeTitle: 'Home', } - async function catalog(code, values) { + async function catalog(code: string, values: Record) { const dir = join(root, 'locales', code) await mkdir(dir, { recursive: true }) await writeFile(join(dir, 'common.json'), JSON.stringify(values)) @@ -26,7 +26,8 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a const result = spawnSync(process.execPath, [cli, '--root', root, 'check', '--json'], { encoding: 'utf8', }) - return { status: result.status, report: JSON.parse(result.stdout) } + const report: CliReport = JSON.parse(result.stdout) + return { status: result.status, report } } try { await writeFile( @@ -62,34 +63,38 @@ test('the pinned x18n CLI scans framework calls and fails on broken catalogs', a "const route = { meta: { titleKey: 'common:routeTitle' } }" ) let result = check() - assert.equal(result.status, 0, JSON.stringify(result.report.errors)) - assert.equal(result.report.data.projects[0].coverage.length, 3) - assert.ok( + expect(result.status, JSON.stringify(result.report.errors)).toBe(0) + expect(result.report.data.projects[0].coverage.length).toBe(3) + expect( result.report.data.projects[0].coverage.every((item) => item.total > 0 && item.missing === 0) - ) - assert.ok(!result.report.diagnostics.some((item) => item.code === 'unused-key')) + ).toBeTruthy() + expect(!result.report.diagnostics.some((item) => item.code === 'unused-key')).toBeTruthy() await catalog('en-US', { items_one: english.items_one, items_other: english.items_other }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-translation')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'missing-translation') + ).toBeTruthy() await catalog('en-US', { ...english, greeting: 'Hello' }) result = check() - assert.equal(result.status, 1) - assert.ok(result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch')) + expect(result.status).toBe(1) + expect( + result.report.diagnostics.some((item) => item.code === 'placeholder-mismatch') + ).toBeTruthy() await writeFile(join(root, 'src/missing.js'), "t('common:missing')") result = check() - assert.ok(result.report.diagnostics.some((item) => item.code === 'missing-key')) + expect(result.report.diagnostics.some((item) => item.code === 'missing-key')).toBeTruthy() await writeFile( join(root, 'src/routes.js'), "const route = { meta: { titleKey: 'common:missingRoute' } }" ) result = check() - assert.ok( + expect( result.report.diagnostics.some( (item) => item.code === 'missing-key' && item.key === 'common:missingRoute' ) - ) + ).toBeTruthy() } finally { await rm(root, { recursive: true, force: true }) } -}) +}, 30000) diff --git a/ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.ts similarity index 50% rename from ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.js rename to ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.ts index 84435f0d7..7e98bdffa 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/job/job-form.test.js +++ b/ruoyi-fastapi-frontend/vue3/web/tests/job/job-form.test.ts @@ -1,5 +1,4 @@ -import assert from 'node:assert/strict' -import test from 'node:test' +import { expect, test } from 'vitest' import { buildJobPayload, parseJobParameter } from '../../src/utils/job.ts' test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为数组和对象', () => { @@ -13,16 +12,16 @@ test('JSON参数保持嵌套值类型和字符串内逗号,提交时转换为 jobStore: 'redis', } const payload = buildJobPayload(form) - assert.deepEqual(payload.jobArgs, ['tenant,a', 3, true, { nested: [null, 2] }]) - assert.deepEqual(payload.jobKwargs, { enabled: false, limit: 30 }) - assert.equal(payload.misfireGraceTime, null) - assert.equal(payload.jobGroup, '报表') - assert.equal(payload.jobStore, 'redis') - assert.equal(typeof form.jobArgs, 'string') + expect(payload.jobArgs).toStrictEqual(['tenant,a', 3, true, { nested: [null, 2] }]) + expect(payload.jobKwargs).toStrictEqual({ enabled: false, limit: 30 }) + expect(payload.misfireGraceTime).toBe(null) + expect(payload.jobGroup).toBe('报表') + expect(payload.jobStore).toBe('redis') + expect(typeof form.jobArgs).toBe('string') }) test('无参数使用空数组和空对象', () => { - assert.deepEqual(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' }), { + expect(buildJobPayload({ jobArgs: '[]', jobKwargs: '{}' })).toStrictEqual({ jobArgs: [], jobKwargs: {}, }) @@ -30,10 +29,10 @@ test('无参数使用空数组和空对象', () => { test('错误的JSON格式和参数结构返回对应字段提示', () => { for (const value of ['', 'a,b', '{broken', '{}', 'true', 'null']) { - assert.throws(() => parseJobParameter(value, 'jobArgs'), /位置参数必须是JSON数组/) + expect(() => parseJobParameter(value, 'jobArgs')).toThrow(/位置参数必须是JSON数组/) } for (const value of ['', '[1]', 'true', 'null', '{broken']) { - assert.throws(() => parseJobParameter(value, 'jobKwargs'), /关键字参数必须是JSON对象/) + expect(() => parseJobParameter(value, 'jobKwargs')).toThrow(/关键字参数必须是JSON对象/) } - assert.throws(() => parseJobParameter('[1e999]', 'jobArgs'), /数字超出可表示范围/) + expect(() => parseJobParameter('[1e999]', 'jobArgs')).toThrow(/数字超出可表示范围/) }) diff --git a/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.js b/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.ts similarity index 62% rename from ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.js rename to ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.ts index c20e5e31c..6a23da2fb 100644 --- a/ruoyi-fastapi-frontend/react/web/tests/plugins/fixtures/json-only-host.js +++ b/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/json-only-host.ts @@ -1,11 +1,22 @@ -import assert from 'node:assert/strict' +import type { BridgeMessage } from './messageWindows' +import { expect } from 'vitest' // 最小 bridge v1 JSON 宿主协议夹具,不是历史宿主实现的源码快照。 // 固定旧消息形状;可传入未知能力版本,验证新客户端不会据此发起未协商请求。 -export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabilities }) { +export function createJsonOnlyHost({ + hostWindow, + childWindow, + origin, + capabilities, +}: { + hostWindow: Window + childWindow: Window + origin: string + capabilities?: unknown +}) { const instance = 'json-host-protocol-v1' - const calls = [] - const send = (type, payload, id) => { + const calls: BridgeMessage[] = [] + const send = (type: string, payload: unknown, id?: string) => { childWindow.postMessage( { namespace: 'ruoyi.plugin', @@ -19,21 +30,21 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti origin ) } - const listener = (event) => { - assert.equal(event.origin, origin) - assert.equal(event.source, childWindow) + const listener = (event: MessageEvent) => { + expect(event.origin).toBe(origin) + expect(event.source).toBe(childWindow) const message = event.data - assert.equal(message.namespace, 'ruoyi.plugin') - assert.equal(message.version, 1) - assert.equal(message.pluginId, 'demo') - assert.ok( + expect(message.namespace).toBe('ruoyi.plugin') + expect(message.version).toBe(1) + expect(message.pluginId).toBe('demo') + expect( Object.keys(message).every((key) => ['namespace', 'version', 'pluginId', 'type', 'instance', 'payload', 'id'].includes(key) ) - ) + ).toBe(true) if (message.type === 'ready') { - assert.equal(message.instance, '') - assert.deepEqual(Object.keys(message.payload), ['clientId']) + expect(message.instance).toBe('') + expect(Object.keys(message.payload)).toStrictEqual(['clientId']) send('initialize', { clientId: message.payload.clientId, uiBase: '/apps/demo/ui/', @@ -42,7 +53,7 @@ export function createJsonOnlyHost({ hostWindow, childWindow, origin, capabiliti }) return } - assert.equal(message.instance, instance) + expect(message.instance).toBe(instance) if (message.type === 'cancel') return calls.push(message) send( diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/messageWindows.ts b/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/messageWindows.ts new file mode 100644 index 000000000..c05260bbd --- /dev/null +++ b/ruoyi-fastapi-frontend/vue3/web/tests/plugins/fixtures/messageWindows.ts @@ -0,0 +1,57 @@ +import { expect } from 'vitest' + +export interface BridgeMessage { + namespace: string + pluginId: string + version: number + sdkVersion?: string + id?: string + type: string + instance: string + payload: Record +} + +interface MessageEventFixture { + data: unknown + source: unknown + origin: string +} + +function createWindow() { + const listeners = new Set<(event: MessageEventFixture) => void>() + const mock = { + listeners, + messages: [] as BridgeMessage[], + addEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.add(listener) + }, + removeEventListener(type: string, listener: (event: MessageEventFixture) => void) { + if (type === 'message') listeners.delete(listener) + }, + dispatch(event: MessageEventFixture) { + for (const listener of [...listeners]) listener(event) + }, + } + // The SDK requires a Window and only uses its messaging methods. + return mock as typeof mock & Window +} + +export function createMessageWindows(origin: string) { + const hostWindow = createWindow() + const childWindow = createWindow() + for (const [target, source] of [ + [hostWindow, childWindow], + [childWindow, hostWindow], + ]) { + target.postMessage = ( + message: BridgeMessage, + targetOrigin?: string | WindowPostMessageOptions + ) => { + expect(targetOrigin, 'all messages must name an exact origin').toBe(origin) + const data = structuredClone(message) + target.messages.push(data) + queueMicrotask(() => target.dispatch({ data, source, origin })) + } + } + return { hostWindow, childWindow } +} diff --git a/ruoyi-fastapi-frontend/vue3/web/tests/plugins/monacoEnvironment.test.js b/ruoyi-fastapi-frontend/vue3/web/tests/plugins/monacoEnvironment.test.js deleted file mode 100644 index 880a9acaf..000000000 --- a/ruoyi-fastapi-frontend/vue3/web/tests/plugins/monacoEnvironment.test.js +++ /dev/null @@ -1,32 +0,0 @@ -import assert from 'node:assert/strict' - -import createMonacoEnvironment from '../../vite/plugins/monaco-environment.ts' - -const plugin = createMonacoEnvironment() -const transform = plugin.transformIndexHtml.handler - -const monacoHtml = ` - - - - - -` - -const transformedHtml = transform(monacoHtml) - -assert.match(transformedHtml, / + + +` + + const transformedHtml = transform(monacoHtml) + + expect(transformedHtml).toMatch(/