hamlib 0.1.24 → 0.1.26

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/binding.gyp CHANGED
@@ -23,10 +23,12 @@
23
23
  # Linux configuration
24
24
  ["OS==\"linux\"", {
25
25
  "include_dirs": [
26
+ "<!@(node -e \"if(process.env.HAMLIB_PREFIX) console.log(process.env.HAMLIB_PREFIX + '/include')\")",
26
27
  "/usr/include",
27
28
  "/usr/local/include"
28
29
  ],
29
30
  "libraries": [
31
+ "<!@(node -e \"if(process.env.HAMLIB_PREFIX) console.log('-L' + process.env.HAMLIB_PREFIX + '/lib')\")",
30
32
  "-L/usr/lib",
31
33
  "-L/usr/local/lib",
32
34
  "-lhamlib"
@@ -38,12 +40,22 @@
38
40
  # macOS configuration
39
41
  ["OS==\"mac\"", {
40
42
  "include_dirs": [
43
+ "<!@(node -e \"if(process.env.HAMLIB_PREFIX) console.log(process.env.HAMLIB_PREFIX + '/include')\")",
41
44
  "/usr/local/include",
42
- "/opt/homebrew/include"
45
+ "/usr/local/opt/hamlib/include",
46
+ "/usr/local/opt/libusb/include",
47
+ "/opt/homebrew/include",
48
+ "/opt/homebrew/opt/hamlib/include",
49
+ "/opt/homebrew/opt/libusb/include"
43
50
  ],
44
51
  "libraries": [
52
+ "<!@(node -e \"if(process.env.HAMLIB_PREFIX) console.log('-L' + process.env.HAMLIB_PREFIX + '/lib')\")",
45
53
  "-L/usr/local/lib",
54
+ "-L/usr/local/opt/hamlib/lib",
55
+ "-L/usr/local/opt/libusb/lib",
46
56
  "-L/opt/homebrew/lib",
57
+ "-L/opt/homebrew/opt/hamlib/lib",
58
+ "-L/opt/homebrew/opt/libusb/lib",
47
59
  "-lhamlib"
48
60
  ],
49
61
  "xcode_settings": {
package/index.d.ts CHANGED
@@ -265,6 +265,17 @@ declare class HamLib {
265
265
  */
266
266
  static getSupportedRigs(): SupportedRigInfo[];
267
267
 
268
+ /**
269
+ * Get Hamlib library version information
270
+ * @returns Hamlib version string including version number, build date, and architecture
271
+ * @static
272
+ * @example
273
+ * const version = HamLib.getHamlibVersion();
274
+ * console.log(`Hamlib version: ${version}`);
275
+ * // Output: "Hamlib 4.5.5 2024-01-15 12:00:00 64-bit"
276
+ */
277
+ static getHamlibVersion(): string;
278
+
268
279
  /**
269
280
  * Open connection to device
270
281
  * Must be called before other operations
package/lib/index.js CHANGED
@@ -30,6 +30,15 @@ class HamLib {
30
30
  return nativeModule.HamLib.getSupportedRigs();
31
31
  }
32
32
 
33
+ /**
34
+ * Get Hamlib library version information
35
+ * @returns {string} Hamlib version string (e.g., "Hamlib 4.5.5 2024-01-15 12:00:00 64-bit")
36
+ * @static
37
+ */
38
+ static getHamlibVersion() {
39
+ return nativeModule.HamLib.getHamlibVersion();
40
+ }
41
+
33
42
  /**
34
43
  * Open connection to the radio device
35
44
  * Must be called before other operations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamlib",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Node.js wrapper for hamlib radio control library",
5
5
  "main": "index.js",
6
6
  "module": "lib/index.mjs",
@@ -39,23 +39,30 @@
39
39
  "scripts": {
40
40
  "install": "node-gyp-build",
41
41
  "build": "node-gyp configure && node-gyp build",
42
+ "build:all": "node scripts/build-all.js",
42
43
  "rebuild": "node-gyp rebuild",
43
44
  "clean": "node-gyp clean",
44
45
  "test": "node test/test_loader.js",
45
46
  "test:network": "node test/test_network.js",
47
+ "test:dummy": "node test/test_dummy_complete.js",
48
+ "test:serial": "node test/test_serial_config.js",
46
49
  "prebuild": "prebuildify --napi --strip",
47
50
  "prepare": "",
51
+ "bundle": "node scripts/bundle-deps.js",
48
52
  "bundle:macos": "bash scripts/bundle-macos.sh",
49
53
  "bundle:linux": "bash scripts/bundle-linux.sh",
50
54
  "bundle:windows": "node scripts/bundle-windows.js",
51
- "verify": "node scripts/verify-dependencies.js"
55
+ "verify": "node scripts/verify.js",
56
+ "verify:all": "node scripts/verify.js --all"
52
57
  },
53
58
  "dependencies": {
54
59
  "node-addon-api": "^4.3.0",
55
60
  "node-gyp-build": "^4.8.0"
56
61
  },
57
62
  "devDependencies": {
63
+ "chalk": "^4.1.2",
58
64
  "node-gyp": "^9.4.0",
65
+ "ora": "^5.4.1",
59
66
  "prebuildify": "^5.0.0"
60
67
  },
61
68
  "preferUnplugged": true,
@@ -1,11 +1,12 @@
1
1
  Node-HamLib Precompiled Binaries
2
2
  ================================
3
- Build Time: Sun Oct 19 14:19:17 UTC 2025
4
- Git Commit: e810fce21b570a4bac71580f4371b548e08443b0
3
+ Build Time: Sat Nov 8 02:52:06 UTC 2025
4
+ Git Commit: 43e055bd928a2bf2f4cf7839165f1442511c20c8
5
5
  Git Ref: refs/heads/main
6
6
 
7
7
  Supported Platforms:
8
8
  - darwin-arm64
9
+ - darwin-x64
9
10
  - linux-arm64
10
11
  - linux-x64
11
12
  - win32-x64
Binary file
Binary file
Binary file
package/src/hamlib.cpp CHANGED
@@ -3720,9 +3720,10 @@ Napi::Function NodeHamLib::GetClass(Napi::Env env) {
3720
3720
  NodeHamLib::InstanceMethod("close", & NodeHamLib::Close),
3721
3721
  NodeHamLib::InstanceMethod("destroy", & NodeHamLib::Destroy),
3722
3722
  NodeHamLib::InstanceMethod("getConnectionInfo", & NodeHamLib::GetConnectionInfo),
3723
-
3724
- // Static method to get supported rig models
3723
+
3724
+ // Static methods
3725
3725
  NodeHamLib::StaticMethod("getSupportedRigs", & NodeHamLib::GetSupportedRigs),
3726
+ NodeHamLib::StaticMethod("getHamlibVersion", & NodeHamLib::GetHamlibVersion),
3726
3727
  });
3727
3728
  constructor = Napi::Persistent(ret);
3728
3729
  constructor.SuppressDestruct();
@@ -3832,6 +3833,16 @@ Napi::Value NodeHamLib::GetSupportedRigs(const Napi::CallbackInfo& info) {
3832
3833
  return rigArray;
3833
3834
  }
3834
3835
 
3836
+ // Get Hamlib version information
3837
+ Napi::Value NodeHamLib::GetHamlibVersion(const Napi::CallbackInfo& info) {
3838
+ Napi::Env env = info.Env();
3839
+
3840
+ // Reference to external hamlib_version2 variable
3841
+ extern const char* hamlib_version2;
3842
+
3843
+ return Napi::String::New(env, hamlib_version2);
3844
+ }
3845
+
3835
3846
  // Serial Port Configuration Methods
3836
3847
 
3837
3848
  // Set serial configuration parameter (data_bits, stop_bits, parity, handshake, etc.)
package/src/hamlib.h CHANGED
@@ -164,7 +164,10 @@ class NodeHamLib : public Napi::ObjectWrap<NodeHamLib> {
164
164
 
165
165
  // Static method to get supported rig models
166
166
  static Napi::Value GetSupportedRigs(const Napi::CallbackInfo&);
167
-
167
+
168
+ // Static method to get Hamlib version
169
+ static Napi::Value GetHamlibVersion(const Napi::CallbackInfo&);
170
+
168
171
  static Napi::Function GetClass(Napi::Env);
169
172
 
170
173
  static int freq_change_cb(RIG*, vfo_t, freq_t, void*);
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file