// npm 패키지
@antv/hierarchy
layout algorithms for visualizing hierarchical data
버전
44
메인테이너
51
라이선스
MIT
최초 publish
2018-04-17
publisher
iaaron
tarball
145,127 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2025-12-25
// publisher 캠페인by iaaron
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @0.7.1· no static-pattern hits
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @0.7.1··AUTO-PUBLISHED·publisher: iaaronheuristic 75/100static flags 0llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-4027
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· no static-pattern hits
--- install scripts --- ### prepublishOnly npm run build --- package.json (entry) --- { "name": "@antv/hierarchy", "version": "0.7.1", "description": "layout algorithms for visualizing hierarchical data", "type": "module", "main": "dist/hierarchy.umd.js", "module": "dist/hierarchy.es.js", "types": "lib/index.d.ts", "exports": { ".": { "types": "./lib/index.d.ts", "import": "./dist/hierarchy.es.js", "require": "./dist/hierarchy.umd.js" } }, "keywords": [ "antv", "hierarchy" ], "files": [ "dist", "lib", "README.md", "LICENSE" ], "browserslist": [ "defaults and supports es6-module", "maintained node versions" ], "scripts": { "build": "vite build", "dev": "vite", "preview": "vite preview", "test": "vitest run", "test:ui": "vitest --ui", "test:watch": "vitest", "type-check": "tsc --noEmit", "lint": "eslint src", "lint:fix": "eslint src --fix", "format": "prettier --write \"src/**/*.{ts,js,json}\"", "format:check": "prettier --check \"src/**/*.{ts,js,json}\"", "prepublishOnly": "npm run build" }, "devDependencies": { "@eslint/js": "^9.39.1", "@types/eslint__js": "^8.42.3", "@types/node": "^20.0.0", "@vitest/ui": "^3. --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/hierarchy.es.js (bundled) --- function t(t,e,i,n="height"){const h=t[n],r=e[n];return"center"===i?(h+r)/2:t.height}const e=Object.assign,i={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class n{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof n||"x"in t&&"y"in t&&"children"in t){const e=t;return this.data=e.data,this.id=e.id,this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this.depth=e.depth,this.children=e.children,this.parent=e.parent,this.hgap=e.hgap,this.vgap=e.vgap,this.preH=e.preH,void(this.preV=e.preV)}this.data=t;const i=e.getHGap(t),h=e.getVGap(t);this.preH=e.getPreH(t),this.preV=e.getPreV(t),this.width=e.getWidth(t),this.height=e.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=e.getId(t),this.addGap(i,h)}isRoot(){return 0===this.depth}isLeaf(){return 0===this.children.length}addGap(t,e){this.hgap+=t,this.vgap+=e,this.width+=2*t,this.height+=2*e}eachNode(t){let e,i=[this];for(;e=i.shift();)t(e),i=e.children.concat(i)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let e,i=[this];for(;e=i.shift();)t(e),i=i.concat(e.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(e=>{t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}translate(t=0,e=0){this.eachNode(i=>{i.x+=t,i.y+=e,i.x+=i.preH,i.y+=i.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(e=>{e.x=e.x-2*(e.x-t.left)-e.width}),this.translate(t.width,0)}bottom2top(){const t=this.getBoundingBox();this.eachNode(e=>{e.y=e.y-2*(e.y-t.top)-e.height}),this.translate(0,t.height)}}function h(t,h={},r){h=e({},i,h);const o=new n(t,h),s=[o];let c;if(!r&&!t.collapsed)for(;c=s.shift();)if(!c.data.collapsed){const t=h.getChild --- dist/hierarchy.umd.js (bundled) --- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Hierarchy={})}(this,function(t){"use strict";function e(t,e,i,n="height"){const h=t[n],o=e[n];return"center"===i?(h+o)/2:t.height}const i=Object.assign,n={getId:t=>t.id||t.name,getPreH:t=>t.preH||0,getPreV:t=>t.preV||0,getHGap:t=>t.hgap||18,getVGap:t=>t.vgap||18,getChildren:t=>t.children,getHeight:t=>t.height||36,getWidth(t){const e=t.label||" ";return t.width||18*e.split("").length}};class h{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof h||"x"in t&&"y"in t&&"children"in t){const e=t;return this.data=e.data,this.id=e.id,this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this.depth=e.depth,this.children=e.children,this.parent=e.parent,this.hgap=e.hgap,this.vgap=e.vgap,this.preH=e.preH,void(this.preV=e.preV)}this.data=t;const i=e.getHGap(t),n=e.getVGap(t);this.preH=e.getPreH(t),this.preV=e.getPreV(t),this.width=e.getWidth(t),this.height=e.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=e.getId(t),this.addGap(i,n)}isRoot(){return 0===this.depth}isLeaf(){return 0===this.children.length}addGap(t,e){this.hgap+=t,this.vgap+=e,this.width+=2*t,this.height+=2*e}eachNode(t){let e,i=[this];for(;e=i.shift();)t(e),i=e.children.concat(i)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let e,i=[this];for(;e=i.shift();)t(e),i=i.concat(e.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(e=>{t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}translate(t=0,e=0){this.eachNode(i=>{i.x+=t,i.y+=e,i.x+=i.preH,i.y+=i.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(e=>{e.x=e.x-2*(e.x-t.left)-e.width}),this.translate(t.width,0)}bottom2top(){const t=thi
