// npm package
@antv/g-plugin-webgpu-device
A G plugin implements GPUDevice interface with WebGPU API
versions
102
maintainers
51
license
MIT
first publish
2022-05-12
publisher
panyuqi
tarball
583,341 B
AUTO-PUBLISHED·1 version indexed·latest published 2023-09-11
// publisher campaignby panyuqi
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· @1.9.17· 1 file flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
- @1.9.17··AUTO-PUBLISHED·publisher: panyuqiheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-3957public-github-push
→ No suspicious destination, no remote-exec shape — 2 known-vendor host(s).
// offending code· 1 file flaggedpatterns: 1
--- package/package.json (excerpt) --- { "name": "@antv/g-plugin-webgpu-device", "version": "1.9.17", "description": "A G plugin implements GPUDevice interface with WebGPU API", "keywords": [ "antv", "g", "webgpu" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.4", "@webgpu/types": "^0.1.33", "eventemitter3": "^5.0.1", "tslib": "^2.5.3", "@antv/g-lite": "1.2.13", "@antv/g-plugin-device-renderer": "1.9.17" }, "publishConfig": { "access": "public" }, "scripts": { "build": "npm run clean && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": "rollup -c -w" } } --- package.json (entry) --- { "name": "@antv/g-plugin-webgpu-device", "version": "1.9.17", "description": "A G plugin implements GPUDevice interface with WebGPU API", "keywords": [ "antv", "g", "webgpu" ], "homepage": "https://github.com/antvis/g#readme", "bugs": { "url": "https://github.com/antvis/g/issues" }, "repository": { "type": "git", "url": "git+https://github.com/antvis/g.git" }, "license": "MIT", "author": "https://github.com/orgs/antvis/people", "exports": { "types": "./dist/index.d.ts", "import": "./dist/index.esm.js", "default": "./dist/index.js" }, "main": "dist/index.js", "unpkg": "dist/index.umd.min.js", "module": "dist/index.esm.js", "types": "dist/index.d.ts", "files": [ "package.json", "dist", "LICENSE", "README.md" ], "dependencies": { "@antv/util": "^3.3.4", "@webgpu/types": "^0.1.33", "eventemitter3": "^5.0.1", "tslib": "^2.5.3", "@antv/g-lite": "1.2.13", "@antv/g-plugin-device-renderer": "1.9.17" }, "publishConfig": { "access": "public" }, "scripts": { "build": "npm run clean && rollup -c", "clean": "rimraf dist", "sync": "tnpm sync", "watch": --- index.js (entry) --- 'use strict'; var tslib = require('tslib'); var gLite = require('@antv/g-lite'); var gPluginDeviceRenderer = require('@antv/g-plugin-device-renderer'); var util = require('@antv/util'); var EventEmitter = require('eventemitter3'); let wasm; const cachedTextDecoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); }, }; if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); } let cachedUint8Memory0 = null; function getUint8Memory0() { if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8Memory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); } const heap = new Array(128).fill(undefined); heap.push(undefined, null, true, false); let heap_next = heap.length; function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); const idx = heap_next; heap_next = heap[idx]; heap[idx] = --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- dist/WebGPUDeviceContribution.d.ts (bundled) --- import type { GlobalRuntime } from '@antv/g-lite'; import type { DeviceContribution } from '@antv/g-plugin-device-renderer'; import type { WebGPUDeviceOptions } from './interfaces'; import { Device_WebGPU } from './platform/Device'; export declare class WebGPUDeviceContribution implements DeviceContribution { private pluginOptions; private runtime; constructor(pluginOptions: Partial<WebGPUDeviceOptions>, runtime: GlobalRuntime); createSwapChain($canvas: HTMLCanvasElement): Promise<Device_WebGPU>; } --- dist/index.d.ts (bundled) --- import { AbstractRendererPlugin, GlobalRuntime } from '@antv/g-lite'; import type { WebGPUDeviceOptions } from './interfaces'; import { WebGPUDeviceContribution } from './WebGPUDeviceContribution'; export { WebGPUDeviceContribution }; export declare class Plugin extends AbstractRendererPlugin { private options; name: string; constructor(options?: Partial<WebGPUDeviceOptions>); init(runtime: GlobalRuntime): void; destroy(): void; } --- dist/index.esm.js (bundled) --- import { __extends, __assign, __values, __awaiter, __generator, __read } from 'tslib'; import { ERROR_MSG_METHOD_NOT_IMPLEMENTED, AbstractRendererPlugin } from '@antv/g-lite'; import { BufferUsage, WrapMode, TexFilterMode, MipFilterMode, QueryPoolType, CompareMode, Format, VertexStepMode, TextureUsage, TextureDimension, SamplerFormatKind, getFormatTypeFlags, FormatTypeFlags, PrimitiveTopology, CullMode, FrontFace, BlendMode, BlendFactor, ResourceType, assert, defaultBindingLayoutSamplerDescriptor, getFormatSamplerKind, align, assertExists, BufferFrequencyHint, getFormatCompByteSize, getFormatFlags, FormatFlags, HashMap, bindingLayoutDescriptorEqual, nullHashFunc, ViewportOrigin, ClipSpaceNearZ, preprocessShader_GLSL, copyMegaState, defaultMegaState } from '@antv/g-plugin-device-renderer'; import { isNil, isNumber } from '@antv/util'; import EventEmitter from 'eventemitter3'; let wasm; const cachedTextDecoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); }, }; if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); } let cachedUint8Memory0 = null; function getUint8Memory0() { if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8Memory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); } const heap = new Array(128).fill(undefined); heap.push(undefined, null, true, false); let heap_next = heap.length; function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); const idx = heap_next; heap_next = heap[idx]; heap[idx] = obj; return idx; } function getObject(idx) { return heap[idx]; } function dropObject(idx) { if (idx < 132) return; heap[idx] = heap_n --- dist/index.js (bundled) --- 'use strict'; var tslib = require('tslib'); var gLite = require('@antv/g-lite'); var gPluginDeviceRenderer = require('@antv/g-plugin-device-renderer'); var util = require('@antv/util'); var EventEmitter = require('eventemitter3'); let wasm; const cachedTextDecoder = typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available'); }, }; if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); } let cachedUint8Memory0 = null; function getUint8Memory0() { if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); } return cachedUint8Memory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); } const heap = new Array(128).fill(undefined); heap.push(undefined, null, true, false); let heap_next = heap.length; function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); const idx = heap_next; heap_next = heap[idx]; heap[idx] = obj; return idx; } function getObject(idx) { return heap[idx]; } function dropObject(idx) { if (idx < 132) return; heap[idx] = heap_next; heap_next = idx; } function takeObject(idx) { const ret = getObject(idx); dropObject(idx); return ret; } let WASM_VECTOR_LEN = 0; const cachedTextEncoder = typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available'); }, }; const encodeString = typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function (arg, view) { const buf = cachedTextEncoder.encode(arg); view.set(buf); return { read: arg.leng --- dist/index.umd.min.js (bundled) --- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@antv/g-lite"),require("@antv/g-plugin-device-renderer")):"function"==typeof define&&define.amd?define(["exports","@antv/g-lite","@antv/g-plugin-device-renderer"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).G=e.G||{},e.G.WebGPUDevice={}),e.window.G,e.window.G.DeviceRenderer)}(this,(function(e,t,r){"use strict";var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var i=function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;n>r;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function s(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case --- dist/interfaces.d.ts (bundled) --- export interface WebGPUDeviceOptions { shaderCompilerPath: string; onContextLost: () => void; } --- dist/platform/Bindings.d.ts (bundled) --- /// <reference types="@webgpu/types" /> import type { BindingLayoutDescriptor, Bindings, BindingsDescriptor } from '@antv/g-plugin-device-renderer'; import { ResourceType } from '@antv/g-plugin-device-renderer'; import type { BindGroupLayout, IDevice_WebGPU } from './interfaces'; import { ResourceBase_WebGPU } from './ResourceBase'; export declare class Bindings_WebGPU extends ResourceBase_WebGPU implements Bindings { type: ResourceType.Bindings; bindingLayout: BindingLayoutDescriptor; gpuBindGroup: GPUBindGroup[]; bindGroupLayout: BindGroupLayout; constructor({ id, device, descriptor, }: { id: number;
