From 6b780bc50743592cf9d5c9c111ebc0d20a0d6f79 Mon Sep 17 00:00:00 2001 From: Blank0120 <49434568+Blank0120@users.noreply.github.com> Date: Thu, 28 May 2026 19:59:33 +0800 Subject: [PATCH] update sitemap (#2443) --- package-lock.json | 32 +++++++++++++++++++++----------- package.json | 2 +- src/web/static/sitemap.mjs | 6 +++--- 3 files changed, 25 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3c08fc83..f47a79a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -155,7 +155,7 @@ "postcss-import": "^16.1.1", "postcss-loader": "^8.2.1", "prompt": "^1.3.0", - "sitemap": "^8.0.3", + "sitemap": "^9.0.1", "terser": "^5.46.2", "webpack": "^5.107.1", "webpack-bundle-analyzer": "^5.3.0", @@ -16703,29 +16703,39 @@ } }, "node_modules/sitemap": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-8.0.3.tgz", - "integrity": "sha512-9Ew1tR2WYw8RGE2XLy7GjkusvYXy8Rg6y8TYuBuQMfIEdGcWoJpY2Wr5DzsEiL/TKCw56+YKTCCUHglorEYK+A==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/sitemap/-/sitemap-9.0.1.tgz", + "integrity": "sha512-S6hzjGJSG3d6if0YoF5kTyeRJvia6FSTBroE5fQ0bu1QNxyJqhhinfUsXi9fH3MgtXODWvwo2BDyQSnhPQ88uQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "^17.0.5", + "@types/node": "^24.9.2", "@types/sax": "^1.2.1", "arg": "^5.0.0", "sax": "^1.4.1" }, "bin": { - "sitemap": "dist/cli.js" + "sitemap": "dist/esm/cli.js" }, "engines": { - "node": ">=14.0.0", - "npm": ">=6.0.0" + "node": ">=20.19.5", + "npm": ">=10.8.2" } }, "node_modules/sitemap/node_modules/@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", + "version": "24.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.4.tgz", + "integrity": "sha512-GUUEShf+PBCGW2KaXwcIt3Yk+e3pkKwWKb9GSyM9WQVE+ep2jzmHdGsHzu4wgcZy5fN9FBdVzjpBQsYlpfpgLA==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/sitemap/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index d7e2f23c..ac15dd32 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "postcss-import": "^16.1.1", "postcss-loader": "^8.2.1", "prompt": "^1.3.0", - "sitemap": "^8.0.3", + "sitemap": "^9.0.1", "terser": "^5.46.2", "webpack": "^5.107.1", "webpack-bundle-analyzer": "^5.3.0", diff --git a/src/web/static/sitemap.mjs b/src/web/static/sitemap.mjs index f373a277..d7d723b1 100644 --- a/src/web/static/sitemap.mjs +++ b/src/web/static/sitemap.mjs @@ -1,4 +1,4 @@ -import sm from "sitemap"; +import { SitemapStream, streamToPromise } from "sitemap"; import OperationConfig from "../../core/config/OperationConfig.json" with { type: "json" }; /** @@ -11,7 +11,7 @@ import OperationConfig from "../../core/config/OperationConfig.json" with { type const baseUrl = "https://gchq.github.io/CyberChef/"; -const smStream = new sm.SitemapStream({}); +const smStream = new SitemapStream({}); smStream.write({ url: baseUrl, @@ -28,6 +28,6 @@ for (const op in OperationConfig) { } smStream.end(); -sm.streamToPromise(smStream).then( +streamToPromise(smStream).then( (buffer) => console.log(buffer.toString()), // eslint-disable-line no-console );