// npm 패키지
@antv/xflow-diff
English (US) | [简体中文](README.zh-Hans.md)
버전
1
메인테이너
51
최초 publish
2023-11-21
publisher
newbyvector
tarball
68,738 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-11-21
// publisher 캠페인by newbyvector
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @1.0.0· 1 file flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 2 known-vendor host(s).
- @1.0.0··AUTO-PUBLISHED·publisher: newbyvectorheuristic 75/100static flags 1llm benign (0.85) via ollamafirst-version-of-packageosv-flagged:MAL-2026-4120public-github-push
→ 의심 전송지 없음, 원격 실행 형태 없음 — 2 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/xflow-diff", "version": "1.0.0", "description": "", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "types": "dist/typing/index.d.ts", "private": false, "files": [ "dist", "src" ], "keywords": [ "xflow", "x6", "antv" ], "dependencies": { "@antv/xflow": "^2.0.2" }, "devDependencies": { "@types/react": "^18.0.28", "@antv/config-tsconfig": "^0.0.0", "@antv/testing": "^0.0.0", "@antv/config-tsup": "^0.0.0" }, "peerDependencies": { "react": "^18.0.0" }, "bugs": { "url": "https://github.com/antvis/XFlow/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/XFlow.git", "directory": "packages/diff" }, "publishConfig": { "access": "public" }, "scripts": { "setup": "tsup src/index.ts", "build": "tsup src/index.ts", "dev": "tsup src/index.ts --watch", "lint:js": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "lint:css": "stylelint --allow-empty-input 'src/**/*.{css,less}'", "lint:format": "prettier --check *.md *.json 'src/**/*.{js,jsx,ts,tsx,css,less,md,json}'", "lint:typing": "tsc --noEmit", "test": "jest --coverage" } } --- package.json (entry) --- { "name": "@antv/xflow-diff", "version": "1.0.0", "description": "", "main": "dist/index.cjs.js", "module": "dist/index.esm.js", "types": "dist/typing/index.d.ts", "private": false, "files": [ "dist", "src" ], "keywords": [ "xflow", "x6", "antv" ], "dependencies": { "@antv/xflow": "^2.0.2" }, "devDependencies": { "@types/react": "^18.0.28", "@antv/config-tsconfig": "^0.0.0", "@antv/testing": "^0.0.0", "@antv/config-tsup": "^0.0.0" }, "peerDependencies": { "react": "^18.0.0" }, "bugs": { "url": "https://github.com/antvis/XFlow/issues" }, "repository": { "type": "git", "url": "https://github.com/antvis/XFlow.git", "directory": "packages/diff" }, "publishConfig": { "access": "public" }, "scripts": { "setup": "tsup src/index.ts", "build": "tsup src/index.ts", "dev": "tsup src/index.ts --watch", "lint:js": "eslint 'src/**/*.{js,jsx,ts,tsx}'", "lint:css": "stylelint --allow-empty-input 'src/**/*.{css,less}'", "lint:format": "prettier --check *.md *.json 'src/**/*.{js,jsx,ts,tsx,css,less,md,json}'", "lint:typing": "tsc --noEmit", "test": "jest --c --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/index.cjs.js (bundled) --- "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts var src_exports = {}; __export(src_exports, { DiffGraph: () => DiffGraph }); module.exports = __toCommonJS(src_exports); // src/components/DiffGraph/index.tsx var import_xflow2 = require("@antv/xflow"); var import_react2 = require("react"); // src/util/index.ts var compare = (originalData, currentData, addColor, delColor, changeColor, addExtAttr = {}, delExtAttr = {}, changeExtAttr = {}) => { const originalDataWithDiffInfo = { nodes: [...originalData.nodes], edges: [...originalData.edges] }; const currentDataWithDiffInfo = { nodes: [...currentData.nodes], edges: [...currentData.edges] }; const originalIds = originalData.nodes.map((node) => node.id).concat(originalData.edges.map((edge) => edge.id)); for (let i = 0; i < currentData.nodes.length; i++) { if (!originalIds.includes(currentData.nodes[i].id)) { currentDataWithDiffInfo.nodes[i].diffType = "ADD"; currentDataWithDiffInfo.nodes[i].attrs = { ...currentDataWithDiffInfo.nodes[i].attrs, body: { ...currentDataWithDiffInfo.nodes[i].attrs?.body, fill: addColor }, ...addExtAttr }; } } for (let i = 0; i < cu --- dist/index.esm.js (bundled) --- // src/components/DiffGraph/index.tsx import { XFlow, XFlowGraph } from "@antv/xflow"; import { useEffect as useEffect2, useState } from "react"; // src/util/index.ts var compare = (originalData, currentData, addColor, delColor, changeColor, addExtAttr = {}, delExtAttr = {}, changeExtAttr = {}) => { const originalDataWithDiffInfo = { nodes: [...originalData.nodes], edges: [...originalData.edges] }; const currentDataWithDiffInfo = { nodes: [...currentData.nodes], edges: [...currentData.edges] }; const originalIds = originalData.nodes.map((node) => node.id).concat(originalData.edges.map((edge) => edge.id)); for (let i = 0; i < currentData.nodes.length; i++) { if (!originalIds.includes(currentData.nodes[i].id)) { currentDataWithDiffInfo.nodes[i].diffType = "ADD"; currentDataWithDiffInfo.nodes[i].attrs = { ...currentDataWithDiffInfo.nodes[i].attrs, body: { ...currentDataWithDiffInfo.nodes[i].attrs?.body, fill: addColor }, ...addExtAttr }; } } for (let i = 0; i < currentData.edges.length; i++) { if (!originalIds.includes(currentData.edges[i].id)) { currentDataWithDiffInfo.edges[i].diffType = "ADD"; currentDataWithDiffInfo.edges[i].attrs = { ...currentDataWithDiffInfo.edges[i].attrs, line: { ...currentDataWithDiffInfo.edges[i].attrs?.line, stroke: addColor }, ...addExtAttr }; } } const currentIds = currentData.nodes.map((node) => node.id).concat(currentData.edges.map((edge) => edge.id)); for (let i = 0; i < originalData.nodes.length; i++) { if (!currentIds.includes(originalData.nodes[i].id)) { originalDataWithDiffInfo.nodes[i].diffType = "DEL"; originalDataWithDiffInfo.nodes[i].attrs = { ...originalDataWithDiffInfo.nodes[i].attrs, body: { ...originalDataWithDiffInfo.nodes[i].attrs?.body, fill: delColor }, ...delEx --- dist/typing/index.d.ts (bundled) --- export * from './components'; export * from './types'; //# sourceMappingURL=index.d.ts.map --- dist/typing/util/index.d.ts (bundled) --- import type { useGraphInstance } from '@antv/xflow'; import type { GraphData, GraphDataWithDiffInfo } from '..'; export declare const compare: (originalData: GraphData, currentData: GraphData, addColor: string, delColor: string, changeColor: string, addExtAttr?: object, delExtAttr?: object, changeExtAttr?: object) => { originalDataWithDiffInfo: GraphDataWithDiffInfo; currentDataWithDiffInfo: GraphDataWithDiffInfo; }; export declare const syncGraph: (graph1: ReturnType<typeof useGraphInstance>, graph2: ReturnType<typeof useGraphInstance>) => void; //# sourceMappingURL=index.d.ts.map --- dist/typing/types/index.d.ts (bundled) --- import type { EdgeOptions, GraphOptions, NodeOptions } from '@antv/xflow'; export interface DiffGraphOptions { originalData: GraphData; currentData: GraphData; addColor?: ''; addExtAttr?: object; delColor?: ''; delExtAttr?: object; changeColor?: ''; changeExtAttr?: object; graphOptions?: GraphOptions; } export interface GraphData { nodes: NodeOptions[]; edges: EdgeOptions[]; } export interface NodeOptionsWithDiffInfo extends NodeOptions { diffType?: 'DEL' | 'ADD' | 'CHG' | 'NONE'; } export interface EdgeOptionsWithDiffInfo extends EdgeOptions { diffType?: 'DEL' | 'ADD' | 'CHG' | 'NONE'; } export interface GraphDataWithDiffInfo { nodes: NodeOptionsWithDiffInfo[]; edges: EdgeOptionsWithDiffInfo[]; } //# sourceMappingURL=index.d.ts.map --- dist/typing/components/index.d.ts (bundled) --- export * from './DiffGraph'; //# sourceMappingURL=index.d.ts.map --- dist/typing/components/DiffGraph/index.d.ts (bundled) --- import type { FC } from 'react'; import type { DiffGraphOptions } from '@/types'; import '../../styles/index.less'; declare const DiffGraph: FC<DiffGraphOptions>; export { DiffGraph }; //# sourceMappingURL=index.d.ts.map --- dist/typing/components/DiffGraph/tool.d.ts (bundled) --- import type { EdgeOptions, NodeOptions } from '@antv/xflow'; import { useGraphInstance } from '@antv/xflow'; import type { FC } from 'react'; interface ToolOptions { data: { nodes: NodeOptions[]; edges: EdgeOptions[]; }; addGraph: (graph: ReturnType<typeof useGraphInstance>) => void; } declare const Tool: FC<ToolOptions>; export default Tool; //# sourceMappingURL=tool.d.ts.map
