// npm package
@antv/f2-my
F2 for alipay mini-program
versions
63
maintainers
51
license
MIT
first publish
2021-12-06
publisher
zengyue
tarball
18,444 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-10-28
// publisher campaignby zengyue
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· @4.0.52· 2 files flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @4.0.52··AUTO-PUBLISHED·publisher: zengyueheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3894child-process-spawn
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· 2 files flaggedpatterns: 1
--- package/lib/index.js (excerpt) --- "use strict"; var _f = require("@antv/f2"); var _f2Context = require("@antv/f2-context"); function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } 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, type: '2d', onError: function onError(error) {} }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function didMount() { var _this = this; if (isAppX2CanvasEnv()) { return; } var id = this.data.id; var onError = this.props.onError; try { var query = my.createSelectorQuery({ page: this.$page }); query.select("#".concat(id)).boundingClientRect().exec(function (res) { // 获取画布实际宽高, 用props的宽高做失败兜底 var _ref = res && res[0] ? res[0] : _this.props, width = _ref.width, height = _ref.height; var pixelRatio = getPixelRatio(); // 高清解决方案 _this.setData({ width: width * pixelRatio, height: height * pixelRatio }, function --- package/es/index.js (excerpt) --- import { Canvas } from '@antv/f2'; import { my as F2Context } from '@antv/f2-context'; function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } 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, type: '2d', onError: function onError(error) {} }, /** * 组件创建时触发 * 注意: * 使用该生命周期,项目配置需启用:"component2": true */ onInit: function onInit() { this.setCanvasId(); }, didMount: function didMount() { var _this = this; if (isAppX2CanvasEnv()) { return; } var id = this.data.id; var onError = this.props.onError; try { var query = my.createSelectorQuery({ page: this.$page }); query.select("#".concat(id)).boundingClientRect().exec(function (res) { // 获取画布实际宽高, 用props的宽高做失败兜底 var _ref = res && res[0] ? res[0] : _this.props, width = _ref.width, height = _ref.height; var pixelRatio = getPixelRatio(); // 高清解决方案 _this.setData({ width: width * pixelRatio, height: height * pixelRatio }, function ()
