mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-11-22 06:09:55 +00:00
vite-plugin-node-polyfills depends on node-stdlib-browser, which always installs crypto-browserify -> browserify-sign/create-ecdh -> elliptic (GHSA-848j-6mx2-7j84, no patched release). No module in either bundle ever imported the crypto polyfill; what the plugin actually provided was three injected globals and the `events` alias. sign: the only call sites were @pezkuwi/x-global (`global`, after a globalThis check), shared/lib env helpers (`process`, typeof-guarded) and bn.js's optional Buffer probe (try/catch; BN#toBuffer has no callers). The plugin, the process shim alias and the `buffer` pre-bundle entry are removed outright. web: WalletConnect calls `Buffer.from` unguarded and imports `events`, so the globals are still needed. src/lib/node-globals.ts now provides Buffer/global/process, injected as scoped imports by @rollup/plugin-inject in the build and by esbuild's inject in the dev pre-bundle - the same 18 modules the plugin injected into, and still nothing written onto globalThis. `events` becomes a direct dependency. The unused shim files, the vitest shim aliases and the `elliptic` override are removed.
32 lines
902 B
JSON
32 lines
902 B
JSON
{
|
|
"name": "pezbridge-sign",
|
|
"private": true,
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"description": "Dedicated, minimal-surface signing portal for PezkuwiChain multisig operations - gated to known signatory addresses only.",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"preview": "vite preview"
|
|
},
|
|
"dependencies": {
|
|
"@pezkuwi/api": "^16.5.39",
|
|
"@pezkuwi/extension-dapp": "^0.62.27",
|
|
"@pezkuwi/extension-inject": "^0.62.27",
|
|
"@pezkuwi/keyring": "^14.0.26",
|
|
"@pezkuwi/util": "^14.0.26",
|
|
"@pezkuwi/util-crypto": "^14.0.26",
|
|
"react": "^18.3.1",
|
|
"react-dom": "^18.3.1"
|
|
},
|
|
"devDependencies": {
|
|
"@pezkuwi/api-augment": "^16.5.39",
|
|
"@types/node": "^22.20.5",
|
|
"@types/react": "^18.3.12",
|
|
"@types/react-dom": "^18.3.1",
|
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
"typescript": "^5.6.3",
|
|
"vite": "^6.4.5"
|
|
}
|
|
}
|