// npm 패키지
@antv/f-my
FEngine for alipay mini-program
버전
93
메인테이너
51
라이선스
MIT
최초 publish
2022-09-27
publisher
xuying1027
tarball
105,143 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2026-01-21
// publisher 캠페인by xuying1027
이 계정에서 catch된 패키지 6건고립된 catch가 아닙니다. 동일 publisher가 5개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @1.10.0· 3 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
- @1.10.0··AUTO-PUBLISHED·publisher: xuying1027heuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3884child-process-spawn
→ 의심 전송지 없음, 원격 실행 형태 없음 — 1 known-vendor host(s).
// offending code· 3 files flaggedpatterns: 1
--- package/lib/index.js (excerpt) --- "use strict"; var _fEngine = require("@antv/f-engine"); function convertTouches(touches) { if (!touches) return touches; touches.forEach(function (touch) { touch.clientX = touch.x; touch.clientY = touch.y; }); return touches; } function dispatchEvent(el, event, type) { if (!el || !event) return; if (!event.preventDefault) { event.preventDefault = function () {}; } event.type = type; event.target = el; var touches = event.touches, changedTouches = event.changedTouches, detail = event.detail; event.touches = convertTouches(touches); event.changedTouches = convertTouches(changedTouches); if (detail) { event.clientX = detail.x; event.clientY = detail.y; } el.dispatchEvent(event); } var getPixelRatio = function getPixelRatio() { return my.getSystemInfoSync().pixelRatio; }; // 判断是否是新版 canvas 所支持的调用方法(AppX 2.7.0 及以上) var isAppX2CanvasEnv = function isAppX2CanvasEnv() { return my.canIUse('canvas.onReady') && my.canIUse('createSelectorQuery.return.node'); }; Component({ props: { onRender: function onRender(_props) {}, // width height 会作为元素兜底的宽高使用 width: null, height: null, onError: function onError() {}, onCanvasReady: function onCanvasReady() {}, onCanvasRender: function onCanvasRender() {}, type: '2d' // canvas 2d, 基础库 2.7 以上支持 }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function --- package/lib/web.js (excerpt) --- "use strict"; var _fEngine = require("@antv/f-engine"); var _adapter = require("./adapter"); function convertTouches(touches) { if (!touches) return touches; touches.forEach(function (touch) { touch.clientX = touch.x; touch.clientY = touch.y; }); return touches; } function dispatchEvent(el, event, type) { if (!el || !event) return; if (!event.preventDefault) { event.preventDefault = function () {}; } event.type = type; event.target = el; var touches = event.touches, changedTouches = event.changedTouches, detail = event.detail; event.touches = convertTouches(touches); event.changedTouches = convertTouches(changedTouches); if (detail) { event.clientX = detail.x; event.clientY = detail.y; } el.dispatchEvent(event); } Component({ data: { width: null, height: null, rpx2px: 0.5, pixelRatio: 2, renderContent: null }, didMount: function didMount() { var onHandleRef = this.props.onHandleRef; onHandleRef && this.props.onHandleRef({ setRenderContent: this.setRenderConetent.bind(this), updateChart: this.updateChart.bind(this), clear: this.clear.bind(this) }); this.createChart(); }, didUpdate: function didUpdate() { var _this = this; var skipUpdate = this.props.skipUpdate; // 组件更新不更新图表 if (skipUpdate) return; var _a = this, canvas = _a.canvas, props = _a.props; if (!canvas) return; var theme = props.theme, px2hd = props.px --- package/es/index.js (excerpt) --- import { Canvas } from '@antv/f-engine'; function convertTouches(touches) { if (!touches) return touches; touches.forEach(function (touch) { touch.clientX = touch.x; touch.clientY = touch.y; }); return touches; } function dispatchEvent(el, event, type) { if (!el || !event) return; if (!event.preventDefault) { event.preventDefault = function () {}; } event.type = type; event.target = el; var touches = event.touches, changedTouches = event.changedTouches, detail = event.detail; event.touches = convertTouches(touches); event.changedTouches = convertTouches(changedTouches); if (detail) { event.clientX = detail.x; event.clientY = detail.y; } el.dispatchEvent(event); } var getPixelRatio = function getPixelRatio() { return my.getSystemInfoSync().pixelRatio; }; // 判断是否是新版 canvas 所支持的调用方法(AppX 2.7.0 及以上) var isAppX2CanvasEnv = function isAppX2CanvasEnv() { return my.canIUse('canvas.onReady') && my.canIUse('createSelectorQuery.return.node'); }; Component({ props: { onRender: function onRender(_props) {}, // width height 会作为元素兜底的宽高使用 width: null, height: null, onError: function onError() {}, onCanvasReady: function onCanvasReady() {}, onCanvasRender: function onCanvasRender() {}, type: '2d' // canvas 2d, 基础库 2.7 以上支持 }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function didMount() {
