#!/usr/bin/env python3 """Validate 小红书小工具 package constraints before zip upload.""" from __future__ import annotations import re import sys from pathlib import Path ALLOWED_EXT = {".html", ".css", ".js", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".svg", ".woff", ".woff2", ".json"} FORBIDDEN_PATTERNS = [ (re.compile(r"]*\bsrc=)[^>]*>", re.I), "inline