From da7f75820fe622ca95802fd4c783b2397a258493 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 19 Mar 2023 15:22:53 -0400 Subject: [PATCH] *add modified b4a --- package.json | 6 ++++++ patches/b4a@1.6.3.patch | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 patches/b4a@1.6.3.patch diff --git a/package.json b/package.json index d2a4861..fb6bb12 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "@lumeweb/interface-relay": "git+https://git.lumeweb.com/LumeWeb/interface-relay.git", "@lumeweb/kernel-swarm-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git", "@lumeweb/rpc-client": "git+https://git.lumeweb.com/LumeWeb/rpc-client.git", + "b4a": "^1.6.3", "libkmodule": "^0.2.53" }, "browser": { @@ -27,5 +28,10 @@ "read": "^2.0.0", "timers-browserify": "^2.0.12", "typescript": "^5.0.2" + }, + "pnpm": { + "patchedDependencies": { + "b4a@1.6.3": "patches/b4a@1.6.3.patch" + } } } diff --git a/patches/b4a@1.6.3.patch b/patches/b4a@1.6.3.patch new file mode 100644 index 0000000..13e4b09 --- /dev/null +++ b/patches/b4a@1.6.3.patch @@ -0,0 +1,36 @@ +diff --git a/browser.js b/browser.js +index e07f78d17b7b4a2963e4f0062047cc96e6025f9e..a9f266a2644f3f8ebd0f6684b3e11a7519059851 100644 +--- a/browser.js ++++ b/browser.js +@@ -3,6 +3,7 @@ const base64 = require('./lib/base64') + const hex = require('./lib/hex') + const utf8 = require('./lib/utf8') + const utf16le = require('./lib/utf16le') ++const Buffer = require('buffer').Buffer + + const LE = new Uint8Array(Uint16Array.of(0xff).buffer)[0] === 0xff + +diff --git a/index.js b/index.js +index a751d6b4d27c7dd903efbfdc87a98f61044a62b8..8bd32640afdcfbc475168d458c51f8b9162d1656 100644 +--- a/index.js ++++ b/index.js +@@ -1,3 +1,5 @@ ++const Buffer = require('buffer').Buffer ++ + function isBuffer (value) { + return Buffer.isBuffer(value) || value instanceof Uint8Array + } +diff --git a/package.json b/package.json +index eb0f792709b27e66f26658054781b4099507b5ed..69c4ff39c48b0bdd5f0bc7ebbade517e7c5d76e4 100644 +--- a/package.json ++++ b/package.json +@@ -8,9 +8,6 @@ + "index.js", + "lib" + ], +- "browser": { +- "./index.js": "./browser.js" +- }, + "scripts": { + "test": "standard && brittle test/*.mjs" + }, \ No newline at end of file