mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-09-19 10:11:36 +08:00
api-contracts.test.ts now covers command/event modules and routes them
through crud* shorthand mocks. sampleArgs becomes an explicit registry
(with the heuristic kept as a fallback) so newly added wrappers can pin
their argument shape without waiting for a regex collision to surface.
Adds two AI guardrails: (1) src/api/** is forbidden from declaring
`getXxxList*` collections, locking in the rename from the previous
commit; (2) toBeTruthy/toBeFalsy are flagged across `*.test.ts` and
`*.spec.ts` so the e2e suite can't silently slip in weak assertions —
destructive-delete migrates to the equivalent `not.toBe('')` form.
Picks up the previously untested `prettyJson` helper and broadens
thing-model-format-util tests to cover the new alarm formatters.
package.json gets `type-check` and `test:coverage` aliases that the
new guardrail expects.
126 lines
3.6 KiB
JSON
126 lines
3.6 KiB
JSON
{
|
|
"name": "iot-dc3-web",
|
|
"version": "2026.5.22",
|
|
"private": true,
|
|
"author": "pnoker",
|
|
"description": "IoT DC3 平台前端页面",
|
|
"license": "Apache-2.0",
|
|
"homepage": "https://github.com/pnoker/iot-dc3-web",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/pnoker/iot-dc3-web.git"
|
|
},
|
|
"keywords": [
|
|
"iot",
|
|
"dc3",
|
|
"web",
|
|
"vue3",
|
|
"typescript",
|
|
"element-plus",
|
|
"tauri"
|
|
],
|
|
"engines": {
|
|
"node": ">=22.0.0"
|
|
},
|
|
"packageManager": "pnpm@11.3.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"prepare": "husky",
|
|
"dev": "vite --host --mode dev",
|
|
"dev:prod": "vite --host --mode production",
|
|
"build": "vite build",
|
|
"build:tauri": "tauri build",
|
|
"preview": "vite preview",
|
|
"check": "vue-tsc --noEmit --skipLibCheck",
|
|
"type-check": "pnpm run check",
|
|
"format": "prettier --write .",
|
|
"format:check": "prettier --check .",
|
|
"lint": "eslint . --fix && prettier --write .",
|
|
"lint:check": "eslint . && prettier --check .",
|
|
"test": "vitest run",
|
|
"test:unit": "vitest run tests/unit",
|
|
"test:api": "vitest run tests/api",
|
|
"test:component": "vitest run tests/component",
|
|
"test:views": "vitest run tests/views",
|
|
"test:guard": "vitest run tests/guardrails",
|
|
"test:impact": "node scripts/testing/changed-test-plan.mjs",
|
|
"test:ci": "vitest run --coverage",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:headed": "E2E_HEADLESS=false playwright test",
|
|
"test:e2e:ui": "playwright test --ui",
|
|
"test:e2e:sweep": "node tests/e2e/browser-sweep.mjs",
|
|
"test:e2e:sweep:headed": "E2E_HEADLESS=false node tests/e2e/browser-sweep.mjs",
|
|
"test:all": "pnpm run test && pnpm run test:e2e",
|
|
"tauri": "tauri",
|
|
"clean": "rimraf dist"
|
|
},
|
|
"dependencies": {
|
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
"@antv/g2": "^5.4.8",
|
|
"@antv/g6": "^5.1.1",
|
|
"@element-plus/icons-vue": "^2.3.2",
|
|
"axios": "^1.16.1",
|
|
"dayjs": "^1.11.20",
|
|
"element-plus": "^2.14.0",
|
|
"highlight.js": "^11.11.1",
|
|
"js-base64": "^3.7.8",
|
|
"js-cookie": "^3.0.7",
|
|
"js-md5": "^0.8.3",
|
|
"json-bigint": "^1.0.0",
|
|
"marked": "^18.0.4",
|
|
"mitt": "^3.0.1",
|
|
"nprogress": "^0.2.0",
|
|
"pinia": "^3.0.4",
|
|
"vue": "^3.5.34",
|
|
"vue-element-plus-x": "^2.0.3",
|
|
"vue-i18n": "^11.4.4",
|
|
"vue-router": "^5.0.7"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@playwright/test": "^1.60.0",
|
|
"@tauri-apps/cli": "^2.11.2",
|
|
"@types/js-cookie": "^3.0.6",
|
|
"@types/json-bigint": "^1.0.4",
|
|
"@types/node": "^25.9.1",
|
|
"@types/nprogress": "^0.2.3",
|
|
"@typescript-eslint/eslint-plugin": "^8.59.4",
|
|
"@typescript-eslint/parser": "^8.59.4",
|
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
"@vitest/coverage-v8": "^4.1.7",
|
|
"@vue/eslint-config-typescript": "^14.7.0",
|
|
"@vue/test-utils": "^2.4.10",
|
|
"eslint": "^10.4.0",
|
|
"eslint-config-prettier": "^10.1.8",
|
|
"eslint-plugin-prettier": "^5.5.5",
|
|
"eslint-plugin-vue": "^10.9.1",
|
|
"globals": "^17.6.0",
|
|
"happy-dom": "^20.9.0",
|
|
"husky": "^9.1.7",
|
|
"lint-staged": "^17.0.5",
|
|
"playwright": "^1.60.0",
|
|
"prettier": "^3.8.3",
|
|
"sass": "^1.100.0",
|
|
"typescript": "~6.0.3",
|
|
"unplugin-auto-import": "^21.0.0",
|
|
"unplugin-vue-components": "^32.1.0",
|
|
"vite": "^8.0.14",
|
|
"vitest": "^4.1.7",
|
|
"vue-eslint-parser": "^10.4.0",
|
|
"vue-tsc": "^3.3.2"
|
|
},
|
|
"lint-staged": {
|
|
"*.{vue,js,mjs,cjs,ts,jsx,tsx}": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
],
|
|
"*.{scss,css}": [
|
|
"prettier --write"
|
|
],
|
|
"*.{json,md,html,yml,yaml}": [
|
|
"prettier --write"
|
|
]
|
|
}
|
|
}
|