revert: 移除构建期 IME 守卫补丁 — 补丁打在产物上不具持久性
taekchef 的 apply-ime-guard.mjs 在每次 build/prepare/bundle 后把守卫 字符串注入 lib/client.js,但补丁对象是构建产物而非源码: - 裸 tsdown 重建 / 其他构建路径产出无守卫的 bundle(#562 复发根因) - 守卫逻辑游离于源码之外,难以测试与维护 运行时方案(src/client/ime-guard.ts + tests/ime-guard.spec.ts)已在 源码内实现同等守卫,经 document capture 覆盖全部劫持路径,任何构建 方式产物都自带守卫。合并远端提交后撤掉构建期补丁,保留运行时方案。
This commit is contained in:
+3
-3
@@ -51,11 +51,11 @@
|
||||
"src"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown && node scripts/apply-ime-guard.mjs",
|
||||
"build": "rm -rf lib && tsc -p tsconfig.build.json && tsdown",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"bundle": "tsdown && node scripts/apply-ime-guard.mjs",
|
||||
"bundle": "tsdown",
|
||||
"watch": "tsdown --watch",
|
||||
"prepare": "tsdown && node scripts/apply-ime-guard.mjs",
|
||||
"prepare": "tsdown",
|
||||
"test": "vitest run"
|
||||
},
|
||||
"license": "MIT",
|
||||
|
||||
Reference in New Issue
Block a user