From 2b51ec592754cb8da006e1de5729421632ae36a7 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Thu, 27 Nov 2025 06:35:50 +0000 Subject: [PATCH 1/3] added esuild --- package-lock.json | 3320 ++++------------- package.json | 11 +- scripts/esbuild/build.mjs | 146 + scripts/esbuild/build/constants.mjs | 13 + scripts/esbuild/build/httpServer.mjs | 73 + .../build/plugins/ignoreModulesPlugin.mjs | 23 + .../esbuild/build/plugins/postBuildPlugin.mjs | 41 + .../esbuild/build/plugins/rebuildPlugin.mjs | 26 + .../build/plugins/stripNodePrefixPlugin.mjs | 15 + scripts/esbuild/build/reportSize.mjs | 18 + scripts/esbuild/dev.mjs | 97 + webpack.config.js | 222 -- 12 files changed, 1110 insertions(+), 2895 deletions(-) create mode 100644 scripts/esbuild/build.mjs create mode 100644 scripts/esbuild/build/constants.mjs create mode 100644 scripts/esbuild/build/httpServer.mjs create mode 100644 scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs create mode 100644 scripts/esbuild/build/plugins/postBuildPlugin.mjs create mode 100644 scripts/esbuild/build/plugins/rebuildPlugin.mjs create mode 100644 scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs create mode 100644 scripts/esbuild/build/reportSize.mjs create mode 100644 scripts/esbuild/dev.mjs delete mode 100644 webpack.config.js diff --git a/package-lock.json b/package-lock.json index 81c2b6aeb..fcd39edf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,8 +10,10 @@ "license": "Apache-2.0", "dependencies": { "@huggingface/jinja": "^0.5.1", + "esbuild": "^0.27.0", "onnxruntime-node": "1.24.0-dev.20251104-75d35474d5", "onnxruntime-web": "1.24.0-dev.20251104-75d35474d5", + "rimraf": "^6.1.2", "sharp": "^0.34.3" }, "devDependencies": { @@ -23,10 +25,7 @@ "jsdoc-to-markdown": "^9.1.1", "prettier": "3.4.2", "typescript": "^5.8.3", - "wavefile": "11.0.0", - "webpack": "^5.99.9", - "webpack-cli": "^6.0.1", - "webpack-dev-server": "^5.2.2" + "wavefile": "11.0.0" } }, "node_modules/@babel/code-frame": { @@ -595,16 +594,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@discoveryjs/json-ext": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz", - "integrity": "sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=14.17.0" - } - }, "node_modules/@emnapi/core": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", @@ -639,6 +628,422 @@ "tslib": "^2.4.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", + "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.0.tgz", + "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", + "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.0.tgz", + "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", + "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", + "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", + "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", + "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", + "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", + "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", + "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", + "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", + "cpu": [ + "loong64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", + "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", + "cpu": [ + "mips64el" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", + "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", + "cpu": [ + "ppc64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", + "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", + "cpu": [ + "riscv64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", + "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", + "cpu": [ + "s390x" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", + "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", + "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", + "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", + "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", + "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", + "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", + "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", + "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", + "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", + "cpu": [ + "ia32" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", + "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@huggingface/jinja": { "version": "0.5.1", "license": "MIT", @@ -684,6 +1089,27 @@ "url": "https://opencollective.com/libvips" } }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1103,17 +1529,6 @@ "node": ">=6.0.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.10.tgz", - "integrity": "sha512-0pPkgz9dY+bijgistcTTJ5mR+ocqRXLuhXHYdzoMmmoJ2C9S46RCm2GMUbatPEUK9Yjy26IrAy8D/M00lLkv+Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" - } - }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.4.tgz", @@ -1136,69 +1551,13 @@ "version": "0.2.8", "dev": true, "license": "Apache-2.0", - "dependencies": { - "lodash": "^4.17.21" - }, - "engines": { - "node": ">=v12.0.0" - } - }, - "node_modules/@jsonjoy.com/base64": { - "version": "1.1.2", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, - "node_modules/@jsonjoy.com/json-pack": { - "version": "1.1.0", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jsonjoy.com/base64": "^1.1.1", - "@jsonjoy.com/util": "^1.1.2", - "hyperdyperid": "^1.2.0", - "thingies": "^1.20.0" - }, - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, - "node_modules/@jsonjoy.com/util": { - "version": "1.5.0", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" + "dependencies": { + "lodash": "^4.17.21" }, - "peerDependencies": { - "tslib": "2" + "engines": { + "node": ">=v12.0.0" } }, - "node_modules/@leichtgewicht/ip-codec": { - "version": "2.0.5", - "dev": true, - "license": "MIT" - }, "node_modules/@napi-rs/wasm-runtime": { "version": "0.2.12", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", @@ -1395,99 +1754,6 @@ "@babel/types": "^7.28.2" } }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/bonjour": { - "version": "3.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/connect-history-api-fallback": { - "version": "1.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express-serve-static-core": "*", - "@types/node": "*" - } - }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/express": { - "version": "4.17.21", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.33", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "node_modules/@types/http-errors": { - "version": "2.0.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/http-proxy": { - "version": "1.17.10", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -1526,13 +1792,6 @@ "pretty-format": "^30.0.0" } }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/linkify-it": { "version": "5.0.0", "dev": true, @@ -1552,11 +1811,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/mime": { - "version": "1.3.5", - "dev": true, - "license": "MIT" - }, "node_modules/@types/node": { "version": "24.0.14", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.14.tgz", @@ -1566,64 +1820,6 @@ "undici-types": "~7.8.0" } }, - "node_modules/@types/node-forge": { - "version": "1.3.11", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/retry": { - "version": "0.12.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/send": { - "version": "0.17.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/serve-index": { - "version": "1.9.4", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/serve-static": { - "version": "1.15.7", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/http-errors": "*", - "@types/node": "*", - "@types/send": "*" - } - }, - "node_modules/@types/sockjs": { - "version": "0.3.36", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/stack-utils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", @@ -1631,14 +1827,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/ws": { - "version": "8.5.13", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -1892,278 +2080,52 @@ }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", - "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", - "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", - "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ] - }, - "node_modules/@webassemblyjs/ast": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/helper-numbers": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2" - } - }, - "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.13.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.13.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.14.1", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.13.2", - "@webassemblyjs/helper-api-error": "1.13.2", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.13.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/wasm-gen": "1.14.1" - } - }, - "node_modules/@webassemblyjs/ieee754": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@xtuc/ieee754": "^1.2.0" - } - }, - "node_modules/@webassemblyjs/leb128": { - "version": "1.13.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webassemblyjs/utf8": { - "version": "1.13.2", - "dev": true, - "license": "MIT" - }, - "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/helper-wasm-section": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-opt": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1", - "@webassemblyjs/wast-printer": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-buffer": "1.14.1", - "@webassemblyjs/wasm-gen": "1.14.1", - "@webassemblyjs/wasm-parser": "1.14.1" - } - }, - "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@webassemblyjs/helper-api-error": "1.13.2", - "@webassemblyjs/helper-wasm-bytecode": "1.13.2", - "@webassemblyjs/ieee754": "1.13.2", - "@webassemblyjs/leb128": "1.13.2", - "@webassemblyjs/utf8": "1.13.2" - } - }, - "node_modules/@webassemblyjs/wast-printer": { - "version": "1.14.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@webassemblyjs/ast": "1.14.1", - "@xtuc/long": "4.2.2" - } - }, - "node_modules/@webgpu/types": { - "version": "0.1.64", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.64.tgz", - "integrity": "sha512-84kRIAGV46LJTlJZWxShiOrNL30A+9KokD7RB3dRCIqODFjodS5tCD5yyiZ8kIReGVZSDfA3XkkwyyOIF6K62A==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@webpack-cli/configtest": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-3.0.1.tgz", - "integrity": "sha512-u8d0pJ5YFgneF/GuvEiDA61Tf1VDomHHYMjv/wc9XzYj7nopltpG96nXN5dJRstxZhcNpV1g+nT6CydO7pHbjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "peerDependencies": { - "webpack": "^5.82.0", - "webpack-cli": "6.x.x" - } - }, - "node_modules/@webpack-cli/info": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-3.0.1.tgz", - "integrity": "sha512-coEmDzc2u/ffMvuW9aCjoRzNSPDl/XLuhPdlFRpT9tZHmJ/039az33CE7uH+8s0uL1j5ZNtfdv0HkfaKRBGJsQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "peerDependencies": { - "webpack": "^5.82.0", - "webpack-cli": "6.x.x" - } - }, - "node_modules/@webpack-cli/serve": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-3.0.1.tgz", - "integrity": "sha512-sbgw03xQaCLiT6gcY/6u3qBDn01CWw/nbaXl3gTdTFuJJ75Gffv3E3DBpgvY2fkkrdS1fpjaXNOmJlnbtKauKg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12.0" - }, - "peerDependencies": { - "webpack": "^5.82.0", - "webpack-cli": "6.x.x" - }, - "peerDependenciesMeta": { - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/@xtuc/ieee754": { - "version": "1.2.0", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@xtuc/long": { - "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.11.1.tgz", + "integrity": "sha512-nRcz5Il4ln0kMhfL8S3hLkxI85BXs3o8EYoattsJNdsX4YUU89iOkVn7g0VHSRxFuVMdM4Q1jEpIId1Ihim/Uw==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "Apache-2.0" + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/accepts": { - "version": "1.3.8", + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.11.1.tgz", + "integrity": "sha512-DCEI6t5i1NmAZp6pFonpD5m7i6aFrpofcp4LA2i8IIq60Jyo28hamKBxNrZcyOwVOZkgsRp9O2sXWBWP8MnvIQ==", + "cpu": [ + "ia32" + ], "dev": true, "license": "MIT", - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.11.1.tgz", + "integrity": "sha512-lrW200hZdbfRtztbygyaq/6jP6AKE8qQN2KvPcJ+x7wiD038YtnYtZ82IMNJ69GJibV7bwL3y9FgK+5w/pYt6g==", + "cpu": [ + "x64" + ], "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } + "optional": true, + "os": [ + "win32" + ] }, - "node_modules/acorn-import-phases": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", - "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "node_modules/@webgpu/types": { + "version": "0.1.64", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.64.tgz", + "integrity": "sha512-84kRIAGV46LJTlJZWxShiOrNL30A+9KokD7RB3dRCIqODFjodS5tCD5yyiZ8kIReGVZSDfA3XkkwyyOIF6K62A==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - }, - "peerDependencies": { - "acorn": "^8.14.0" - } + "license": "BSD-3-Clause" }, "node_modules/adm-zip": { "version": "0.5.16", @@ -2174,52 +2136,6 @@ "node": ">=12.0" } }, - "node_modules/ajv": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", - "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "fast-uri": "^3.0.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-formats": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "^8.0.0" - }, - "peerDependencies": { - "ajv": "^8.0.0" - }, - "peerDependenciesMeta": { - "ajv": { - "optional": true - } - } - }, - "node_modules/ajv-keywords": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", - "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3" - }, - "peerDependencies": { - "ajv": "^8.8.2" - } - }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -2236,17 +2152,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-html-community": { - "version": "0.0.8", - "dev": true, - "engines": [ - "node >= 0.8.0" - ], - "license": "Apache-2.0", - "bin": { - "ansi-html": "bin/ansi-html" - } - }, "node_modules/ansi-regex": { "version": "6.2.2", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", @@ -2405,59 +2310,11 @@ "dev": true, "license": "MIT" }, - "node_modules/batch": { - "version": "0.6.1", - "dev": true, - "license": "MIT" - }, - "node_modules/binary-extensions": { - "version": "2.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/bluebird": { "version": "3.7.2", "dev": true, "license": "MIT" }, - "node_modules/body-parser": { - "version": "1.20.3", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.5", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/bonjour-service": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.3", - "multicast-dns": "^7.2.5" - } - }, "node_modules/boolean": { "version": "3.2.0", "license": "MIT" @@ -2531,30 +2388,6 @@ "dev": true, "license": "MIT" }, - "node_modules/bundle-name": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "run-applescript": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/cache-point": { "version": "3.0.1", "dev": true, @@ -2574,24 +2407,6 @@ } } }, - "node_modules/call-bind": { - "version": "1.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2681,37 +2496,6 @@ "node": ">=10" } }, - "node_modules/chokidar": { - "version": "3.6.0", - "dev": true, - "license": "MIT", - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chrome-trace-event": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.0" - } - }, "node_modules/ci-info": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.0.tgz", @@ -2813,21 +2597,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -2879,11 +2648,6 @@ "simple-swizzle": "^0.2.2" } }, - "node_modules/colorette": { - "version": "2.0.20", - "dev": true, - "license": "MIT" - }, "node_modules/command-line-args": { "version": "6.0.1", "dev": true, @@ -2920,13 +2684,6 @@ "node": ">=12.20.0" } }, - "node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT" - }, "node_modules/common-sequence": { "version": "3.0.0", "dev": true, @@ -2935,46 +2692,6 @@ "node": ">=12.17" } }, - "node_modules/compressible": { - "version": "2.0.18", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": ">= 1.43.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/compression": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", - "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "compressible": "~2.0.18", - "debug": "2.6.9", - "negotiator": "~0.6.4", - "on-headers": "~1.1.0", - "safe-buffer": "5.2.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/compression/node_modules/negotiator": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", - "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2998,33 +2715,6 @@ "node": ">=0.10.0" } }, - "node_modules/connect-history-api-fallback": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8" - } - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-type": { - "version": "1.0.5", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -3032,24 +2722,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cookie": { - "version": "0.7.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/cross-spawn": { "version": "7.0.6", "dev": true, @@ -3071,14 +2743,6 @@ "node": ">=12.17" } }, - "node_modules/debug": { - "version": "2.6.9", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.0.0" - } - }, "node_modules/dedent": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", @@ -3104,32 +2768,6 @@ "node": ">=0.10.0" } }, - "node_modules/default-browser": { - "version": "5.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "bundle-name": "^4.1.0", - "default-browser-id": "^5.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/default-browser-id": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-data-property": { "version": "1.1.4", "license": "MIT", @@ -3145,17 +2783,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/define-lazy-prop": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/define-properties": { "version": "1.2.1", "license": "MIT", @@ -3171,23 +2798,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/depd": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, "node_modules/detect-libc": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz", @@ -3236,17 +2846,6 @@ } } }, - "node_modules/dns-packet": { - "version": "5.6.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@leichtgewicht/ip-codec": "^2.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -3254,11 +2853,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ee-first": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/electron-to-chromium": { "version": "1.5.50", "dev": true, @@ -3284,28 +2878,6 @@ "dev": true, "license": "MIT" }, - "node_modules/encodeurl": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/enhanced-resolve": { - "version": "5.18.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", - "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "tapable": "^2.2.0" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/entities": { "version": "4.5.0", "dev": true, @@ -3317,19 +2889,6 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, - "node_modules/envinfo": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", - "dev": true, - "license": "MIT", - "bin": { - "envinfo": "dist/cli.js" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/error-ex": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", @@ -3364,15 +2923,51 @@ "node": ">= 0.4" } }, - "node_modules/es-module-lexer": { - "version": "1.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/es6-error": { "version": "4.1.1", "license": "MIT" }, + "node_modules/esbuild": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", + "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.0", + "@esbuild/android-arm": "0.27.0", + "@esbuild/android-arm64": "0.27.0", + "@esbuild/android-x64": "0.27.0", + "@esbuild/darwin-arm64": "0.27.0", + "@esbuild/darwin-x64": "0.27.0", + "@esbuild/freebsd-arm64": "0.27.0", + "@esbuild/freebsd-x64": "0.27.0", + "@esbuild/linux-arm": "0.27.0", + "@esbuild/linux-arm64": "0.27.0", + "@esbuild/linux-ia32": "0.27.0", + "@esbuild/linux-loong64": "0.27.0", + "@esbuild/linux-mips64el": "0.27.0", + "@esbuild/linux-ppc64": "0.27.0", + "@esbuild/linux-riscv64": "0.27.0", + "@esbuild/linux-s390x": "0.27.0", + "@esbuild/linux-x64": "0.27.0", + "@esbuild/netbsd-arm64": "0.27.0", + "@esbuild/netbsd-x64": "0.27.0", + "@esbuild/openbsd-arm64": "0.27.0", + "@esbuild/openbsd-x64": "0.27.0", + "@esbuild/openharmony-arm64": "0.27.0", + "@esbuild/sunos-x64": "0.27.0", + "@esbuild/win32-arm64": "0.27.0", + "@esbuild/win32-ia32": "0.27.0", + "@esbuild/win32-x64": "0.27.0" + } + }, "node_modules/escalade": { "version": "3.2.0", "dev": true, @@ -3381,11 +2976,6 @@ "node": ">=6" } }, - "node_modules/escape-html": { - "version": "1.0.3", - "dev": true, - "license": "MIT" - }, "node_modules/escape-string-regexp": { "version": "2.0.0", "dev": true, @@ -3394,18 +2984,6 @@ "node": ">=8" } }, - "node_modules/eslint-scope": { - "version": "5.1.1", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -3420,54 +2998,6 @@ "node": ">=4" } }, - "node_modules/esrecurse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esrecurse/node_modules/estraverse": { - "version": "5.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/estraverse": { - "version": "4.3.0", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter3": { - "version": "4.0.7", - "dev": true, - "license": "MIT" - }, - "node_modules/events": { - "version": "3.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.8.x" - } - }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -3527,61 +3057,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/express": { - "version": "4.21.2", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.3", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", - "proxy-addr": "~2.0.7", - "qs": "6.13.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/express" - } - }, - "node_modules/express/node_modules/array-flatten": { - "version": "1.1.1", - "dev": true, - "license": "MIT" - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "dev": true, - "license": "MIT" - }, "node_modules/fast-glob": { "version": "3.3.2", "dev": true, @@ -3604,19 +3079,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-uri": { - "version": "3.0.3", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/fastest-levenshtein": { - "version": "1.0.16", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.9.1" - } - }, "node_modules/fastq": { "version": "1.17.1", "dev": true, @@ -3625,17 +3087,6 @@ "reusify": "^1.0.4" } }, - "node_modules/faye-websocket": { - "version": "0.11.4", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "websocket-driver": ">=0.5.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -3677,23 +3128,6 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/find-replace": { "version": "5.0.2", "dev": true, @@ -3722,39 +3156,10 @@ "node": ">=8" } }, - "node_modules/flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true, - "license": "BSD-3-Clause", - "bin": { - "flat": "cli.js" - } - }, "node_modules/flatbuffers": { "version": "25.1.24", "license": "Apache-2.0" }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "license": "MIT", - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, "node_modules/foreground-child": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", @@ -3772,22 +3177,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/forwarded": { - "version": "0.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3909,11 +3298,6 @@ "node": ">= 6" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "dev": true, - "license": "BSD-2-Clause" - }, "node_modules/global-agent": { "version": "3.0.0", "license": "BSD-3-Clause", @@ -3962,11 +3346,6 @@ "version": "1.0.9", "license": "ISC" }, - "node_modules/handle-thing": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/handlebars": { "version": "4.7.8", "dev": true, @@ -3987,17 +3366,6 @@ "uglify-js": "^3.1.4" } }, - "node_modules/has": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "dev": true, @@ -4022,136 +3390,37 @@ "engines": { "node": ">= 0.4" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hasown": { - "version": "2.0.2", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/hpack.js": { - "version": "2.1.6", - "dev": true, - "license": "MIT", - "dependencies": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" - } - }, - "node_modules/hpack.js/node_modules/readable-stream": { - "version": "2.3.8", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/hpack.js/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/hpack.js/node_modules/string_decoder": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true, - "license": "MIT" - }, - "node_modules/http-deceiver": { - "version": "1.2.7", - "dev": true, - "license": "MIT" - }, - "node_modules/http-errors": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-parser-js": { - "version": "0.5.8", - "dev": true, - "license": "MIT" - }, - "node_modules/http-proxy": { - "version": "1.18.1", - "dev": true, + "node_modules/has-symbols": { + "version": "1.0.3", "license": "MIT", - "dependencies": { - "eventemitter3": "^4.0.0", - "follow-redirects": "^1.0.0", - "requires-port": "^1.0.0" - }, "engines": { - "node": ">=8.0.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/http-proxy-middleware": { - "version": "2.0.9", - "dev": true, + "node_modules/hasown": { + "version": "2.0.2", "license": "MIT", "dependencies": { - "@types/http-proxy": "^1.17.8", - "http-proxy": "^1.18.1", - "is-glob": "^4.0.1", - "is-plain-obj": "^3.0.0", - "micromatch": "^4.0.2" + "function-bind": "^1.1.2" }, "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "@types/express": "^4.17.13" - }, - "peerDependenciesMeta": { - "@types/express": { - "optional": true - } + "node": ">= 0.4" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, "node_modules/human-signals": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", @@ -4162,25 +3431,6 @@ "node": ">=10.17.0" } }, - "node_modules/hyperdyperid": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.18" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/import-local": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", @@ -4228,62 +3478,10 @@ "dev": true, "license": "ISC" }, - "node_modules/interpret": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/ipaddr.js": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, "node_modules/is-arrayish": { "version": "0.3.2", "license": "MIT" }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.12.0", - "dev": true, - "license": "MIT", - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-docker": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "bin": { - "is-docker": "cli.js" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-extglob": { "version": "2.1.1", "dev": true, @@ -4323,34 +3521,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-inside-container": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-docker": "^3.0.0" - }, - "bin": { - "is-inside-container": "cli.js" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-network-error": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "dev": true, @@ -4359,30 +3529,6 @@ "node": ">=0.12.0" } }, - "node_modules/is-plain-obj": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "license": "MIT", - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -4396,40 +3542,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-wsl": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-inside-container": "^1.0.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/isexe": { "version": "2.0.0", "dev": true, "license": "ISC" }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -5336,13 +4453,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "license": "MIT" - }, "node_modules/json-stringify-safe": { "version": "5.0.1", "license": "ISC" @@ -5360,16 +4470,6 @@ "node": ">=6" } }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/klaw": { "version": "3.0.0", "dev": true, @@ -5378,15 +4478,6 @@ "graceful-fs": "^4.1.9" } }, - "node_modules/launch-editor": { - "version": "2.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" - } - }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -5412,14 +4503,6 @@ "uc.micro": "^2.0.0" } }, - "node_modules/loader-runner": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.11.5" - } - }, "node_modules/locate-path": { "version": "5.0.0", "dev": true, @@ -5547,40 +4630,6 @@ "dev": true, "license": "MIT" }, - "node_modules/media-typer": { - "version": "0.3.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/memfs": { - "version": "4.14.1", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@jsonjoy.com/json-pack": "^1.0.3", - "@jsonjoy.com/util": "^1.3.0", - "tree-dump": "^1.0.1", - "tslib": "^2.0.0" - }, - "engines": { - "node": ">= 4.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5596,14 +4645,6 @@ "node": ">= 8" } }, - "node_modules/methods": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/micromatch": { "version": "4.0.8", "dev": true, @@ -5616,36 +4657,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "1.6.0", - "dev": true, - "license": "MIT", - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "dev": true, - "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -5656,11 +4667,6 @@ "node": ">=6" } }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "dev": true, - "license": "ISC" - }, "node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", @@ -5689,7 +4695,6 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "dev": true, "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" @@ -5706,23 +4711,6 @@ "node": ">=10" } }, - "node_modules/ms": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/multicast-dns": { - "version": "7.2.5", - "dev": true, - "license": "MIT", - "dependencies": { - "dns-packet": "^5.2.2", - "thunky": "^1.0.2" - }, - "bin": { - "multicast-dns": "cli.js" - } - }, "node_modules/napi-postinstall": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.4.tgz", @@ -5746,27 +4734,11 @@ "dev": true, "license": "MIT" }, - "node_modules/negotiator": { - "version": "0.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/neo-async": { "version": "2.6.2", "dev": true, "license": "MIT" }, - "node_modules/node-forge": { - "version": "1.3.1", - "dev": true, - "license": "(BSD-3-Clause OR GPL-2.0)", - "engines": { - "node": ">= 6.13.0" - } - }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -5794,21 +4766,10 @@ "dev": true, "license": "MIT", "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/object-inspect": { - "version": "1.13.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" + "path-key": "^3.0.0" }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "engines": { + "node": ">=8" } }, "node_modules/object-keys": { @@ -5826,32 +4787,6 @@ "node": ">=8.0.0" } }, - "node_modules/obuf": { - "version": "1.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/on-finished": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", - "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -5915,23 +4850,6 @@ "protobufjs": "^7.2.4" } }, - "node_modules/open": { - "version": "10.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "default-browser": "^5.2.1", - "define-lazy-prop": "^3.0.0", - "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-limit": { "version": "2.3.0", "dev": true, @@ -5957,22 +4875,6 @@ "node": ">=8" } }, - "node_modules/p-retry": { - "version": "6.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/retry": "0.12.2", - "is-network-error": "^1.0.0", - "retry": "^0.13.1" - }, - "engines": { - "node": ">=16.17" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-try": { "version": "2.2.0", "dev": true, @@ -5985,7 +4887,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "dev": true, "license": "BlueOak-1.0.0" }, "node_modules/parse-json": { @@ -6007,14 +4908,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parseurl": { - "version": "1.3.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/path-exists": { "version": "4.0.0", "dev": true, @@ -6041,11 +4934,6 @@ "node": ">=8" } }, - "node_modules/path-parse": { - "version": "1.0.7", - "dev": true, - "license": "MIT" - }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -6070,11 +4958,6 @@ "dev": true, "license": "ISC" }, - "node_modules/path-to-regexp": { - "version": "0.1.12", - "dev": true, - "license": "MIT" - }, "node_modules/picocolors": { "version": "1.1.1", "dev": true, @@ -6158,11 +5041,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/protobufjs": { "version": "7.2.6", "hasInstallScript": true, @@ -6185,26 +5063,6 @@ "node": ">=12.0.0" } }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "dev": true, - "license": "MIT", - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/proxy-addr/node_modules/ipaddr.js": { - "version": "1.9.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.10" - } - }, "node_modules/punycode.js": { "version": "2.3.1", "dev": true, @@ -6230,20 +5088,6 @@ ], "license": "MIT" }, - "node_modules/qs": { - "version": "6.13.0", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "dev": true, @@ -6263,38 +5107,6 @@ ], "license": "MIT" }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.2", - "dev": true, - "license": "MIT", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", @@ -6302,122 +5114,126 @@ "dev": true, "license": "MIT" }, - "node_modules/readable-stream": { - "version": "3.6.1", + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, "engines": { - "node": ">= 6" + "node": ">=0.10.0" } }, - "node_modules/readdirp": { - "version": "3.6.0", + "node_modules/requizzle": { + "version": "0.2.4", "dev": true, "license": "MIT", "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" + "lodash": "^4.17.21" } }, - "node_modules/rechoir": { - "version": "0.8.0", + "node_modules/resolve-cwd": { + "version": "3.0.0", "dev": true, "license": "MIT", "dependencies": { - "resolve": "^1.20.0" + "resolve-from": "^5.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=8" } }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "node_modules/resolve-from": { + "version": "5.0.0", "dev": true, "license": "MIT", "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, - "node_modules/require-from-string": { - "version": "2.0.2", + "node_modules/reusify": { + "version": "1.0.4", "dev": true, "license": "MIT", "engines": { + "iojs": ">=1.0.0", "node": ">=0.10.0" } }, - "node_modules/requires-port": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/requizzle": { - "version": "0.2.4", - "dev": true, - "license": "MIT", - "dependencies": { - "lodash": "^4.17.21" - } - }, - "node_modules/resolve": { - "version": "1.22.2", - "dev": true, - "license": "MIT", + "node_modules/rimraf": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", + "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", + "license": "BlueOak-1.0.0", "dependencies": { - "is-core-module": "^2.11.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" + "glob": "^13.0.0", + "package-json-from-dist": "^1.0.1" }, "bin": { - "resolve": "bin/resolve" + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/resolve-cwd": { - "version": "3.0.0", - "dev": true, - "license": "MIT", + "node_modules/rimraf/node_modules/glob": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", + "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", + "license": "BlueOak-1.0.0", "dependencies": { - "resolve-from": "^5.0.0" + "minimatch": "^10.1.1", + "minipass": "^7.1.2", + "path-scurry": "^2.0.0" }, "engines": { - "node": ">=8" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", + "node_modules/rimraf/node_modules/lru-cache": { + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", + "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", + "license": "ISC", "engines": { - "node": ">=8" + "node": "20 || >=22" } }, - "node_modules/retry": { - "version": "0.13.1", - "dev": true, - "license": "MIT", + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", + "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/brace-expansion": "^5.0.0" + }, "engines": { - "node": ">= 4" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/reusify": { - "version": "1.0.4", - "dev": true, - "license": "MIT", + "node_modules/rimraf/node_modules/path-scurry": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", + "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/roarr": { @@ -6439,17 +5255,6 @@ "version": "1.1.3", "license": "BSD-3-Clause" }, - "node_modules/run-applescript": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/run-parallel": { "version": "1.2.0", "dev": true, @@ -6472,117 +5277,20 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/schema-utils": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", - "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/json-schema": "^7.0.9", - "ajv": "^8.9.0", - "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.1.0" - }, - "engines": { - "node": ">= 10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - } - }, - "node_modules/select-hose": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/selfsigned": { - "version": "2.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node-forge": "^1.3.0", - "node-forge": "^1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-compare": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/send": { - "version": "0.19.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" + "license": "ISC", + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/encodeurl": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" + "node": ">=10" } }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "dev": true, + "node_modules/semver-compare": { + "version": "1.0.0", "license": "MIT" }, "node_modules/serialize-error": { @@ -6608,121 +5316,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/serialize-javascript": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", - "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "randombytes": "^2.1.0" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "dev": true, - "license": "MIT", - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-index/node_modules/depd": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/http-errors": { - "version": "1.6.3", - "dev": true, - "license": "MIT", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/inherits": { - "version": "2.0.3", - "dev": true, - "license": "ISC" - }, - "node_modules/serve-index/node_modules/setprototypeof": { - "version": "1.1.0", - "dev": true, - "license": "ISC" - }, - "node_modules/serve-index/node_modules/statuses": { - "version": "1.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-static": { - "version": "1.16.2", - "dev": true, - "license": "MIT", - "dependencies": { - "encodeurl": "~2.0.0", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.19.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-function-length": { - "version": "1.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.4", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/setprototypeof": { - "version": "1.2.0", - "dev": true, - "license": "ISC" - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "license": "MIT", - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/sharp": { "version": "0.34.3", "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.3.tgz", @@ -6784,34 +5377,6 @@ "node": ">=8" } }, - "node_modules/shell-quote": { - "version": "1.8.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/side-channel": { - "version": "1.0.6", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.7", - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", @@ -6842,16 +5407,6 @@ "node": ">=8" } }, - "node_modules/sockjs": { - "version": "0.3.24", - "dev": true, - "license": "MIT", - "dependencies": { - "faye-websocket": "^0.11.3", - "uuid": "^8.3.2", - "websocket-driver": "^0.7.4" - } - }, "node_modules/sort-array": { "version": "5.0.0", "dev": true, @@ -6891,76 +5446,6 @@ "source-map": "^0.6.0" } }, - "node_modules/spdy": { - "version": "4.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "handle-thing": "^2.0.0", - "http-deceiver": "^1.2.7", - "select-hose": "^2.0.0", - "spdy-transport": "^3.0.0" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/spdy-transport": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^4.1.0", - "detect-node": "^2.0.4", - "hpack.js": "^2.1.6", - "obuf": "^1.1.2", - "readable-stream": "^3.0.6", - "wbuf": "^1.7.3" - } - }, - "node_modules/spdy-transport/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/spdy-transport/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, - "node_modules/spdy/node_modules/debug": { - "version": "4.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/spdy/node_modules/ms": { - "version": "2.1.2", - "dev": true, - "license": "MIT" - }, "node_modules/sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -6981,22 +5466,6 @@ "node": ">=10" } }, - "node_modules/statuses": { - "version": "2.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7151,180 +5620,63 @@ "node_modules/strip-final-newline": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/synckit": { - "version": "0.11.11", - "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", - "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@pkgr/core": "^0.2.9" - }, - "engines": { - "node": "^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/synckit" - } - }, - "node_modules/table-layout": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "array-back": "^6.2.2", - "wordwrapjs": "^5.1.0" - }, - "engines": { - "node": ">=12.17" - } - }, - "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "5.43.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", - "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.14.0", - "commander": "^2.20.0", - "source-map-support": "~0.5.20" - }, - "bin": { - "terser": "bin/terser" - }, + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", "engines": { - "node": ">=10" + "node": ">=6" } }, - "node_modules/terser-webpack-plugin": { - "version": "5.3.14", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", - "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "node_modules/strip-json-comments": { + "version": "3.1.1", "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/trace-mapping": "^0.3.25", - "jest-worker": "^27.4.5", - "schema-utils": "^4.3.0", - "serialize-javascript": "^6.0.2", - "terser": "^5.31.1" - }, "engines": { - "node": ">= 10.13.0" + "node": ">=8" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.1.0" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "esbuild": { - "optional": true - }, - "uglify-js": { - "optional": true - } + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "license": "MIT", "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=8" } }, - "node_modules/terser-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", "dev": true, "license": "MIT", "dependencies": { - "has-flag": "^4.0.0" + "@pkgr/core": "^0.2.9" }, "engines": { - "node": ">=10" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "url": "https://opencollective.com/synckit" } }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/table-layout": { + "version": "4.1.1", "dev": true, "license": "MIT", "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "array-back": "^6.2.2", + "wordwrapjs": "^5.1.0" + }, + "engines": { + "node": ">=12.17" } }, "node_modules/test-exclude": { @@ -7388,22 +5740,6 @@ "node": "*" } }, - "node_modules/thingies": { - "version": "1.21.0", - "dev": true, - "license": "Unlicense", - "engines": { - "node": ">=10.18" - }, - "peerDependencies": { - "tslib": "^2" - } - }, - "node_modules/thunky": { - "version": "1.1.0", - "dev": true, - "license": "MIT" - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7422,33 +5758,11 @@ "node": ">=8.0" } }, - "node_modules/toidentifier": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tree-dump": { - "version": "1.0.2", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/streamich" - }, - "peerDependencies": { - "tslib": "2" - } - }, "node_modules/tslib": { "version": "2.6.3", "dev": true, - "license": "0BSD" + "license": "0BSD", + "optional": true }, "node_modules/type-detect": { "version": "4.0.8", @@ -7473,18 +5787,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/type-is": { - "version": "1.6.18", - "dev": true, - "license": "MIT", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -7535,14 +5837,6 @@ "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", "license": "MIT" }, - "node_modules/unpipe": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/unrs-resolver": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.11.1.tgz", @@ -7607,27 +5901,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "dev": true, - "license": "MIT" - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -7643,14 +5916,6 @@ "node": ">=10.12.0" } }, - "node_modules/vary": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/walk-back": { "version": "5.1.1", "dev": true, @@ -7669,18 +5934,6 @@ "makeerror": "1.0.12" } }, - "node_modules/watchpack": { - "version": "2.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/wavefile": { "version": "11.0.0", "dev": true, @@ -7692,246 +5945,6 @@ "node": ">=8" } }, - "node_modules/wbuf": { - "version": "1.7.3", - "dev": true, - "license": "MIT", - "dependencies": { - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/webpack": { - "version": "5.100.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.100.2.tgz", - "integrity": "sha512-QaNKAvGCDRh3wW1dsDjeMdDXwZm2vqq3zn6Pvq4rHOEOGSaUMgOOjG2Y9ZbIGzpfkJk9ZYTHpDqgDfeBDcnLaw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.8", - "@types/json-schema": "^7.0.15", - "@webassemblyjs/ast": "^1.14.1", - "@webassemblyjs/wasm-edit": "^1.14.1", - "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.15.0", - "acorn-import-phases": "^1.0.3", - "browserslist": "^4.24.0", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.2", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^4.3.2", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.11", - "watchpack": "^2.4.1", - "webpack-sources": "^3.3.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-cli": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-6.0.1.tgz", - "integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@discoveryjs/json-ext": "^0.6.1", - "@webpack-cli/configtest": "^3.0.1", - "@webpack-cli/info": "^3.0.1", - "@webpack-cli/serve": "^3.0.1", - "colorette": "^2.0.14", - "commander": "^12.1.0", - "cross-spawn": "^7.0.3", - "envinfo": "^7.14.0", - "fastest-levenshtein": "^1.0.12", - "import-local": "^3.0.2", - "interpret": "^3.1.1", - "rechoir": "^0.8.0", - "webpack-merge": "^6.0.1" - }, - "bin": { - "webpack-cli": "bin/cli.js" - }, - "engines": { - "node": ">=18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.82.0" - }, - "peerDependenciesMeta": { - "webpack-bundle-analyzer": { - "optional": true - }, - "webpack-dev-server": { - "optional": true - } - } - }, - "node_modules/webpack-cli/node_modules/commander": { - "version": "12.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", - "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, - "node_modules/webpack-dev-middleware": { - "version": "7.4.2", - "dev": true, - "license": "MIT", - "dependencies": { - "colorette": "^2.0.10", - "memfs": "^4.6.0", - "mime-types": "^2.1.31", - "on-finished": "^2.4.1", - "range-parser": "^1.2.1", - "schema-utils": "^4.0.0" - }, - "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - } - } - }, - "node_modules/webpack-dev-server": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/bonjour": "^3.5.13", - "@types/connect-history-api-fallback": "^1.5.4", - "@types/express": "^4.17.21", - "@types/express-serve-static-core": "^4.17.21", - "@types/serve-index": "^1.9.4", - "@types/serve-static": "^1.15.5", - "@types/sockjs": "^0.3.36", - "@types/ws": "^8.5.10", - "ansi-html-community": "^0.0.8", - "bonjour-service": "^1.2.1", - "chokidar": "^3.6.0", - "colorette": "^2.0.10", - "compression": "^1.7.4", - "connect-history-api-fallback": "^2.0.0", - "express": "^4.21.2", - "graceful-fs": "^4.2.6", - "http-proxy-middleware": "^2.0.9", - "ipaddr.js": "^2.1.0", - "launch-editor": "^2.6.1", - "open": "^10.0.3", - "p-retry": "^6.2.0", - "schema-utils": "^4.2.0", - "selfsigned": "^2.4.1", - "serve-index": "^1.9.1", - "sockjs": "^0.3.24", - "spdy": "^4.0.2", - "webpack-dev-middleware": "^7.4.2", - "ws": "^8.18.0" - }, - "bin": { - "webpack-dev-server": "bin/webpack-dev-server.js" - }, - "engines": { - "node": ">= 18.12.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependencies": { - "webpack": "^5.0.0" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - }, - "webpack-cli": { - "optional": true - } - } - }, - "node_modules/webpack-merge": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-6.0.1.tgz", - "integrity": "sha512-hXXvrjtx2PLYx4qruKl+kyRSLc52V+cCvMxRjmKwoA+CBbbF5GfIBtR6kCvl0fYGqTUPKB+1ktVmTHqMOzgCBg==", - "dev": true, - "license": "MIT", - "dependencies": { - "clone-deep": "^4.0.1", - "flat": "^5.0.2", - "wildcard": "^2.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/webpack-sources": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.3.3.tgz", - "integrity": "sha512-yd1RBzSGanHkitROoPFd6qsrxt+oFhg/129YzheDGqeustzX0vTZJZsSsQjVQC4yzBQ56K55XU8gaNCtIzOnTg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/websocket-driver": { - "version": "0.7.4", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "http-parser-js": ">=0.5.1", - "safe-buffer": ">=5.1.0", - "websocket-extensions": ">=0.1.1" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/websocket-extensions": { - "version": "0.1.4", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/which": { "version": "2.0.2", "dev": true, @@ -7946,13 +5959,6 @@ "node": ">= 8" } }, - "node_modules/wildcard": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", - "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", - "dev": true, - "license": "MIT" - }, "node_modules/wordwrap": { "version": "1.0.0", "dev": true, @@ -8082,26 +6088,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/ws": { - "version": "8.18.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xmlcreate": { "version": "2.0.4", "dev": true, diff --git a/package.json b/package.json index ed843857d..e2d3bd860 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "format": "prettier --write .", "format:check": "prettier --check .", "typegen": "tsc --build", - "dev": "webpack serve --no-client-overlay", - "build": "webpack && npm run typegen", + "dev": "node scripts/esbuild/dev.mjs", + "build": "node scripts/esbuild/build.mjs && npm run typegen", "test": "node --experimental-vm-modules --expose-gc node_modules/jest/bin/jest.js --verbose --logHeapUsage", "readme": "python ./docs/scripts/build_readme.py", "docs-api": "node ./docs/scripts/generate.js", @@ -56,8 +56,10 @@ "homepage": "https://github.com/huggingface/transformers.js#readme", "dependencies": { "@huggingface/jinja": "^0.5.1", + "esbuild": "^0.27.0", "onnxruntime-node": "1.24.0-dev.20251104-75d35474d5", "onnxruntime-web": "1.24.0-dev.20251104-75d35474d5", + "rimraf": "^6.1.2", "sharp": "^0.34.3" }, "devDependencies": { @@ -69,10 +71,7 @@ "jsdoc-to-markdown": "^9.1.1", "prettier": "3.4.2", "typescript": "^5.8.3", - "wavefile": "11.0.0", - "webpack": "^5.99.9", - "webpack-cli": "^6.0.1", - "webpack-dev-server": "^5.2.2" + "wavefile": "11.0.0" }, "files": [ "src", diff --git a/scripts/esbuild/build.mjs b/scripts/esbuild/build.mjs new file mode 100644 index 000000000..624846ff3 --- /dev/null +++ b/scripts/esbuild/build.mjs @@ -0,0 +1,146 @@ +import { build as esbuild } from "esbuild"; +import { execSync } from "node:child_process"; +import { existsSync, mkdirSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { stripNodePrefixPlugin } from "./build/plugins/stripNodePrefixPlugin.mjs"; +import { ignoreModulesPlugin } from "./build/plugins/ignoreModulesPlugin.mjs"; +import { postBuildPlugin } from "./build/plugins/postBuildPlugin.mjs"; +import { DIST_FOLDER, NODE_IGNORE_MODULES, NODE_EXTERNAL_MODULES, WEB_IGNORE_MODULES, WEB_EXTERNAL_MODULES } from "./build/constants.mjs"; +import { reportSize } from "./build/reportSize.mjs"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const rootDir = path.join(__dirname, "../.."); + +/** + * Helper function to create build configurations. + * Equivalent to webpack's buildConfig function. + */ +async function buildTarget({ + name = "", + suffix = ".js", + format = "esm", // 'esm' | 'cjs' + ignoreModules = [], + externalModules = [], + usePostBuild = false, +}) { + const platform = format === "cjs" ? "node" : "neutral"; + const outdir = path.join(rootDir, DIST_FOLDER); + + if (!existsSync(outdir)) { + mkdirSync(outdir, { recursive: true }); + } + + const regularFile = `transformers${name}${suffix}`; + const minFile = `transformers${name}.min${suffix}`; + + const plugins = []; + // Add ignoreModulesPlugin FIRST so it can catch modules before stripNodePrefixPlugin marks them as external + if (ignoreModules.length > 0) { + plugins.push(ignoreModulesPlugin(ignoreModules)); + } + plugins.push(stripNodePrefixPlugin()); + if (usePostBuild) { + plugins.push(postBuildPlugin(outdir, rootDir)); + } + + console.log(`\nBuilding ${regularFile}...`); + await esbuild({ + bundle: true, + treeShaking: true, + logLevel: "warning", + entryPoints: [path.join(rootDir, "src/transformers.js")], + platform, + format, + outfile: path.join(outdir, regularFile), + sourcemap: true, + external: externalModules, + plugins, + logOverride: { + // Suppress import.meta warning for CJS builds - it's handled gracefully in the code + "empty-import-meta": "silent", + }, + }); + reportSize(path.join(outdir, regularFile)); + + console.log(`\nBuilding ${minFile}...`); + await esbuild({ + bundle: true, + treeShaking: true, + logLevel: "warning", + entryPoints: [path.join(rootDir, "src/transformers.js")], + platform, + format, + outfile: path.join(outdir, minFile), + sourcemap: true, + minify: true, + external: externalModules, + plugins, + legalComments: "none", + logOverride: { + // Suppress import.meta warning for CJS builds - it's handled gracefully in the code + "empty-import-meta": "silent", + }, + }); + reportSize(path.join(outdir, minFile)); +} + +console.log("\nBuilding transformers.js with esbuild...\n"); + +const startTime = performance.now(); + +try { + console.log("=== CLEAN ==="); + execSync(`rimraf ${DIST_FOLDER}`, { stdio: "inherit" }); + + // Bundle build - bundles everything except ignored modules + console.log("\n=== Bundle Build (ESM) ==="); + await buildTarget({ + name: "", + suffix: ".js", + format: "esm", + ignoreModules: WEB_IGNORE_MODULES, + externalModules: [], + usePostBuild: true, + }); + + // Web build - external onnxruntime libs + console.log("\n=== Web Build (ESM) ==="); + await buildTarget({ + name: ".web", + suffix: ".js", + format: "esm", + ignoreModules: WEB_IGNORE_MODULES, + externalModules: WEB_EXTERNAL_MODULES, + usePostBuild: false, + }); + + // Node ESM build + console.log("\n=== Node Build (ESM) ==="); + await buildTarget({ + name: ".node", + suffix: ".mjs", + format: "esm", + ignoreModules: NODE_IGNORE_MODULES, + externalModules: NODE_EXTERNAL_MODULES, + usePostBuild: false, + }); + + // Node CJS build + console.log("\n=== Node Build (CJS) ==="); + await buildTarget({ + name: ".node", + suffix: ".cjs", + format: "cjs", + ignoreModules: NODE_IGNORE_MODULES, + externalModules: NODE_EXTERNAL_MODULES, + usePostBuild: false, + }); + + const endTime = performance.now(); + const duration = (endTime - startTime).toFixed(2); + console.log(`\nAll builds completed successfully in ${duration}ms!\n`); +} catch (error) { + console.error("\nBuild failed:", error); + process.exit(1); +} diff --git a/scripts/esbuild/build/constants.mjs b/scripts/esbuild/build/constants.mjs new file mode 100644 index 000000000..bd912a895 --- /dev/null +++ b/scripts/esbuild/build/constants.mjs @@ -0,0 +1,13 @@ +export const DIST_FOLDER = "dist"; +export const NODE_IGNORE_MODULES = ["onnxruntime-web"]; +export const NODE_EXTERNAL_MODULES = [ + "onnxruntime-common", + "onnxruntime-node", + "sharp", + "node:fs", + "node:path", + "node:url", +]; + +export const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url"]; +export const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"]; \ No newline at end of file diff --git a/scripts/esbuild/build/httpServer.mjs b/scripts/esbuild/build/httpServer.mjs new file mode 100644 index 000000000..66a63bac4 --- /dev/null +++ b/scripts/esbuild/build/httpServer.mjs @@ -0,0 +1,73 @@ +import { createServer } from "node:http"; +import { existsSync, readFileSync, statSync } from "node:fs"; +import path from "node:path"; + +const MIME_TYPES = { + ".html": "text/html", + ".js": "text/javascript", + ".mjs": "text/javascript", + ".css": "text/css", + ".json": "application/json", + ".wasm": "application/wasm", + ".png": "image/png", + ".jpg": "image/jpeg", + ".gif": "image/gif", + ".svg": "image/svg+xml", + ".ico": "image/x-icon", +}; + +export const startServer = (dir, PORT = 8080) => new Promise(resolve =>{ + const server = createServer((req, res) => { + // Enable CORS + res.setHeader("Access-Control-Allow-Origin", "*"); + res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); + res.setHeader("Access-Control-Allow-Headers", "Content-Type"); + + if (req.method === "OPTIONS") { + res.writeHead(204); + res.end(); + return; + } + + let filePath = req.url === "/" ? "/index.html" : req.url; + filePath = filePath.split("?")[0]; // Remove query params + + // Try to serve from outdir first, then fall back to rootDir + let fullPath = path.join(dir, filePath); + + // Check if file exists + if (!existsSync(fullPath)) { + res.writeHead(404, { "Content-Type": "text/plain" }); + res.end("404 Not Found"); + return; + } + + // Check if it's a directory + const stat = statSync(fullPath); + if (stat.isDirectory()) { + fullPath = path.join(fullPath, "index.html"); + if (!existsSync(fullPath)) { + res.writeHead(404, { "Content-Type": "text/plain" }); + res.end("404 Not Found"); + return; + } + } + + // Get MIME type + const ext = path.extname(fullPath); + const mimeType = MIME_TYPES[ext] || "application/octet-stream"; + + try { + const content = readFileSync(fullPath); + res.writeHead(200, { "Content-Type": mimeType }); + res.end(content); + } catch (error) { + res.writeHead(500, { "Content-Type": "text/plain" }); + res.end("500 Internal Server Error"); + } + }); + + server.listen(PORT, () => { + resolve(server); + }); +}); \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs new file mode 100644 index 000000000..0d4e41dd6 --- /dev/null +++ b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs @@ -0,0 +1,23 @@ +/** + * Plugin to ignore/exclude certain modules by returning an empty module. + * Equivalent to webpack's resolve.alias with false value. + */ +export const ignoreModulesPlugin = (modules = []) => ({ + name: "ignore-modules", + setup(build) { + // Escape special regex characters in module names + const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const escapedModules = modules.map(escapeRegex); + + // Match both "module" and "node:module" patterns + const patterns = escapedModules.flatMap(mod => [mod, `node:${mod}`]); + const filter = new RegExp(`^(${patterns.join("|")})$`); + + build.onResolve({ filter }, (args) => { + return { path: args.path, namespace: "ignore-modules" }; + }); + build.onLoad({ filter: /.*/, namespace: "ignore-modules" }, () => { + return { contents: "export default {}" }; + }); + }, +}); \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/postBuildPlugin.mjs b/scripts/esbuild/build/plugins/postBuildPlugin.mjs new file mode 100644 index 000000000..9e0ad9c12 --- /dev/null +++ b/scripts/esbuild/build/plugins/postBuildPlugin.mjs @@ -0,0 +1,41 @@ +import path from "node:path"; +import { copyFileSync, unlinkSync, existsSync } from "node:fs"; + +/** + * Plugin to post-process build files. + * Equivalent to webpack's PostBuildPlugin. + */ +export const postBuildPlugin = (distDir, rootDir) => { + // it should copy the files only once. In watch mode for example it should not rerun every time + let completed = false; + return { + name: "post-build", + setup(build) { + build.onEnd(() => { + if (completed) return; + completed = true; + + const ORT_JSEP_FILE = 'ort-wasm-simd-threaded.jsep.mjs'; + const ORT_BUNDLE_FILE = 'ort.bundle.min.mjs'; + + // 1. Remove unnecessary files + const file = path.join(distDir, ORT_BUNDLE_FILE); + if (existsSync(file)) unlinkSync(file); + + // 2. Copy unbundled JSEP file + try { + const ORT_SOURCE_DIR = path.join( + rootDir, + "node_modules/onnxruntime-web/dist", + ); + const src = path.join(ORT_SOURCE_DIR, ORT_JSEP_FILE); + const dest = path.join(distDir, ORT_JSEP_FILE); + copyFileSync(src, dest); + console.log(`Copied ${ORT_JSEP_FILE}`); + } catch (error) { + console.warn(`!!! Warning: Could not copy ${ORT_JSEP_FILE}:`, error.message); + } + }); + }, + }; +}; \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/rebuildPlugin.mjs b/scripts/esbuild/build/plugins/rebuildPlugin.mjs new file mode 100644 index 000000000..3e225c95a --- /dev/null +++ b/scripts/esbuild/build/plugins/rebuildPlugin.mjs @@ -0,0 +1,26 @@ +/** + * Plugin to log rebuild events with timing + */ +export const rebuildPlugin = (name) => { + let startTime = 0; + + return { + name: "rebuild-logger", + setup(build) { + build.onStart(() => { + startTime = performance.now(); + }); + + build.onEnd((result) => { + const endTime = performance.now(); + const duration = (endTime - startTime).toFixed(2); + + if (result.errors.length > 0) { + console.log(`\n${name} - Build failed with ${result.errors.length} error(s) in ${duration}ms`); + } else { + console.log(`\n${name} - Rebuilt in ${duration}ms`); + } + }); + }, + }; +}; \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs b/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs new file mode 100644 index 000000000..4a52d8340 --- /dev/null +++ b/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs @@ -0,0 +1,15 @@ +/** + * Plugin to strip the "node:" prefix from module requests. + * Equivalent to webpack's StripNodePrefixPlugin. + */ +export const stripNodePrefixPlugin = () => ({ + name: "strip-node-prefix", + setup(build) { + build.onResolve({ filter: /^node:/ }, (args) => { + return { + path: args.path.replace(/^node:/, ""), + external: true, + }; + }); + }, +}); \ No newline at end of file diff --git a/scripts/esbuild/build/reportSize.mjs b/scripts/esbuild/build/reportSize.mjs new file mode 100644 index 000000000..713e0fbce --- /dev/null +++ b/scripts/esbuild/build/reportSize.mjs @@ -0,0 +1,18 @@ +import { readFileSync } from "node:fs"; +import { gzipSync } from "node:zlib"; + +export const formatSize = (bytes) => { + if (bytes < 1024) return `${bytes}b`; + if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)}kb`; + return `${(bytes / (1024 * 1024)).toFixed(2)}mb`; +}; + +export const reportSize = (outfile) => { + const content = readFileSync(outfile); + const size = content.length; + const gzipSize = gzipSync(content).length; + + console.log( + `\n${outfile}\n${formatSize(size)} (gzip: ${formatSize(gzipSize)})`, + ); +}; \ No newline at end of file diff --git a/scripts/esbuild/dev.mjs b/scripts/esbuild/dev.mjs new file mode 100644 index 000000000..b651b3794 --- /dev/null +++ b/scripts/esbuild/dev.mjs @@ -0,0 +1,97 @@ +import { context } from "esbuild"; +import { existsSync, mkdirSync } from "node:fs"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { postBuildPlugin } from "./build/plugins/postBuildPlugin.mjs"; +import { stripNodePrefixPlugin } from "./build/plugins/stripNodePrefixPlugin.mjs"; +import { ignoreModulesPlugin } from "./build/plugins/ignoreModulesPlugin.mjs"; +import { rebuildPlugin } from "./build/plugins/rebuildPlugin.mjs"; +import { DIST_FOLDER, WEB_IGNORE_MODULES } from "./build/constants.mjs"; +import { startServer } from "./build/httpServer.mjs"; +import { execSync } from "node:child_process"; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const rootDir = path.join(__dirname, "../.."); + +const outdir = path.join(rootDir, DIST_FOLDER); +const startTime = performance.now(); + +// Ensure output directory exists +if (!existsSync(outdir)) { + mkdirSync(outdir, { recursive: true }); +} + +console.log("=== CLEAN ==="); +execSync(`rimraf ${outdir}`, { stdio: "inherit" }); +console.log(`cleaned directory: ${outdir}`) + +console.log("\n=== BUILD ==="); +console.log("Building transformers.js with esbuild in watch mode..."); + +// Create build contexts for watch mode +const bundleContext = await context({ + bundle: true, + treeShaking: true, + logLevel: "info", + entryPoints: [path.join(rootDir, "src/transformers.js")], + platform: "neutral", + format: "esm", + outfile: path.join(outdir, "transformers.js"), + sourcemap: true, + plugins: [ + ignoreModulesPlugin(WEB_IGNORE_MODULES), + stripNodePrefixPlugin(), + postBuildPlugin(outdir, rootDir), + rebuildPlugin("Bundle"), + ], + logOverride: { + "empty-import-meta": "silent", + }, +}); + +const webContext = await context({ + bundle: true, + treeShaking: true, + logLevel: "info", + entryPoints: [path.join(rootDir, "src/transformers.js")], + platform: "neutral", + format: "esm", + outfile: path.join(outdir, "transformers.web.js"), + sourcemap: true, + external: ["onnxruntime-common", "onnxruntime-web"], + plugins: [ + ignoreModulesPlugin(WEB_IGNORE_MODULES), + stripNodePrefixPlugin(), + rebuildPlugin("Web"), + ], + logOverride: { + "empty-import-meta": "silent", + }, +}); + +console.log("\nInitial build starting..."); + +await Promise.all([bundleContext.watch(), webContext.watch()]); + +const endTime = performance.now(); +const duration = (endTime - startTime).toFixed(2); +console.log(`\nAll builds completed successfully in ${duration}ms!`); + +const PORT = 8080; + +console.log("\n=== SERVE ==="); +const server = await startServer(outdir, PORT); + +console.log(`\nServer running at http://localhost:${PORT}/`); +console.log(`Serving files from: ${outdir}`); + +console.log(`\nWatching for changes...\n`); + +// Keep process alive and cleanup +process.on("SIGINT", async () => { + console.log("\n\nStopping watch mode and server..."); + server.close(); + await bundleContext.dispose(); + await webContext.dispose(); + process.exit(0); +}); diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 4d8edb24f..000000000 --- a/webpack.config.js +++ /dev/null @@ -1,222 +0,0 @@ -import { fileURLToPath } from "node:url"; -import path from "node:path"; -import fs from "node:fs"; -import webpack from "webpack"; -import TerserPlugin from "terser-webpack-plugin"; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -/** - * Plugin to strip the "node:" prefix from module requests. - * - * This is necessary to ensure both web and node builds work correctly, - * otherwise we would get an error like: - * ``` - * Module build failed: UnhandledSchemeError: Reading from "node:path" is not handled by plugins (Unhandled scheme). - * Webpack supports "data:" and "file:" URIs by default. - * You may need an additional plugin to handle "node:" URIs. - * ``` - * - * NOTE: We then do not need to use the `node:` prefix in the resolve.alias configuration. - */ -class StripNodePrefixPlugin extends webpack.NormalModuleReplacementPlugin { - constructor() { - super(/^node:(.+)$/, (resource) => { - resource.request = resource.request.replace(/^node:/, ""); - }); - } -} - -/** - * Plugin to post-process build files. Required to solve certain issues with ESM module output. - * See https://github.com/webpack/webpack/issues/17121 for more information. - * - * @see https://webpack.js.org/contribute/writing-a-plugin/ - */ -class PostBuildPlugin { - static completed = false; - - apply(compiler) { - compiler.hooks.done.tap("PostBuildPlugin", () => { - if (!process.env.WEBPACK_SERVE && !PostBuildPlugin.completed) { - // Ensure we only run this once - PostBuildPlugin.completed = true; - return; - } - const dist = path.join(__dirname, "dist"); - const ORT_JSEP_FILE = "ort-wasm-simd-threaded.asyncify.mjs"; - const ORT_BUNDLE_FILE = "ort.webgpu.bundle.min.mjs"; - - // 1. Copy unbundled asyncify file - { - const src = path.join( - __dirname, - "node_modules/onnxruntime-web/dist", - ORT_JSEP_FILE, - ); - const dest = path.join(dist, ORT_JSEP_FILE); - fs.copyFileSync(src, dest); - } - - // 2. Remove unnecessary files - { - const file = path.join(dist, ORT_BUNDLE_FILE); - if (fs.existsSync(file)) fs.unlinkSync(file); - } - }); - } -} - -/** - * Helper function to create webpack configurations. - * @param {Object} options Options for creating a webpack target. - * @param {string} options.name Name of output file. - * @param {string} options.suffix Suffix of output file. - * @param {string} options.type Type of library. - * @param {string} options.ignoreModules The list of modules to ignore. - * @param {string} options.externalModules The list of modules to set as external. - * @param {Object[]} options.plugins List of plugins to use. - * @returns {import('webpack').Configuration} One webpack target. - */ -function buildConfig({ - name = "", - suffix = ".js", - type = "module", // 'module' | 'commonjs' - ignoreModules = [], - externalModules = [], - plugins = [], -} = {}) { - const outputModule = type === "module"; - const alias = Object.fromEntries( - ignoreModules.map((module) => [module, false]), - ); - - /** @type {import('webpack').Configuration} */ - const config = { - mode: "development", - devtool: "source-map", - entry: { - [`transformers${name}`]: "./src/transformers.js", - [`transformers${name}.min`]: "./src/transformers.js", - }, - output: { - filename: `[name]${suffix}`, - path: path.join(__dirname, "dist"), - library: { - type, - }, - assetModuleFilename: "[name][ext]", - chunkFormat: false, - }, - optimization: { - minimize: true, - minimizer: [ - new TerserPlugin({ - test: new RegExp(`\\.min\\${suffix}$`), - - // Do not bundle with comments. - // See https://webpack.js.org/plugins/terser-webpack-plugin/#remove-comments for more information. - terserOptions: { - output: { - comments: false, - }, - }, - extractComments: false, - }), - ], - }, - experiments: { - outputModule, - }, - resolve: { alias }, - - externals: externalModules, - - // Development server - devServer: { - static: { - directory: __dirname, - }, - port: 8080, - }, - plugins, - }; - - if (outputModule) { - config.module = { - parser: { - javascript: { - importMeta: false, - }, - }, - }; - } else { - config.externalsType = "commonjs"; - } - - return config; -} - -// Do not bundle onnxruntime-web when packaging for Node.js. -// Instead, we use the native library (onnxruntime-node). -const NODE_IGNORE_MODULES = ["onnxruntime-web"]; - -// Do not bundle the following modules with webpack (mark as external) -// NOTE: This is necessary for both type="module" and type="commonjs", -// and will be ignored when building for web (only used for node/deno) -const NODE_EXTERNAL_MODULES = [ - "onnxruntime-common", - "onnxruntime-node", - "sharp", - "node:fs", - "node:path", - "node:url", -]; - -// Do not bundle node-only packages when bundling for the web. -// NOTE: We can exclude the "node:" prefix for built-in modules here, -// since we apply the `StripNodePrefixPlugin` to strip it. -const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url"]; - -// Do not bundle the following modules with webpack (mark as external) -const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"]; - -// Web-only build -const WEB_BUILD = buildConfig({ - name: ".web", - type: "module", - ignoreModules: WEB_IGNORE_MODULES, - externalModules: WEB_EXTERNAL_MODULES, - plugins: [new StripNodePrefixPlugin(), new PostBuildPlugin()], -}); - -// Web-only build, bundled with onnxruntime-web -const BUNDLE_BUILD = buildConfig({ - type: "module", - ignoreModules: WEB_IGNORE_MODULES, - plugins: [new StripNodePrefixPlugin(), new PostBuildPlugin()], -}); - -// Node-compatible builds -const NODE_BUILDS = [ - buildConfig({ - name: ".node", - suffix: ".mjs", - type: "module", - ignoreModules: NODE_IGNORE_MODULES, - externalModules: NODE_EXTERNAL_MODULES, - }), - buildConfig({ - name: ".node", - suffix: ".cjs", - type: "commonjs", - ignoreModules: NODE_IGNORE_MODULES, - externalModules: NODE_EXTERNAL_MODULES, - }), -]; - -// When running with `webpack serve`, only build the web target. -const BUILDS = process.env.WEBPACK_SERVE - ? [BUNDLE_BUILD] - : [BUNDLE_BUILD, WEB_BUILD, ...NODE_BUILDS]; -export default BUILDS; From 83efb3e35b6d6951512ef186bf0865a58fcc9377 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Tue, 2 Dec 2025 09:41:45 +0100 Subject: [PATCH 2/3] fixed stream and stream/promises import --- scripts/esbuild/build/constants.mjs | 2 +- .../esbuild/build/plugins/ignoreModulesPlugin.mjs | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/esbuild/build/constants.mjs b/scripts/esbuild/build/constants.mjs index bd912a895..a1478322e 100644 --- a/scripts/esbuild/build/constants.mjs +++ b/scripts/esbuild/build/constants.mjs @@ -9,5 +9,5 @@ export const NODE_EXTERNAL_MODULES = [ "node:url", ]; -export const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url"]; +export const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url", "stream", "stream/promises"]; export const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"]; \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs index 0d4e41dd6..8dd5fc217 100644 --- a/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs +++ b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs @@ -17,7 +17,17 @@ export const ignoreModulesPlugin = (modules = []) => ({ return { path: args.path, namespace: "ignore-modules" }; }); build.onLoad({ filter: /.*/, namespace: "ignore-modules" }, () => { - return { contents: "export default {}" }; + return { + contents: ` + const noop = () => {}; + const emptyObj = {}; + export default emptyObj; + export const Readable = { fromWeb: noop }; + export const pipeline = noop; + export const createWriteStream = noop; + export const createReadStream = noop; + ` + }; }); }, }); \ No newline at end of file From cc7513f4a698503aefc99e24611b3e8d3cc420d1 Mon Sep 17 00:00:00 2001 From: Nico Martin Date: Wed, 3 Dec 2025 14:10:55 +0100 Subject: [PATCH 3/3] changes after review --- .prettierignore | 2 +- .prettierrc | 7 + package-lock.json | 129 ++++-------------- package.json | 3 +- scripts/esbuild/build.mjs | 58 +++----- scripts/esbuild/build/constants.mjs | 33 ++++- scripts/esbuild/build/httpServer.mjs | 85 ++++++------ .../plugins/externalNodeBuiltinsPlugin.mjs | 14 ++ .../build/plugins/ignoreModulesPlugin.mjs | 8 +- .../esbuild/build/plugins/postBuildPlugin.mjs | 11 +- .../esbuild/build/plugins/rebuildPlugin.mjs | 2 +- .../build/plugins/stripNodePrefixPlugin.mjs | 2 +- scripts/esbuild/build/prepareOutDir.mjs | 9 ++ scripts/esbuild/build/reportSize.mjs | 6 +- scripts/esbuild/dev.mjs | 54 ++------ 15 files changed, 180 insertions(+), 243 deletions(-) create mode 100644 scripts/esbuild/build/plugins/externalNodeBuiltinsPlugin.mjs create mode 100644 scripts/esbuild/build/prepareOutDir.mjs diff --git a/.prettierignore b/.prettierignore index e66246bae..92c713b9d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -2,6 +2,6 @@ .github dist docs -scripts +scripts/**/*.py types *.md diff --git a/.prettierrc b/.prettierrc index a9e0acb4f..39d89ff84 100644 --- a/.prettierrc +++ b/.prettierrc @@ -14,6 +14,13 @@ "tabWidth": 2, "printWidth": 10000000 } + }, + { + "files": ["scripts/**/*.{js,mjs,cjs}"], + "options": { + "tabWidth": 2, + "printWidth": 120 + } } ] } diff --git a/package-lock.json b/package-lock.json index fcd39edf4..998a6f545 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,16 +10,15 @@ "license": "Apache-2.0", "dependencies": { "@huggingface/jinja": "^0.5.1", - "esbuild": "^0.27.0", "onnxruntime-node": "1.24.0-dev.20251104-75d35474d5", "onnxruntime-web": "1.24.0-dev.20251104-75d35474d5", - "rimraf": "^6.1.2", "sharp": "^0.34.3" }, "devDependencies": { "@types/jest": "^30.0.0", "@types/node": "^24.0.11", "@webgpu/types": "^0.1.64", + "esbuild": "^0.27.0", "jest": "^30.0.4", "jest-environment-node": "^30.0.4", "jsdoc-to-markdown": "^9.1.1", @@ -635,6 +634,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -651,6 +651,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -667,6 +668,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -683,6 +685,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -699,6 +702,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -715,6 +719,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -731,6 +736,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -747,6 +753,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -763,6 +770,7 @@ "cpu": [ "arm" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -779,6 +787,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -795,6 +804,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -811,6 +821,7 @@ "cpu": [ "loong64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -827,6 +838,7 @@ "cpu": [ "mips64el" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -843,6 +855,7 @@ "cpu": [ "ppc64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -859,6 +872,7 @@ "cpu": [ "riscv64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -875,6 +889,7 @@ "cpu": [ "s390x" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -891,6 +906,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -907,6 +923,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -923,6 +940,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -939,6 +957,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -955,6 +974,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -971,6 +991,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -987,6 +1008,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1003,6 +1025,7 @@ "cpu": [ "arm64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1019,6 +1042,7 @@ "cpu": [ "ia32" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1035,6 +1059,7 @@ "cpu": [ "x64" ], + "dev": true, "license": "MIT", "optional": true, "os": [ @@ -1089,27 +1114,6 @@ "url": "https://opencollective.com/libvips" } }, - "node_modules/@isaacs/balanced-match": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", - "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", - "license": "MIT", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/@isaacs/brace-expansion": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", - "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", - "license": "MIT", - "dependencies": { - "@isaacs/balanced-match": "^4.0.1" - }, - "engines": { - "node": "20 || >=22" - } - }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2931,6 +2935,7 @@ "version": "0.27.0", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.0.tgz", "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "dev": true, "hasInstallScript": true, "license": "MIT", "bin": { @@ -4695,6 +4700,7 @@ "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, "license": "ISC", "engines": { "node": ">=16 || 14 >=14.17" @@ -4887,6 +4893,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, "license": "BlueOak-1.0.0" }, "node_modules/parse-json": { @@ -5160,82 +5167,6 @@ "node": ">=0.10.0" } }, - "node_modules/rimraf": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz", - "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==", - "license": "BlueOak-1.0.0", - "dependencies": { - "glob": "^13.0.0", - "package-json-from-dist": "^1.0.1" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz", - "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "minimatch": "^10.1.1", - "minipass": "^7.1.2", - "path-scurry": "^2.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/lru-cache": { - "version": "11.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.2.tgz", - "integrity": "sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==", - "license": "ISC", - "engines": { - "node": "20 || >=22" - } - }, - "node_modules/rimraf/node_modules/minimatch": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz", - "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/brace-expansion": "^5.0.0" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/path-scurry": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz", - "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^11.0.0", - "minipass": "^7.1.2" - }, - "engines": { - "node": "20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/roarr": { "version": "2.15.4", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index e2d3bd860..4270a21fe 100644 --- a/package.json +++ b/package.json @@ -56,16 +56,15 @@ "homepage": "https://github.com/huggingface/transformers.js#readme", "dependencies": { "@huggingface/jinja": "^0.5.1", - "esbuild": "^0.27.0", "onnxruntime-node": "1.24.0-dev.20251104-75d35474d5", "onnxruntime-web": "1.24.0-dev.20251104-75d35474d5", - "rimraf": "^6.1.2", "sharp": "^0.34.3" }, "devDependencies": { "@types/jest": "^30.0.0", "@types/node": "^24.0.11", "@webgpu/types": "^0.1.64", + "esbuild": "^0.27.0", "jest": "^30.0.4", "jest-environment-node": "^30.0.4", "jsdoc-to-markdown": "^9.1.1", diff --git a/scripts/esbuild/build.mjs b/scripts/esbuild/build.mjs index 624846ff3..8fa39c0c8 100644 --- a/scripts/esbuild/build.mjs +++ b/scripts/esbuild/build.mjs @@ -1,18 +1,23 @@ import { build as esbuild } from "esbuild"; -import { execSync } from "node:child_process"; -import { existsSync, mkdirSync } from "node:fs"; import path from "node:path"; -import { fileURLToPath } from "node:url"; import { stripNodePrefixPlugin } from "./build/plugins/stripNodePrefixPlugin.mjs"; import { ignoreModulesPlugin } from "./build/plugins/ignoreModulesPlugin.mjs"; import { postBuildPlugin } from "./build/plugins/postBuildPlugin.mjs"; -import { DIST_FOLDER, NODE_IGNORE_MODULES, NODE_EXTERNAL_MODULES, WEB_IGNORE_MODULES, WEB_EXTERNAL_MODULES } from "./build/constants.mjs"; +import { externalNodeBuiltinsPlugin } from "./build/plugins/externalNodeBuiltinsPlugin.mjs"; +import { + NODE_IGNORE_MODULES, + NODE_EXTERNAL_MODULES, + WEB_IGNORE_MODULES, + WEB_EXTERNAL_MODULES, + OUT_DIR, + ROOT_DIR, + getEsbuildProdConfig, +} from "./build/constants.mjs"; import { reportSize } from "./build/reportSize.mjs"; - -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const rootDir = path.join(__dirname, "../.."); +import prepareOutDir from "./build/prepareOutDir.mjs"; /** + * * Helper function to create build configurations. * Equivalent to webpack's buildConfig function. */ @@ -25,11 +30,6 @@ async function buildTarget({ usePostBuild = false, }) { const platform = format === "cjs" ? "node" : "neutral"; - const outdir = path.join(rootDir, DIST_FOLDER); - - if (!existsSync(outdir)) { - mkdirSync(outdir, { recursive: true }); - } const regularFile = `transformers${name}${suffix}`; const minFile = `transformers${name}.min${suffix}`; @@ -40,49 +40,34 @@ async function buildTarget({ plugins.push(ignoreModulesPlugin(ignoreModules)); } plugins.push(stripNodePrefixPlugin()); + plugins.push(externalNodeBuiltinsPlugin()); if (usePostBuild) { - plugins.push(postBuildPlugin(outdir, rootDir)); + plugins.push(postBuildPlugin(OUT_DIR, ROOT_DIR)); } console.log(`\nBuilding ${regularFile}...`); await esbuild({ - bundle: true, - treeShaking: true, - logLevel: "warning", - entryPoints: [path.join(rootDir, "src/transformers.js")], + ...getEsbuildProdConfig(ROOT_DIR), platform, format, - outfile: path.join(outdir, regularFile), - sourcemap: true, + outfile: path.join(OUT_DIR, regularFile), external: externalModules, plugins, - logOverride: { - // Suppress import.meta warning for CJS builds - it's handled gracefully in the code - "empty-import-meta": "silent", - }, }); - reportSize(path.join(outdir, regularFile)); + reportSize(path.join(OUT_DIR, regularFile)); console.log(`\nBuilding ${minFile}...`); await esbuild({ - bundle: true, - treeShaking: true, - logLevel: "warning", - entryPoints: [path.join(rootDir, "src/transformers.js")], + ...getEsbuildProdConfig(ROOT_DIR), platform, format, - outfile: path.join(outdir, minFile), - sourcemap: true, + outfile: path.join(OUT_DIR, minFile), minify: true, external: externalModules, plugins, legalComments: "none", - logOverride: { - // Suppress import.meta warning for CJS builds - it's handled gracefully in the code - "empty-import-meta": "silent", - }, }); - reportSize(path.join(outdir, minFile)); + reportSize(path.join(OUT_DIR, minFile)); } console.log("\nBuilding transformers.js with esbuild...\n"); @@ -90,8 +75,7 @@ console.log("\nBuilding transformers.js with esbuild...\n"); const startTime = performance.now(); try { - console.log("=== CLEAN ==="); - execSync(`rimraf ${DIST_FOLDER}`, { stdio: "inherit" }); + prepareOutDir(OUT_DIR); // Bundle build - bundles everything except ignored modules console.log("\n=== Bundle Build (ESM) ==="); diff --git a/scripts/esbuild/build/constants.mjs b/scripts/esbuild/build/constants.mjs index a1478322e..14c80ae2f 100644 --- a/scripts/esbuild/build/constants.mjs +++ b/scripts/esbuild/build/constants.mjs @@ -1,13 +1,38 @@ +import path from "node:path"; +import { fileURLToPath } from "node:url"; + export const DIST_FOLDER = "dist"; export const NODE_IGNORE_MODULES = ["onnxruntime-web"]; export const NODE_EXTERNAL_MODULES = [ "onnxruntime-common", "onnxruntime-node", "sharp", - "node:fs", - "node:path", - "node:url", + // node:* modules are handled by externalNodeBuiltinsPlugin ]; export const WEB_IGNORE_MODULES = ["onnxruntime-node", "sharp", "fs", "path", "url", "stream", "stream/promises"]; -export const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"]; \ No newline at end of file +export const WEB_EXTERNAL_MODULES = ["onnxruntime-common", "onnxruntime-web"]; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +export const ROOT_DIR = path.join(__dirname, "../../.."); +export const OUT_DIR = path.join(ROOT_DIR, DIST_FOLDER); + +export const getEsbuildDevConfig = (rootDir) => ({ + bundle: true, + treeShaking: true, + logLevel: "info", + entryPoints: [path.join(rootDir, "src/transformers.js")], + platform: "neutral", + format: "esm", + sourcemap: true, + logOverride: { + // Suppress import.meta warning for CJS builds - it's handled gracefully in the code + "empty-import-meta": "silent", + }, +}); + +export const getEsbuildProdConfig = (rootDir) => ({ + ...getEsbuildDevConfig(rootDir), + logLevel: "warning", + sourcemap: false, +}); diff --git a/scripts/esbuild/build/httpServer.mjs b/scripts/esbuild/build/httpServer.mjs index 66a63bac4..8c86514de 100644 --- a/scripts/esbuild/build/httpServer.mjs +++ b/scripts/esbuild/build/httpServer.mjs @@ -16,58 +16,59 @@ const MIME_TYPES = { ".ico": "image/x-icon", }; -export const startServer = (dir, PORT = 8080) => new Promise(resolve =>{ - const server = createServer((req, res) => { - // Enable CORS - res.setHeader("Access-Control-Allow-Origin", "*"); - res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); - res.setHeader("Access-Control-Allow-Headers", "Content-Type"); +export const startServer = (dir, PORT = 8080) => + new Promise((resolve) => { + const server = createServer((req, res) => { + // Enable CORS + res.setHeader("Access-Control-Allow-Origin", "*"); + res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS"); + res.setHeader("Access-Control-Allow-Headers", "Content-Type"); - if (req.method === "OPTIONS") { - res.writeHead(204); - res.end(); - return; - } - - let filePath = req.url === "/" ? "/index.html" : req.url; - filePath = filePath.split("?")[0]; // Remove query params + if (req.method === "OPTIONS") { + res.writeHead(204); + res.end(); + return; + } - // Try to serve from outdir first, then fall back to rootDir - let fullPath = path.join(dir, filePath); + let filePath = req.url === "/" ? "/index.html" : req.url; + filePath = filePath.split("?")[0]; // Remove query params - // Check if file exists - if (!existsSync(fullPath)) { - res.writeHead(404, { "Content-Type": "text/plain" }); - res.end("404 Not Found"); - return; - } + // Try to serve from outdir first, then fall back to rootDir + let fullPath = path.join(dir, filePath); - // Check if it's a directory - const stat = statSync(fullPath); - if (stat.isDirectory()) { - fullPath = path.join(fullPath, "index.html"); + // Check if file exists if (!existsSync(fullPath)) { res.writeHead(404, { "Content-Type": "text/plain" }); res.end("404 Not Found"); return; } - } - // Get MIME type - const ext = path.extname(fullPath); - const mimeType = MIME_TYPES[ext] || "application/octet-stream"; + // Check if it's a directory + const stat = statSync(fullPath); + if (stat.isDirectory()) { + fullPath = path.join(fullPath, "index.html"); + if (!existsSync(fullPath)) { + res.writeHead(404, { "Content-Type": "text/plain" }); + res.end("404 Not Found"); + return; + } + } - try { - const content = readFileSync(fullPath); - res.writeHead(200, { "Content-Type": mimeType }); - res.end(content); - } catch (error) { - res.writeHead(500, { "Content-Type": "text/plain" }); - res.end("500 Internal Server Error"); - } - }); + // Get MIME type + const ext = path.extname(fullPath); + const mimeType = MIME_TYPES[ext] || "application/octet-stream"; + + try { + const content = readFileSync(fullPath); + res.writeHead(200, { "Content-Type": mimeType }); + res.end(content); + } catch (error) { + res.writeHead(500, { "Content-Type": "text/plain" }); + res.end("500 Internal Server Error"); + } + }); - server.listen(PORT, () => { - resolve(server); + server.listen(PORT, () => { + resolve(server); + }); }); -}); \ No newline at end of file diff --git a/scripts/esbuild/build/plugins/externalNodeBuiltinsPlugin.mjs b/scripts/esbuild/build/plugins/externalNodeBuiltinsPlugin.mjs new file mode 100644 index 000000000..ce0b28cee --- /dev/null +++ b/scripts/esbuild/build/plugins/externalNodeBuiltinsPlugin.mjs @@ -0,0 +1,14 @@ +/** + * Plugin to automatically mark all node:* imports as external. + * This prevents having to manually list all Node.js built-in modules. + */ +export const externalNodeBuiltinsPlugin = () => ({ + name: "external-node-builtins", + setup(build) { + // Mark all node:* imports as external + build.onResolve({ filter: /^node:/ }, (args) => ({ + path: args.path, + external: true, + })); + }, +}); diff --git a/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs index 8dd5fc217..c9d57e6c6 100644 --- a/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs +++ b/scripts/esbuild/build/plugins/ignoreModulesPlugin.mjs @@ -6,11 +6,11 @@ export const ignoreModulesPlugin = (modules = []) => ({ name: "ignore-modules", setup(build) { // Escape special regex characters in module names - const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); const escapedModules = modules.map(escapeRegex); // Match both "module" and "node:module" patterns - const patterns = escapedModules.flatMap(mod => [mod, `node:${mod}`]); + const patterns = escapedModules.flatMap((mod) => [mod, `node:${mod}`]); const filter = new RegExp(`^(${patterns.join("|")})$`); build.onResolve({ filter }, (args) => { @@ -26,8 +26,8 @@ export const ignoreModulesPlugin = (modules = []) => ({ export const pipeline = noop; export const createWriteStream = noop; export const createReadStream = noop; - ` + `, }; }); }, -}); \ No newline at end of file +}); diff --git a/scripts/esbuild/build/plugins/postBuildPlugin.mjs b/scripts/esbuild/build/plugins/postBuildPlugin.mjs index 9e0ad9c12..8effd6970 100644 --- a/scripts/esbuild/build/plugins/postBuildPlugin.mjs +++ b/scripts/esbuild/build/plugins/postBuildPlugin.mjs @@ -15,8 +15,8 @@ export const postBuildPlugin = (distDir, rootDir) => { if (completed) return; completed = true; - const ORT_JSEP_FILE = 'ort-wasm-simd-threaded.jsep.mjs'; - const ORT_BUNDLE_FILE = 'ort.bundle.min.mjs'; + const ORT_JSEP_FILE = "ort-wasm-simd-threaded.jsep.mjs"; + const ORT_BUNDLE_FILE = "ort.bundle.min.mjs"; // 1. Remove unnecessary files const file = path.join(distDir, ORT_BUNDLE_FILE); @@ -24,10 +24,7 @@ export const postBuildPlugin = (distDir, rootDir) => { // 2. Copy unbundled JSEP file try { - const ORT_SOURCE_DIR = path.join( - rootDir, - "node_modules/onnxruntime-web/dist", - ); + const ORT_SOURCE_DIR = path.join(rootDir, "node_modules/onnxruntime-web/dist"); const src = path.join(ORT_SOURCE_DIR, ORT_JSEP_FILE); const dest = path.join(distDir, ORT_JSEP_FILE); copyFileSync(src, dest); @@ -38,4 +35,4 @@ export const postBuildPlugin = (distDir, rootDir) => { }); }, }; -}; \ No newline at end of file +}; diff --git a/scripts/esbuild/build/plugins/rebuildPlugin.mjs b/scripts/esbuild/build/plugins/rebuildPlugin.mjs index 3e225c95a..c385292d4 100644 --- a/scripts/esbuild/build/plugins/rebuildPlugin.mjs +++ b/scripts/esbuild/build/plugins/rebuildPlugin.mjs @@ -23,4 +23,4 @@ export const rebuildPlugin = (name) => { }); }, }; -}; \ No newline at end of file +}; diff --git a/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs b/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs index 4a52d8340..1a4cab983 100644 --- a/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs +++ b/scripts/esbuild/build/plugins/stripNodePrefixPlugin.mjs @@ -12,4 +12,4 @@ export const stripNodePrefixPlugin = () => ({ }; }); }, -}); \ No newline at end of file +}); diff --git a/scripts/esbuild/build/prepareOutDir.mjs b/scripts/esbuild/build/prepareOutDir.mjs new file mode 100644 index 000000000..5f9302d31 --- /dev/null +++ b/scripts/esbuild/build/prepareOutDir.mjs @@ -0,0 +1,9 @@ +import { existsSync, mkdirSync, rmSync } from "node:fs"; + +export default function prepareOutDir(dir) { + if (existsSync(dir)) { + rmSync(dir, { recursive: true, force: true }); + } + + mkdirSync(dir, { recursive: true }); +} diff --git a/scripts/esbuild/build/reportSize.mjs b/scripts/esbuild/build/reportSize.mjs index 713e0fbce..b806f6b3f 100644 --- a/scripts/esbuild/build/reportSize.mjs +++ b/scripts/esbuild/build/reportSize.mjs @@ -12,7 +12,5 @@ export const reportSize = (outfile) => { const size = content.length; const gzipSize = gzipSync(content).length; - console.log( - `\n${outfile}\n${formatSize(size)} (gzip: ${formatSize(gzipSize)})`, - ); -}; \ No newline at end of file + console.log(`\n${outfile}\n${formatSize(size)} (gzip: ${formatSize(gzipSize)})`); +}; diff --git a/scripts/esbuild/dev.mjs b/scripts/esbuild/dev.mjs index b651b3794..c879185cf 100644 --- a/scripts/esbuild/dev.mjs +++ b/scripts/esbuild/dev.mjs @@ -1,72 +1,44 @@ import { context } from "esbuild"; -import { existsSync, mkdirSync } from "node:fs"; import path from "node:path"; -import { fileURLToPath } from "node:url"; import { postBuildPlugin } from "./build/plugins/postBuildPlugin.mjs"; import { stripNodePrefixPlugin } from "./build/plugins/stripNodePrefixPlugin.mjs"; import { ignoreModulesPlugin } from "./build/plugins/ignoreModulesPlugin.mjs"; import { rebuildPlugin } from "./build/plugins/rebuildPlugin.mjs"; -import { DIST_FOLDER, WEB_IGNORE_MODULES } from "./build/constants.mjs"; +import { externalNodeBuiltinsPlugin } from "./build/plugins/externalNodeBuiltinsPlugin.mjs"; +import { getEsbuildDevConfig, OUT_DIR, ROOT_DIR, WEB_IGNORE_MODULES } from "./build/constants.mjs"; import { startServer } from "./build/httpServer.mjs"; -import { execSync } from "node:child_process"; +import prepareOutDir from "./build/prepareOutDir.mjs"; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const rootDir = path.join(__dirname, "../.."); - -const outdir = path.join(rootDir, DIST_FOLDER); const startTime = performance.now(); -// Ensure output directory exists -if (!existsSync(outdir)) { - mkdirSync(outdir, { recursive: true }); -} - -console.log("=== CLEAN ==="); -execSync(`rimraf ${outdir}`, { stdio: "inherit" }); -console.log(`cleaned directory: ${outdir}`) +prepareOutDir(OUT_DIR); console.log("\n=== BUILD ==="); console.log("Building transformers.js with esbuild in watch mode..."); // Create build contexts for watch mode const bundleContext = await context({ - bundle: true, - treeShaking: true, - logLevel: "info", - entryPoints: [path.join(rootDir, "src/transformers.js")], - platform: "neutral", - format: "esm", - outfile: path.join(outdir, "transformers.js"), - sourcemap: true, + ...getEsbuildDevConfig(ROOT_DIR), + outfile: path.join(OUT_DIR, "transformers.js"), plugins: [ ignoreModulesPlugin(WEB_IGNORE_MODULES), stripNodePrefixPlugin(), - postBuildPlugin(outdir, rootDir), + externalNodeBuiltinsPlugin(), + postBuildPlugin(OUT_DIR, ROOT_DIR), rebuildPlugin("Bundle"), ], - logOverride: { - "empty-import-meta": "silent", - }, }); const webContext = await context({ - bundle: true, - treeShaking: true, - logLevel: "info", - entryPoints: [path.join(rootDir, "src/transformers.js")], - platform: "neutral", - format: "esm", - outfile: path.join(outdir, "transformers.web.js"), - sourcemap: true, + ...getEsbuildDevConfig(ROOT_DIR), + outfile: path.join(OUT_DIR, "transformers.web.js"), external: ["onnxruntime-common", "onnxruntime-web"], plugins: [ ignoreModulesPlugin(WEB_IGNORE_MODULES), stripNodePrefixPlugin(), + externalNodeBuiltinsPlugin(), rebuildPlugin("Web"), ], - logOverride: { - "empty-import-meta": "silent", - }, }); console.log("\nInitial build starting..."); @@ -80,10 +52,10 @@ console.log(`\nAll builds completed successfully in ${duration}ms!`); const PORT = 8080; console.log("\n=== SERVE ==="); -const server = await startServer(outdir, PORT); +const server = await startServer(OUT_DIR, PORT); console.log(`\nServer running at http://localhost:${PORT}/`); -console.log(`Serving files from: ${outdir}`); +console.log(`Serving files from: ${OUT_DIR}`); console.log(`\nWatching for changes...\n`);