fix(ime): 持久化 IME 守卫脚本并挂入 build/prepare/bundle 构建路径

- scripts/apply-ime-guard.mjs 纳入版本库(此前 untracked,重 clone 即丢)
- Univer InputNumber 在 document capture 拦截全页 ↑/↓ 且无 isComposing
  守卫,会摧毁中文输入法组合;prepare/bundle 裸 tsdown 重建会产出无守卫
  的 lib/client.js,2026-08-11 因此复发(dsh-external/issues#562)
- 脚本幂等:已注入则跳过;目标模式匹配不到则 exit 1 显式失败

Fixes #562
This commit is contained in:
taekchef
2026-08-12 03:13:31 +08:00
parent 956fcc005b
commit a465bdee38
2 changed files with 29 additions and 3 deletions
+3 -3
View File
@@ -51,11 +51,11 @@
"src"
],
"scripts": {
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown",
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown && node scripts/apply-ime-guard.mjs",
"typecheck": "tsc --noEmit",
"bundle": "tsdown",
"bundle": "tsdown && node scripts/apply-ime-guard.mjs",
"watch": "tsdown --watch",
"prepare": "tsdown",
"prepare": "tsdown && node scripts/apply-ime-guard.mjs",
"test": "vitest run"
},
"license": "MIT",