From 19ecfee4bffcae3949c04af26600719468275923 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 18 Oct 2025 12:11:32 -0500 Subject: [PATCH 1/3] Add Buffer polyfill --- package-lock.json | 65 ++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + src/lib/polyfills.ts | 12 ++++++++ 3 files changed, 78 insertions(+) diff --git a/package-lock.json b/package-lock.json index 5aad45d..3d3e551 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,6 +43,7 @@ "@tanstack/react-query": "^5.56.2", "@unhead/addons": "^2.0.10", "@unhead/react": "^2.0.10", + "buffer": "^6.0.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", @@ -4116,6 +4117,26 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "license": "MIT" }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "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/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -4184,6 +4205,30 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "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", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", @@ -5473,6 +5518,26 @@ "node": ">=0.10.0" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "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": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", diff --git a/package.json b/package.json index a2b34ac..7ab2644 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "@tanstack/react-query": "^5.56.2", "@unhead/addons": "^2.0.10", "@unhead/react": "^2.0.10", + "buffer": "^6.0.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.0.0", diff --git a/src/lib/polyfills.ts b/src/lib/polyfills.ts index edb726e..17e7e56 100644 --- a/src/lib/polyfills.ts +++ b/src/lib/polyfills.ts @@ -1,3 +1,15 @@ +import Buffer from 'buffer'; + +/** + * Polyfill for Buffer in browser environment + * + * Many Node.js libraries like isomorphic-git and bitcoinjs-lib expect Buffer to be globally available. + * This polyfill makes the buffer package's Buffer available globally. + */ +if (!globalThis.Buffer) { + globalThis.Buffer = Buffer.Buffer; +} + /** * Polyfill for AbortSignal.any() * From 1b4c27d17dd6c6917281c90b303ea18c4b0f19a9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 21 Oct 2025 20:11:41 -0500 Subject: [PATCH 2/3] Use nostrify from npm --- package-lock.json | 134 ++++++++++++++++++++++++++++------------------ package.json | 4 +- 2 files changed, 84 insertions(+), 54 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3d3e551..0694653 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,8 @@ "@fontsource-variable/inter": "^5.2.6", "@getalby/sdk": "^5.1.1", "@hookform/resolvers": "^3.9.0", - "@nostrify/nostrify": "npm:@jsr/nostrify__nostrify@^0.46.4", - "@nostrify/react": "npm:@jsr/nostrify__react@^0.2.8", + "@nostrify/nostrify": "^0.47.1", + "@nostrify/react": "^0.2.17", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-aspect-ratio": "^1.1.0", @@ -1171,35 +1171,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jsr/nostrify__nostrify": { - "version": "0.46.4", - "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__nostrify/0.46.4.tgz", - "integrity": "sha512-bYuYkw9+jnHIDEJD6i+w0p8xV1oBLr1RF5rS3qF2yTz1b8i50dXKMO2cLObjalAAO3RYbnib3l85t1ZgWLCzAA==", - "dependencies": { - "@jsr/nostrify__types": "^0.36.0", - "@jsr/scure__base": "^1.2.4", - "@jsr/std__encoding": "^0.224.1", - "lru-cache": "^10.2.0", - "nostr-tools": "^2.13.0", - "websocket-ts": "^2.2.1", - "zod": "^3.23.8" - } - }, - "node_modules/@jsr/nostrify__types": { - "version": "0.36.0", - "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__types/0.36.0.tgz", - "integrity": "sha512-kDjFf1nJMhZafULtH2GW+TWjs85J0aDxYYLpwBDQugDVsFqG2kLbxnoE2NtMJCIMNk1vUaipUHeil//4fY/d2w==" - }, - "node_modules/@jsr/scure__base": { - "version": "1.2.5", - "resolved": "https://npm.jsr.io/~/11/@jsr/scure__base/1.2.5.tgz", - "integrity": "sha512-ino21k5s2kamz+uhAL/N3iI5vJ7x3zTtrzhM52iXBth41KxkFSIDiOlQNbMj4/jTih27jmS6Mi4Xke5vKTdNIA==" - }, - "node_modules/@jsr/std__encoding": { - "version": "0.224.3", - "resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/0.224.3.tgz", - "integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ==" - }, "node_modules/@noble/ciphers": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-0.5.3.tgz", @@ -1281,31 +1252,64 @@ } }, "node_modules/@nostrify/nostrify": { - "name": "@jsr/nostrify__nostrify", - "version": "0.46.4", - "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__nostrify/0.46.4.tgz", - "integrity": "sha512-bYuYkw9+jnHIDEJD6i+w0p8xV1oBLr1RF5rS3qF2yTz1b8i50dXKMO2cLObjalAAO3RYbnib3l85t1ZgWLCzAA==", + "version": "0.47.1", + "resolved": "https://registry.npmjs.org/@nostrify/nostrify/-/nostrify-0.47.1.tgz", + "integrity": "sha512-8jdAeKIyyDK/UQN92WgrQn9+B067HYcjfW35TpIjNLAT9qYe+KYFHaC9O6PD+I1DvLHziJMxk4Q18Fu4fqOiAQ==", "dependencies": { - "@jsr/nostrify__types": "^0.36.0", - "@jsr/scure__base": "^1.2.4", - "@jsr/std__encoding": "^0.224.1", + "@nostrify/types": "0.36.7", + "@scure/base": "^1.2.6", + "@std/encoding": "npm:@jsr/std__encoding@^0.224.1", + "@types/node": "^24.1.0", "lru-cache": "^10.2.0", "nostr-tools": "^2.13.0", "websocket-ts": "^2.2.1", + "ws": "^8.18.3", "zod": "^3.23.8" } }, - "node_modules/@nostrify/react": { - "name": "@jsr/nostrify__react", - "version": "0.2.8", - "resolved": "https://npm.jsr.io/~/11/@jsr/nostrify__react/0.2.8.tgz", - "integrity": "sha512-9sCsMm1uwuGWU+NhgFf6LS/4JzeRXnGOz+ocA5X3/ncvxZhidPOEAU39QyygRLFo/JYG8OC5wlyH8w0Uejq+VQ==", - "dependencies": { - "@jsr/nostrify__nostrify": "^0.46.4", - "nostr-tools": "^2.13.0", - "react": "^18.0.0" + "node_modules/@nostrify/nostrify/node_modules/@scure/base": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" } }, + "node_modules/@nostrify/nostrify/node_modules/@types/node": { + "version": "24.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.9.1.tgz", + "integrity": "sha512-QoiaXANRkSXK6p0Duvt56W208du4P9Uye9hWLWgGMDTEoKPhuenzNcC4vGUmrNkiOKTlIrBoyNQYNpSwfEZXSg==", + "license": "MIT", + "dependencies": { + "undici-types": "~7.16.0" + } + }, + "node_modules/@nostrify/nostrify/node_modules/undici-types": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", + "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "license": "MIT" + }, + "node_modules/@nostrify/react": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/@nostrify/react/-/react-0.2.17.tgz", + "integrity": "sha512-IG6XPiNBe1nDFZ055EnWufxASPjgOZ2cE53Hjanj5xQQURwzA946yMhDDzaHmD9lvoBYjuijopmTiyFk2RObHQ==", + "dependencies": { + "@nostrify/nostrify": "0.47.1", + "@nostrify/types": "0.36.7", + "@tanstack/react-query": "^5.69.0", + "happy-dom": "^17.4.4", + "nostr-tools": "^2.13.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, + "node_modules/@nostrify/types": { + "version": "0.36.7", + "resolved": "https://registry.npmjs.org/@nostrify/types/-/types-0.36.7.tgz", + "integrity": "sha512-Jdf2eWdIzonMzic/st4ltre7XIcXVNTjmcbKpw4xGEfNmoq2Y4wj8KcSB6s0TUqxcLEyiXnyGP8EDx/gEVri9A==" + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -3050,6 +3054,12 @@ "url": "https://paulmillr.com/funding/" } }, + "node_modules/@std/encoding": { + "name": "@jsr/std__encoding", + "version": "0.224.3", + "resolved": "https://npm.jsr.io/~/11/@jsr/std__encoding/0.224.3.tgz", + "integrity": "sha512-zAuX2QV1zwJ5RSmrnDGVerAtN3pBXpYYNlGzhERW9AiQ1UJd2/xruyB3i5NdTWy2OK2pjETswOj+0+prYTPlxQ==" + }, "node_modules/@swc/core": { "version": "1.11.24", "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.11.24.tgz", @@ -5436,6 +5446,28 @@ "dev": true, "license": "MIT" }, + "node_modules/happy-dom": { + "version": "17.6.3", + "resolved": "https://registry.npmjs.org/happy-dom/-/happy-dom-17.6.3.tgz", + "integrity": "sha512-UVIHeVhxmxedbWPCfgS55Jg2rDfwf2BCKeylcPSqazLz5w3Kri7Q4xdBJubsr/+VUzFLh0VjIvh13RaDA2/Xug==", + "license": "MIT", + "dependencies": { + "webidl-conversions": "^7.0.0", + "whatwg-mimetype": "^3.0.0" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/happy-dom/node_modules/whatwg-mimetype": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", + "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -8057,7 +8089,6 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=12" @@ -8249,10 +8280,9 @@ } }, "node_modules/ws": { - "version": "8.18.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", - "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", - "dev": true, + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 7ab2644..9f44f2d 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "@fontsource-variable/inter": "^5.2.6", "@getalby/sdk": "^5.1.1", "@hookform/resolvers": "^3.9.0", - "@nostrify/nostrify": "npm:@jsr/nostrify__nostrify@^0.46.4", - "@nostrify/react": "npm:@jsr/nostrify__react@^0.2.8", + "@nostrify/nostrify": "^0.47.1", + "@nostrify/react": "^0.2.17", "@radix-ui/react-accordion": "^1.2.0", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-aspect-ratio": "^1.1.0", From 0562cb8ee22eba0c61a7ab299ef5c200c0008e1e Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 21 Oct 2025 20:14:50 -0500 Subject: [PATCH 3/3] Remove some cruft --- .gemini/settings.json | 1 - .npmrc | 1 - 2 files changed, 2 deletions(-) delete mode 120000 .gemini/settings.json delete mode 100644 .npmrc diff --git a/.gemini/settings.json b/.gemini/settings.json deleted file mode 120000 index c67157d..0000000 --- a/.gemini/settings.json +++ /dev/null @@ -1 +0,0 @@ -../.mcp.json \ No newline at end of file diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 41583e3..0000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -@jsr:registry=https://npm.jsr.io