// npm package
@antv/g6-core
A Graph Visualization Framework in JavaScript
weekly
70,761
monthly
260,749
versions
122
maintainers
51
license
MIT
first publish
2020-12-30
publisher
iaaron
tarball
1,197,772 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-12-12
// publisher campaignby iaaron
9 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 8 other packages that our pipeline flagged — the shape of a coordinated campaign, not a one-off. Each link below opens that sibling's analysis.
// offending code· @0.8.24· no static-pattern hits
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 3 known-vendor host(s), 1 other host(s).
- @0.8.24··AUTO-PUBLISHED·publisher: iaaronheuristic 75/100static flags 0llm benign (0.85) via ollamarecent-owner-changepopularity:very-highmature-packageosv-flagged:MAL-2026-3985
→ No suspicious destination, no remote-exec shape — 3 known-vendor host(s), 1 other host(s).
// offending code· no static-pattern hits
--- package.json (entry) --- { "name": "@antv/g6-core", "version": "0.8.24", "description": "A Graph Visualization Framework in JavaScript", "keywords": [ "antv", "g6", "graph", "graph analysis", "graph editor", "graph visualization", "relational data" ], "homepage": "https://g6.antv.antgroup.com/", "bugs": { "url": "https://github.com/antvis/g6/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/g6" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "files": [ "package.json", "es", "lib", "dist", "LICENSE", "README.md" ], "main": "lib/index.js", "module": "es/index.js", "types": "lib/index.d.ts", "husky": { "hooks": { "pre-commit": "lint-staged & npm run test" } }, "lint-staged": { "**/*.{js,jsx,ts,tsx}": [ "npm run lint-staged:js" ] }, "dependencies": { "@antv/algorithm": "^0.1.26", "@antv/dom-util": "^2.0.1", "@antv/event-emitter": "~0.1.0", "@antv/g-base": "^0.5.1", "@antv/g-math": "^0.1.1", "@antv/matrix-util": "^3.1.0-beta.3", "@antv/path-util": "^2.0.3", "@antv/util": "~2.0.5", "ml-matrix": --- index.js (entry) --- "use strict"; function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { registerNode: true, registerCombo: true, registerEdge: true, registerBehavior: true, BaseGlobal: true, AbstractGraph: true, Shape: true, Arrow: true, Marker: true, Util: true, AbstractLayout: true, AbstractEvent: true, Node: true, Edge: true, Hull: true, Combo: true }; Object.defineProperty(exports, "AbstractEvent", { enumerable: true, get: function get() { return _event.default; } }); Object.defineProperty(exports, "AbstractGraph", { enumerable: true, get: function get() { return _graph.default; } }); Object.defineProperty(exports, "AbstractLayout", { enumerable: true, get: function get() { return _layout.default; } }); Object.defineProperty(exports, "Arrow", { enumerable: true, get: function get() { --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- lib/element/nodes/simple-circle.js (bundled) --- "use strict"; var _tslib = require("tslib"); var _util = require("@antv/util"); var _global = _interopRequireDefault(require("../../global")); var _shape = _interopRequireDefault(require("../shape")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // 带有图标的圆,可用于拓扑图中 _shape.default.registerNode('simple-circle', { // 自定义节点时的配置 options: { size: _global.default.defaultNode.size, style: { x: 0, y: 0, stroke: _global.default.defaultNode.style.stroke, fill: _global.default.defaultNode.style.fill, lineWidth: _global.default.defaultNode.style.lineWidth }, labelCfg: { style: { fill: _global.default.nodeLabel.style.fill, fontSize: _global.default.nodeLabel.style.fontSize, fontFamily: _global.default.windowFontFamily } }, stateStyles: (0, _tslib.__assign)({}, _global.default.nodeStateStyles) }, shapeType: 'simple-circle', // 文本位置 labelPosition: 'center', shapeMap: {}, drawShape: function drawShape(cfg, group) { var style = this.getShapeStyle(cfg); var name = "".concat(this.type, "-keyShape"); var keyShape = group.addShape('circle', { attrs: style, className: "".concat(this.type, "-keyShape"), name: name, draggable: true }); group['shapeMap'][name] = keyShape; return keyShape; }, /** * 获取节点的样式,供基于该节点自定义时使用 * @param {Object} cfg 节点数据模型 * @return {Object} 节点的样式 */ getShapeStyle: function getShapeStyle(cfg) { var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style; var strokeStyle = { stroke: cfg.color }; // 如果设置了color,则覆盖默认的stroke属性 var style = (0, _util.deepMix)({}, defaultStyle, strokeStyle); var size = this.getSize(cfg); var r = size[0] / 2; var styles = (0, _tslib.__assign)({ x: 0, y: 0, r: r }, style); return styles; }, update: function update(cfg, item, updateType) { var size --- es/element/nodes/simple-circle.js (bundled) --- import { __assign } from "tslib"; import { deepMix } from '@antv/util'; import Global from '../../global'; import Shape from '../shape'; // 带有图标的圆,可用于拓扑图中 Shape.registerNode('simple-circle', { // 自定义节点时的配置 options: { size: Global.defaultNode.size, style: { x: 0, y: 0, stroke: Global.defaultNode.style.stroke, fill: Global.defaultNode.style.fill, lineWidth: Global.defaultNode.style.lineWidth }, labelCfg: { style: { fill: Global.nodeLabel.style.fill, fontSize: Global.nodeLabel.style.fontSize, fontFamily: Global.windowFontFamily } }, stateStyles: __assign({}, Global.nodeStateStyles) }, shapeType: 'simple-circle', // 文本位置 labelPosition: 'center', shapeMap: {}, drawShape: function drawShape(cfg, group) { var style = this.getShapeStyle(cfg); var name = "".concat(this.type, "-keyShape"); var keyShape = group.addShape('circle', { attrs: style, className: "".concat(this.type, "-keyShape"), name: name, draggable: true }); group['shapeMap'][name] = keyShape; return keyShape; }, /** * 获取节点的样式,供基于该节点自定义时使用 * @param {Object} cfg 节点数据模型 * @return {Object} 节点的样式 */ getShapeStyle: function getShapeStyle(cfg) { var defaultStyle = (this.mergeStyle || this.getOptions(cfg)).style; var strokeStyle = { stroke: cfg.color }; // 如果设置了color,则覆盖默认的stroke属性 var style = deepMix({}, defaultStyle, strokeStyle); var size = this.getSize(cfg); var r = size[0] / 2; var styles = __assign({ x: 0, y: 0, r: r }, style); return styles; }, update: function update(cfg, item, updateType) { var size = this.getSize(cfg); // 下面这些属性需要覆盖默认样式与目前样式,但若在 cfg 中有指定则应该被 cfg 的相应配置覆盖。 var strokeStyle = { stroke: cfg.color, r: size[0] / 2 }; // 与 getShapeStyle 不同在于,update 时需要获取到当前的 style 进行融合。即新传入的配置项中没有涉及的属性,保留当前的配置。 var keyShape = item.get('keyShape');
