// npm package
@antv/l7-utils
Utils for L7
versions
557
maintainers
51
license
MIT
first publish
2019-11-20
publisher
lzxue
tarball
261,100 B
AUTO-PUBLISHED·1 version indexed·latest published 2026-05-11
// publisher campaignby lzxue
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· @2.25.10· 2 files flagged
llm: benign · 0.85→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
- @2.25.10··AUTO-PUBLISHED·publisher: lzxueheuristic 75/100static flags 1llm benign (0.85) via ollamamature-packageosv-flagged:MAL-2026-4053child-process-spawn
→ No suspicious destination, no remote-exec shape — 1 known-vendor host(s).
// offending code· 2 files flaggedpatterns: 1
--- package/lib/tileset-manager/utils/tile-url.js (excerpt) --- var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/tileset-manager/utils/tile-url.ts var tile_url_exports = {}; __export(tile_url_exports, { expandUrl: () => expandUrl, getURLFromTemplate: () => getURLFromTemplate, getWMTSURLFromTemplate: () => getWMTSURLFromTemplate, isURLTemplate: () => isURLTemplate }); module.exports = __toCommonJS(tile_url_exports); var import_ajax = require("../../ajax"); var import_lonlat_tile = require("./lonlat-tile"); function isURLTemplate(s) { return /(?=.*{box})(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(s); } function expandUrl(url) { const urls = []; let match = /\{([a-z])-([a-z])\}/.exec(url); if (match) { const startCharCode = match[1].charCodeAt(0); const stopCharCode = match[2].charCodeAt(0); --- package/es/tileset-manager/utils/tile-url.js (excerpt) --- // src/tileset-manager/utils/tile-url.ts import { getProtocolAction } from "../../ajax"; import { tileToBounds } from "./lonlat-tile"; function isURLTemplate(s) { return /(?=.*{box})(?=.*{z})(?=.*{x})(?=.*({y}|{-y}))/.test(s); } function expandUrl(url) { const urls = []; let match = /\{([a-z])-([a-z])\}/.exec(url); if (match) { const startCharCode = match[1].charCodeAt(0); const stopCharCode = match[2].charCodeAt(0); let charCode; for (charCode = startCharCode; charCode <= stopCharCode; ++charCode) { urls.push(url.replace(match[0], String.fromCharCode(charCode))); } return urls; } match = /\{(\d+)-(\d+)\}/.exec(url); if (match) { const stop = parseInt(match[2], 10); for (let i = parseInt(match[1], 10); i <= stop; i++) { urls.push(url.replace(match[0], i.toString())); } return urls; } urls.push(url); return urls; } function getURLFromTemplate(template, properties) { if (!template || !template.length) { throw new Error("url is not allowed to be empty"); } const { x, y, z } = properties; const urls = expandUrl(template); const index = Math.abs(x + y) % urls.length; const url = getProtocolAction(urls[index]) ? `${urls[index]}/{z}/{x}/{y}` : urls[index]; return url.replace(/\{x\}/g, x.toString()).replace(/\{y\}/g, y.toString()).replace(/\{z\}/g, z.toString()).replace(/\{bbox\}/g, tileToBounds(x, y, z).join(",")).replace(/\{-y\}/g, (Math.pow(2, z) - y - 1).toString()); } function getWMTSURLFro --- bundled output (OSV-MAL flagged — LLM scope expansion) --- --- lib/color-parser.js (bundled) --- var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/color-parser.ts var color_parser_exports = {}; __export(color_parser_exports, { interpolateRgbBasis: () => interpolateRgbBasis, parseColor: () => parseColor }); module.exports = __toCommonJS(color_parser_exports); var CSS_COLORS = { // 基础颜色 white: [255, 255, 255], black: [0, 0, 0], red: [255, 0, 0], green: [0, 128, 0], blue: [0, 0, 255], yellow: [255, 255, 0], cyan: [0, 255, 255], magenta: [255, 0, 255], gray: [128, 128, 128], grey: [128, 128, 128], silver: [192, 192, 192], maroon: [128, 0, 0], olive: [128, 128, 0], lime: [0, 255, 0], aqua: [0, 255, 255], teal: [0, 128, 128], navy: [0, 0, 128], fuchsia: [255, 0, 255], purple: [128, 0, 128], orange: [255, 165, 0], pink: [255, 192, 203], // 扩展颜色 aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], blanchedalmond: [255, 235, 205], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [25 --- lib/lodash-adapter.js (bundled) --- var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/lodash-adapter.ts var lodash_adapter_exports = {}; __export(lodash_adapter_exports, { lodashUtil: () => lodashUtil }); module.exports = __toCommonJS(lodash_adapter_exports); var isNil = (value) => { return value == null; }; var isString = (value) => { return typeof value === "string"; }; var isNumber = (value) => { return typeof value === "number" && !isNaN(value); }; var isBoolean = (value) => { return typeof value === "boolean"; }; var isFunction = (value) => { return typeof value === "function"; }; var isObject = (value) => { return typeof value === "object" && value !== null; }; var isUndefined = (value) => { return typeof value === "undefined"; }; var isTypedArray = (value) => { return ArrayBuffer.isView(value) && !(value instanceof DataView); }; var isPlainObject = (value) => { if (!isObject(value)) return false; const proto = Object.getPrototypeOf(value); return proto === null || proto === Object.prototype; }; var clamp = (value, lower, upper) => { return Math.min(Math.max(value, lower), upper); }; var uniq = (array) => { return [...new Set(array)]; }; var pull = (array, ...values) => { const valuesToRemove = new Set(values); for (let i = array.l --- lib/tileset-manager/tileset-manager.js (bundled) --- var __create = Object.create; var __defProp = Object.defineProperty; var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { --- lib/tileset-manager/utils/bound-buffer.js (bundled) --- var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/tileset-manager/utils/bound-buffer.ts var bound_buffer_exports = {}; __export(bound_buffer_exports, { getLatLonBoundsBuffer: () => getLatLonBoundsBuffer, isLatLonBoundsContains: () => isLatLonBoundsContains }); module.exports = __toCommonJS(bound_buffer_exports); var import_geo = require("../../geo"); var getLatLonBoundsBuffer = (latLonBounds, bufferRatio) => { const bounds = (0, import_geo.bBoxToBounds)(latLonBounds); const newBounds = (0, import_geo.padBounds)(bounds, bufferRatio); const maxLngExtent = 360 * 3 - 180; const maxLatExtent = 85.0511287798065; const latLonBoundsBuffer = [ Math.max(newBounds[0][0], -maxLngExtent), Math.max(newBounds[0][1], -maxLatExtent), Math.min(newBounds[1][0], maxLngExtent), Math.min(newBounds[1][1], maxLatExtent) ]; return latLonBoundsBuffer; }; var isLatLonBoundsContains = (latLonBoundsBuffer, latLonBounds) => { const boundsBuffer = (0, import_geo.bBoxToBounds)(latLonBoundsBuffer); const bounds = (0, import_geo.bBoxToBounds)
