@utexo/rgb-lib 0.3.0-beta.10 → 0.3.0-beta.10-bindings.begin.end
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 +16 -13
- package/package.json +8 -22
package/index.js
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
1
|
const os = require("os");
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
{ platform: "linux", arch: "x64" },
|
|
6
|
-
{ platform: "linux", arch: "arm64" },
|
|
7
|
-
{ platform: "darwin", arch: "arm64" },
|
|
8
|
-
];
|
|
3
|
+
const supportedPlatforms = ["linux", "darwin", "win32"];
|
|
4
|
+
const supportedArches = ["x64", "arm64"];
|
|
9
5
|
|
|
10
6
|
const platform = os.platform();
|
|
11
7
|
const arch = os.arch();
|
|
12
8
|
|
|
13
|
-
const
|
|
14
|
-
(
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
for (const platform of supportedPlatforms) {
|
|
10
|
+
if (!supportedPlatforms.includes(platform)) {
|
|
11
|
+
console.error(`Unsupported platform: ${platform}`);
|
|
12
|
+
process.exit(1);
|
|
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") {
|
|
18
22
|
console.error(`Unsupported platform-arch: ${platform}-${arch}`);
|
|
19
|
-
console.error("Supported combinations: linux-x64, linux-arm64, darwin-arm64");
|
|
20
23
|
process.exit(1);
|
|
21
24
|
}
|
|
22
25
|
|
|
23
|
-
let nativePackageName = `@
|
|
26
|
+
let nativePackageName = `@rgb-tools/rgb-lib-${platform}-${arch}`;
|
|
24
27
|
module.exports = require(nativePackageName);
|
package/package.json
CHANGED
|
@@ -1,31 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utexo/rgb-lib",
|
|
3
|
-
"version": "0.3.0-beta.10",
|
|
3
|
+
"version": "0.3.0-beta.10-bindings.begin.end",
|
|
4
4
|
"description": "Node.js bindings for rgb-lib",
|
|
5
5
|
"main": "index.js",
|
|
6
|
-
"files": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
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
|
-
],
|
|
6
|
+
"files": ["index.js"],
|
|
7
|
+
"scripts": {"test": "echo \"No tests\" && exit 1"},
|
|
8
|
+
"repository": {"type": "git", "url": "git+https://github.com/UTEXO-Protocol/rgb-lib-nodejs.git"},
|
|
9
|
+
"keywords": ["rgb", "bitcoin"],
|
|
20
10
|
"author": "UTEXO Protocol",
|
|
21
11
|
"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",
|
|
26
12
|
"optionalDependencies": {
|
|
27
|
-
"@utexo/rgb-lib-linux-x64": "0.3.0-beta.10",
|
|
28
|
-
"@utexo/rgb-lib-linux-arm64": "0.3.0-beta.10",
|
|
29
|
-
"@utexo/rgb-lib-darwin-arm64": "0.3.0-beta.10"
|
|
13
|
+
"@utexo/rgb-lib-linux-x64": "0.3.0-beta.10-bindings.begin.end",
|
|
14
|
+
"@utexo/rgb-lib-linux-arm64": "0.3.0-beta.10-bindings.begin.end",
|
|
15
|
+
"@utexo/rgb-lib-darwin-arm64": "0.3.0-beta.10-bindings.begin.end"
|
|
30
16
|
}
|
|
31
17
|
}
|