*add modified b4a

This commit is contained in:
Derrick Hammer 2023-03-19 15:22:53 -04:00
parent 4eb5f24696
commit da7f75820f
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 42 additions and 0 deletions

View File

@ -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"
}
}
}

36
patches/b4a@1.6.3.patch Normal file
View File

@ -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"
},