8dd6eaf1b6
sanitize-html@^2(MIT)白名单清洗 + onOpenTag 观察钩子按文档序收集 SanitizeDiff[] (镜像判定从 SANITIZE_CONFIG 单源推导;仪表化与清洗输出字节等价,测试钉死)。 白名单决策冻结:h1/布局标签/内联样式/iframe 拒绝(diff 留痕),外链 img 含 1x1 追踪像素本切片保留(远程依赖报告归 Task 6,路径重写归阶段 3)。 测试 184→204。 Co-Authored-By: Claude Code <noreply@anthropic.com>
28 lines
708 B
JSON
28 lines
708 B
JSON
{
|
|
"name": "@sf/adapter-wp",
|
|
"version": "0.1.0",
|
|
"description": "SiteForge WordPress WXR 适配器:流式解析 + UniversalRow 映射(纯函数包)",
|
|
"type": "module",
|
|
"main": "./dist/src/index.js",
|
|
"types": "./dist/src/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/src/index.d.ts",
|
|
"default": "./dist/src/index.js"
|
|
}
|
|
},
|
|
"scripts": {
|
|
"prebuild": "pnpm --filter @sf/contracts build",
|
|
"build": "tsc -p tsconfig.build.json",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@sf/contracts": "workspace:*",
|
|
"sanitize-html": "^2",
|
|
"saxes": "^6.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/sanitize-html": "^2.16.2"
|
|
}
|
|
}
|