// npm package
@antv/f-my
FEngine for alipay mini-program
versions
93
maintainers
51
license
MIT
first publish
2022-09-27
publisher
xuying1027
tarball
105,143 B
AUTO-PUBLISHED·1 version indexed·latest published 2026-01-21
// publisher campaignby xuying1027
6 caught packages from this accountThis is not an isolated catch. The same publisher has shipped 5 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· @1.10.0· 3 files flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 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
→ No suspicious destination, no remote-exec shape — 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() {
