// npm 패키지
@antv/f2-wx
F2 for weixin mini-program
버전
61
메인테이너
51
라이선스
MIT
최초 publish
2021-12-20
publisher
zengyue
tarball
10,533 B
AUTO-PUBLISHED·1개 버전 인덱싱됨·최근 publish: 2023-10-28
// publisher 캠페인by zengyue
이 계정에서 catch된 패키지 9건고립된 catch가 아닙니다. 동일 publisher가 8개의 다른 패키지를 추가로 발행했고, 모두 파이프라인이 catch했습니다 — 일회성이 아닌 조직적 캠페인의 형태. 아래 링크는 각 형제 catch의 분석으로 이동합니다.
// offending code· @4.0.51· 3 files flagged
llm: benign · 0.85→ 의심 전송지 없음, 원격 실행 형태 없음 — 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
→ 의심 전송지 없음, 원격 실행 형태 없음 — 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
