// npm package
@antv/f2-wx
F2 for weixin mini-program
versions
61
maintainers
51
license
MIT
first publish
2021-12-20
publisher
zengyue
tarball
10,533 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.51· 3 files flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @4.0.51··AUTO-PUBLISHED·publisher: zengyueheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3899child-process-spawn
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· 3 files flaggedpatterns: 1
--- package/src/index.ts (excerpt) --- import { Canvas } from '@antv/f2'; function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function() {}; } return e; } Component({ /** * 组件的属性列表 */ properties: { onRender: { type: null, value: () => {}, }, }, /** * 组件的初始数据 */ data: {}, ready() { const query = wx.createSelectorQuery().in(this); query .select('.f2-canvas') .fields({ node: true, size: true, }) .exec((res) => { const { node, width, height } = res[0]; const context = node.getContext('2d'); const pixelRatio = wx.getSystemInfoSync().pixelRatio; // 高清设置 node.width = width * pixelRatio; node.height = height * pixelRatio; const children = this.data.onRender(this.data); const canvas = new Canvas({ pixelRatio, width, height, context, children, }); canvas.render(); this.canvas = canvas; this.canvasEl = canvas.canvas.get('el'); }); }, observers: { // 处理 update '**': function() { const { canvas, data } = this; if (!canvas) return; const children = data.onRender(data); canvas.update({ children, }); }, }, lifetimes: { detached() { const { canvas } = this; if (!canvas) return; canvas.destroy(); }, }, /** * 组件的方法列表 */ methods: { click(e) { --- package/lib/index.js (excerpt) --- "use strict"; var _f = require("@antv/f2"); function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } Component({ /** * 组件的属性列表 */ properties: { onRender: { type: null, value: function value() {} } }, /** * 组件的初始数据 */ data: {}, ready: function ready() { var _this = this; var query = wx.createSelectorQuery().in(this); query.select('.f2-canvas').fields({ node: true, size: true }).exec(function (res) { var _res$ = res[0], node = _res$.node, width = _res$.width, height = _res$.height; var context = node.getContext('2d'); var pixelRatio = wx.getSystemInfoSync().pixelRatio; // 高清设置 node.width = width * pixelRatio; node.height = height * pixelRatio; var children = _this.data.onRender(_this.data); var canvas = new _f.Canvas({ pixelRatio: pixelRatio, width: width, height: height, context: context, children: children }); canvas.render(); _this.canvas = canvas; _this.canvasEl = canvas.canvas.get('el'); }); }, observers: { // 处理 update '**': function _() { var canvas = this.canvas, data = this.data; if (!canvas) return; var children = data.onRender(data); canvas.update({ children: children }); } }, lifetimes: { detached: function detached() { --- package/es/index.js (excerpt) --- import { Canvas } from '@antv/f2'; function wrapEvent(e) { if (!e) return; if (!e.preventDefault) { e.preventDefault = function () {}; } return e; } Component({ /** * 组件的属性列表 */ properties: { onRender: { type: null, value: function value() {} } }, /** * 组件的初始数据 */ data: {}, ready: function ready() { var _this = this; var query = wx.createSelectorQuery().in(this); query.select('.f2-canvas').fields({ node: true, size: true }).exec(function (res) { var _res$ = res[0], node = _res$.node, width = _res$.width, height = _res$.height; var context = node.getContext('2d'); var pixelRatio = wx.getSystemInfoSync().pixelRatio; // 高清设置 node.width = width * pixelRatio; node.height = height * pixelRatio; var children = _this.data.onRender(_this.data); var canvas = new Canvas({ pixelRatio: pixelRatio, width: width, height: height, context: context, children: children }); canvas.render(); _this.canvas = canvas; _this.canvasEl = canvas.canvas.get('el'); }); }, observers: { // 处理 update '**': function _() { var canvas = this.canvas, data = this.data; if (!canvas) return; var children = data.onRender(data); canvas.update({ children: children }); } }, lifetimes: { detached: function detached() { var can
