tpmjs/packages/tools/official/html-sanitize/package.json
Ajax Davis 17b9ffb6aa chore: version packages
Initial release of 100+ official TPMJS tools
2025-12-31 23:54:47 +10:00

67 lines
1.8 KiB
JSON

{
"name": "@tpmjs/tools-html-sanitize",
"version": "0.1.0",
"description": "Sanitize HTML to prevent XSS attacks using isomorphic-dompurify",
"type": "module",
"keywords": ["tpmjs", "security", "html", "sanitize", "xss", "dompurify"],
"exports": {
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"files": ["dist"],
"scripts": {
"build": "tsup",
"dev": "tsup --watch",
"type-check": "tsc --noEmit",
"clean": "rm -rf dist .turbo"
},
"devDependencies": {
"@tpmjs/tsconfig": "workspace:*",
"tsup": "^8.3.5",
"typescript": "^5.9.3"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/anthropics/tpmjs.git",
"directory": "packages/tools/official/html-sanitize"
},
"homepage": "https://tpmjs.com",
"license": "MIT",
"tpmjs": {
"category": "security",
"frameworks": ["vercel-ai"],
"tools": [
{
"name": "htmlSanitizeTool",
"description": "Sanitize HTML to prevent XSS attacks with customizable allowed tags and attributes",
"parameters": [
{
"name": "html",
"type": "string",
"description": "The HTML string to sanitize",
"required": true
},
{
"name": "options",
"type": "object",
"description": "Optional configuration for allowed tags and attributes",
"required": false
}
],
"returns": {
"type": "HtmlSanitizeResult",
"description": "Object with sanitized HTML, removal count, and warnings about removed elements"
}
}
]
},
"dependencies": {
"ai": "6.0.0-beta.124",
"isomorphic-dompurify": "^2.18.0"
}
}