xiaozhi-esp32-server/main/manager-web/package.json
lapy cd83c805f5 chore(westernization): add rebase-verification tooling and docs
The October rebase silently shipped runtime-breaking merge artifacts that
neither the web build nor the test suites caught (blank models page,
ReferenceError on role open, broken provider management). Make every one
of those failure classes fail loudly and early:

- manager-web/scripts/integrity-check.js: AST pass (acorn + eslint-scope)
  for undefined identifiers (lost imports, dropped function params and
  const bindings), vue-template-compiler pass for mismatched tags, and a
  duplicate-options-key pass (double 'computed:' clobbering). Negative-
  tested against reproductions of all three shipped bugs.
- manager-web/scripts/check-i18n.js rewritten for the fork: base locale
  is en, locales discovered dynamically, plus a pass that fails when any
  $t('a.b') key referenced in src/ has no definition (upstream rebases
  kept adding views with keys never added downstream).
- scripts/westernization_rebase_check.sh: one-command gate chaining audit,
  integrity, i18n parity, snapshot/contract/unit tests and the production
  build; heavier Java/Python suites run only when toolchains exist.
- scripts/translate_han_llm.py: vendored from the one-off /tmp tool used
  for the translation sweep; repo-relative paths, endpoint/model via
  TRANSLATE_API/TRANSLATE_MODEL env, cache gitignored.
- CI: the Vue job now runs integrity-check, check:i18n, test:snapshot and
  test:contract before test:unit; new nightly Upstream Sync Check workflow
  dry-merges upstream/main into a throwaway branch and runs the same web
  gates so a breaking incoming merge alerts before a human sync.
- westernization.md: tooling table, five known merge-corruption failure
  classes with symptoms and repair strategy, translator usage, updated
  rebase order and good-outcome checklist.

acorn and eslint-scope are now explicit devDependencies.
2026-10-13 11:35:11 +01:00

64 lines
1.8 KiB
JSON

{
"name": "xiaozhi",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"check:i18n": "node scripts/check-i18n.js",
"check:integrity": "node scripts/integrity-check.js",
"test:snapshot": "node --test src/components/agentSnapshotDisplayUtils.test.mjs src/apis/module/agentSnapshotApi.test.mjs",
"build": "vue-cli-service build",
"test:contract": "node --test tests/*Contract.test.mjs",
"test:unit": "vitest run",
"test": "npm run test:contract && npm run test:unit",
"analyze": "cross-env ANALYZE=true vue-cli-service build"
},
"dependencies": {
"core-js": "^3.41.0",
"cross-env": "^7.0.3",
"dotenv": "^16.5.0",
"element-ui": "^2.15.14",
"flyio": "^0.6.14",
"highlight.js": "^11.12.0",
"normalize.css": "^8.0.1",
"opus-decoder": "^0.7.7",
"opus-recorder": "^8.0.5",
"sm-crypto": "^0.4.0",
"v-code-diff": "^1.16.0",
"vue": "^2.6.14",
"vue-axios": "^3.5.2",
"vue-i18n": "^8.28.2",
"vue-router": "^3.6.5",
"vuex": "^3.6.2",
"xiaozhi": "file:"
},
"devDependencies": {
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.26.10",
"@vitest/coverage-v8": "^1.6.0",
"@vue/cli-plugin-router": "~5.0.0",
"@vue/cli-plugin-vuex": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/test-utils": "^1.3.6",
"acorn": "^8.18.0",
"compression-webpack-plugin": "^11.1.0",
"eslint-scope": "^5.1.1",
"jsdom": "^24.1.0",
"sass": "^1.32.7",
"sass-loader": "^12.0.0",
"vitest": "^1.6.0",
"vue-template-compiler": "^2.6.14",
"webpack-bundle-analyzer": "^4.10.2",
"workbox-webpack-plugin": "^7.3.0"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"sideEffects": [
"*.css",
"*.scss",
"*.vue"
]
}