@utexo/rgb-lib 0.3.0-beta.10-bindings.begin.end → 0.3.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +13 -16
- package/package.json +22 -8
package/index.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
const os = require("os");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const
|
|
3
|
+
// Currently supported platforms
|
|
4
|
+
const supportedCombinations = [
|
|
5
|
+
{ platform: "linux", arch: "x64" },
|
|
6
|
+
{ platform: "linux", arch: "arm64" },
|
|
7
|
+
{ platform: "darwin", arch: "arm64" },
|
|
8
|
+
];
|
|
5
9
|
|
|
6
10
|
const platform = os.platform();
|
|
7
11
|
const arch = os.arch();
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
for (const arch of supportedArches) {
|
|
16
|
-
if (!supportedArches.includes(arch)) {
|
|
17
|
-
console.error(`Unsupported arch: ${arch}`);
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (platform === "win32" && arch === "arm64") {
|
|
13
|
+
const isSupported = supportedCombinations.some(
|
|
14
|
+
(combo) => combo.platform === platform && combo.arch === arch
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
if (!isSupported) {
|
|
22
18
|
console.error(`Unsupported platform-arch: ${platform}-${arch}`);
|
|
19
|
+
console.error("Supported combinations: linux-x64, linux-arm64, darwin-arm64");
|
|
23
20
|
process.exit(1);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
let nativePackageName = `@
|
|
23
|
+
let nativePackageName = `@utexo/rgb-lib-${platform}-${arch}`;
|
|
27
24
|
module.exports = require(nativePackageName);
|
package/package.json
CHANGED
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utexo/rgb-lib",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.11",
|
|
4
4
|
"description": "Node.js bindings for rgb-lib",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
6
|
+
"files": [
|
|
7
|
+
"index.js"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"No tests available\" && exit 1"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/UTEXO-Protocol/rgb-lib-nodejs.git"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"rgb",
|
|
18
|
+
"bitcoin"
|
|
19
|
+
],
|
|
10
20
|
"author": "UTEXO Protocol",
|
|
11
21
|
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/UTEXO-Protocol/rgb-lib-nodejs/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/UTEXO-Protocol/rgb-lib-nodejs#readme",
|
|
12
26
|
"optionalDependencies": {
|
|
13
|
-
"@utexo/rgb-lib-linux-x64": "0.3.0-beta.
|
|
14
|
-
"@utexo/rgb-lib-linux-arm64": "0.3.0-beta.
|
|
15
|
-
"@utexo/rgb-lib-darwin-arm64": "0.3.0-beta.
|
|
27
|
+
"@utexo/rgb-lib-linux-x64": "0.3.0-beta.11",
|
|
28
|
+
"@utexo/rgb-lib-linux-arm64": "0.3.0-beta.11",
|
|
29
|
+
"@utexo/rgb-lib-darwin-arm64": "0.3.0-beta.11"
|
|
16
30
|
}
|
|
17
31
|
}
|