@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.
Files changed (2) hide show
  1. package/index.js +13 -16
  2. package/package.json +22 -8
package/index.js CHANGED
@@ -1,27 +1,24 @@
1
1
  const os = require("os");
2
2
 
3
- const supportedPlatforms = ["linux", "darwin", "win32"];
4
- const supportedArches = ["x64", "arm64"];
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
- 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") {
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 = `@rgb-tools/rgb-lib-${platform}-${arch}`;
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.10-bindings.begin.end",
3
+ "version": "0.3.0-beta.11",
4
4
  "description": "Node.js bindings for rgb-lib",
5
5
  "main": "index.js",
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"],
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.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"
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
  }