mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-12 12:39:52 +08:00
fix(mcp-server): review fixes for the draw.io file list and its guard
- The list now ships the templates of Insert > Template, the PlantUML parser of Insert > Advanced and the template dialog's icon: the menu items were shown but failed with 404s. 15.1 MB packed; the tarball cap goes from 40 MB to 20 MB, where it still catches a list that grew by a whole js/ directory. - The guard drives both features, fails when the copy it runs against lacks files the editor asked for or when an export does not answer, checks that the copy is the pinned draw.io version, and runs in CI (npm run check-drawio, one E2E shard) so a list regression cannot reach a release.
This commit is contained in:
@@ -13,9 +13,9 @@ const REQUIRED = [
|
||||
"dist/drawio/js/app.min.js",
|
||||
"dist/drawio/LICENSE",
|
||||
]
|
||||
// The bundled draw.io is most of the package; a jump means the file list
|
||||
// grew more than intended
|
||||
const MAX_TARBALL_BYTES = 40 * 1024 * 1024
|
||||
// The bundled draw.io is most of the package (15.1 MB packed with draw.io
|
||||
// v32.0.2); a jump means the file list grew more than intended
|
||||
const MAX_TARBALL_BYTES = 20 * 1024 * 1024
|
||||
|
||||
const output = JSON.parse(
|
||||
execSync("npm pack --dry-run --json", { encoding: "utf8" }),
|
||||
|
||||
Reference in New Issue
Block a user