wsjtx-lib 1.0.1 → 1.0.3
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/README.md +214 -83
- package/package.json +2 -2
- package/prebuilds/darwin-arm64/build-info.json +1 -1
- package/prebuilds/linux-arm64/build-info.json +10 -0
- package/prebuilds/linux-arm64/libfftw3f.so.3 +0 -0
- package/prebuilds/linux-arm64/libfftw3f_threads.so.3 +0 -0
- package/prebuilds/linux-arm64/libgcc_s.so.1 +0 -0
- package/prebuilds/linux-arm64/libgfortran.so.5 +0 -0
- package/prebuilds/linux-arm64/wsjtx_lib_nodejs.node +0 -0
- package/prebuilds/linux-x64/build-info.json +1 -1
- package/prebuilds/package-info.json +9 -3
- package/prebuilds/win32-x64/build-info.json +1 -1
- package/prebuilds/win32-x64/wsjtx_lib_nodejs.node +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# WSJTX Library for Node.js
|
|
2
2
|
|
|
3
|
+
[](https://badge.fury.io/js/wsjtx-lib)
|
|
4
|
+
|
|
3
5
|
A high-performance Node.js C++ extension for digital amateur radio protocols, providing TypeScript support and async/await interfaces for WSJTX library functionality.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
@@ -9,7 +11,7 @@ A high-performance Node.js C++ extension for digital amateur radio protocols, pr
|
|
|
9
11
|
- 🔧 **TypeScript Support**: Full TypeScript definitions and modern ES modules
|
|
10
12
|
- ⚡ **Async/Await**: Promise-based API for non-blocking operations
|
|
11
13
|
- 🎵 **Audio Processing**: Support for both Float32Array and Int16Array audio formats
|
|
12
|
-
- 🌍 **Cross-Platform**:
|
|
14
|
+
- 🌍 **Cross-Platform**: Prebuilt binaries for Windows, macOS, and Linux
|
|
13
15
|
- 📊 **WSPR Decoding**: Specialized support for WSPR IQ data processing
|
|
14
16
|
|
|
15
17
|
## Supported Modes
|
|
@@ -28,50 +30,86 @@ A high-performance Node.js C++ extension for digital amateur radio protocols, pr
|
|
|
28
30
|
|
|
29
31
|
## Installation
|
|
30
32
|
|
|
31
|
-
###
|
|
33
|
+
### NPM Installation (Recommended)
|
|
34
|
+
|
|
35
|
+
The package includes prebuilt binaries for major platforms:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install wsjtx-lib
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**Supported platforms with prebuilt binaries:**
|
|
42
|
+
- Linux x64
|
|
43
|
+
- macOS ARM64 (Apple Silicon)
|
|
44
|
+
- Windows x64
|
|
45
|
+
|
|
46
|
+
### Building from Source
|
|
47
|
+
|
|
48
|
+
Only needed if prebuilt binaries are not available for your platform.
|
|
49
|
+
|
|
50
|
+
#### Prerequisites
|
|
32
51
|
|
|
33
52
|
- Node.js 16+
|
|
34
53
|
- CMake 3.15+
|
|
35
54
|
- C++ compiler with C++17 support
|
|
36
|
-
- FFTW3 library
|
|
55
|
+
- FFTW3 library (single precision)
|
|
37
56
|
- Boost libraries
|
|
38
57
|
- Fortran compiler (gfortran)
|
|
39
58
|
|
|
40
|
-
|
|
59
|
+
#### macOS
|
|
41
60
|
|
|
42
61
|
```bash
|
|
43
62
|
# Install dependencies using Homebrew
|
|
44
|
-
brew install cmake fftw boost gcc
|
|
63
|
+
brew install cmake fftw boost gcc pkg-config
|
|
45
64
|
|
|
46
|
-
# Clone and
|
|
65
|
+
# Clone and build
|
|
47
66
|
git clone --recursive https://github.com/boybook/wsjtx_lib_nodejs.git
|
|
48
|
-
cd
|
|
67
|
+
cd wsjtx_lib_nodejs
|
|
49
68
|
npm install
|
|
69
|
+
npm run build
|
|
50
70
|
```
|
|
51
71
|
|
|
52
|
-
|
|
72
|
+
#### Linux (Ubuntu/Debian)
|
|
53
73
|
|
|
54
74
|
```bash
|
|
55
75
|
# Install dependencies
|
|
56
76
|
sudo apt-get update
|
|
57
|
-
sudo apt-get install
|
|
58
|
-
|
|
59
|
-
|
|
77
|
+
sudo apt-get install -y \
|
|
78
|
+
cmake \
|
|
79
|
+
build-essential \
|
|
80
|
+
gfortran \
|
|
81
|
+
libfftw3-dev \
|
|
82
|
+
libboost-all-dev \
|
|
83
|
+
pkg-config
|
|
84
|
+
|
|
85
|
+
# Clone and build
|
|
60
86
|
git clone --recursive https://github.com/boybook/wsjtx_lib_nodejs.git
|
|
61
|
-
cd
|
|
87
|
+
cd wsjtx_lib_nodejs
|
|
62
88
|
npm install
|
|
89
|
+
npm run build
|
|
63
90
|
```
|
|
64
91
|
|
|
65
|
-
|
|
92
|
+
#### Windows
|
|
66
93
|
|
|
67
|
-
|
|
68
|
-
# Install dependencies using vcpkg or manually
|
|
69
|
-
# Ensure CMake, FFTW3, Boost, and MinGW-w64 are available
|
|
94
|
+
Use MSYS2/MinGW-w64 for best compatibility:
|
|
70
95
|
|
|
71
|
-
|
|
96
|
+
```bash
|
|
97
|
+
# Install MSYS2, then in MSYS2 MINGW64 terminal:
|
|
98
|
+
pacman -S --needed \
|
|
99
|
+
base-devel \
|
|
100
|
+
mingw-w64-x86_64-toolchain \
|
|
101
|
+
mingw-w64-x86_64-cmake \
|
|
102
|
+
mingw-w64-x86_64-pkg-config \
|
|
103
|
+
mingw-w64-x86_64-fftw \
|
|
104
|
+
mingw-w64-x86_64-boost \
|
|
105
|
+
mingw-w64-x86_64-gcc-fortran \
|
|
106
|
+
mingw-w64-x86_64-nodejs
|
|
107
|
+
|
|
108
|
+
# Clone and build
|
|
72
109
|
git clone --recursive https://github.com/boybook/wsjtx_lib_nodejs.git
|
|
73
|
-
cd
|
|
110
|
+
cd wsjtx_lib_nodejs
|
|
74
111
|
npm install
|
|
112
|
+
npm run build
|
|
75
113
|
```
|
|
76
114
|
|
|
77
115
|
## Quick Start
|
|
@@ -86,27 +124,27 @@ async function example() {
|
|
|
86
124
|
// Encode an FT8 message
|
|
87
125
|
const encodeResult = await lib.encode(
|
|
88
126
|
WSJTXMode.FT8,
|
|
89
|
-
'CQ
|
|
90
|
-
1000 // Audio
|
|
127
|
+
'CQ DX BH1ABC OM88',
|
|
128
|
+
1000 // Audio frequency in Hz (typically 500-3000 Hz)
|
|
91
129
|
);
|
|
92
130
|
|
|
93
131
|
console.log(`Generated ${encodeResult.audioData.length} audio samples`);
|
|
94
|
-
console.log(`Message: "${encodeResult.messageSent}"`);
|
|
132
|
+
console.log(`Message sent: "${encodeResult.messageSent}"`);
|
|
95
133
|
|
|
96
|
-
// Decode audio data
|
|
134
|
+
// Decode audio data (example with proper resampling for FT8)
|
|
97
135
|
const audioData = new Float32Array(48000 * 13); // 13 seconds at 48kHz
|
|
98
136
|
// ... fill audioData with actual audio samples ...
|
|
99
137
|
|
|
100
138
|
const decodeResult = await lib.decode(
|
|
101
139
|
WSJTXMode.FT8,
|
|
102
140
|
audioData,
|
|
103
|
-
1000 // Same audio
|
|
141
|
+
1000 // Same audio frequency used for encoding
|
|
104
142
|
);
|
|
105
143
|
|
|
106
144
|
// Get decoded messages
|
|
107
145
|
const messages = lib.pullMessages();
|
|
108
146
|
messages.forEach(msg => {
|
|
109
|
-
console.log(`Decoded: "${msg.text}" (SNR: ${msg.snr} dB)`);
|
|
147
|
+
console.log(`Decoded: "${msg.text}" (SNR: ${msg.snr} dB, ΔT: ${msg.deltaTime}s)`);
|
|
110
148
|
});
|
|
111
149
|
}
|
|
112
150
|
```
|
|
@@ -137,11 +175,13 @@ Decode digital radio signals from audio data.
|
|
|
137
175
|
**Parameters:**
|
|
138
176
|
- `mode`: WSJTXMode enum value
|
|
139
177
|
- `audioData`: Float32Array or Int16Array of audio samples
|
|
140
|
-
- `frequency`: Audio
|
|
178
|
+
- `frequency`: Audio frequency in Hz (typically 500-3000 Hz)
|
|
141
179
|
- `threads`: Number of threads to use (optional, default: 4)
|
|
142
180
|
|
|
143
181
|
**Returns:** Promise resolving to DecodeResult with success status
|
|
144
182
|
|
|
183
|
+
**Note:** For optimal FT8 decoding, audio may need resampling. See examples for details.
|
|
184
|
+
|
|
145
185
|
##### `encode(mode, message, frequency, threads?): Promise<EncodeResult>`
|
|
146
186
|
|
|
147
187
|
Encode a message into audio waveform for transmission.
|
|
@@ -149,7 +189,7 @@ Encode a message into audio waveform for transmission.
|
|
|
149
189
|
**Parameters:**
|
|
150
190
|
- `mode`: WSJTXMode enum value
|
|
151
191
|
- `message`: Message text to encode (1-22 characters)
|
|
152
|
-
- `frequency`: Audio
|
|
192
|
+
- `frequency`: Audio frequency in Hz (typically 500-3000 Hz)
|
|
153
193
|
- `threads`: Number of threads to use (optional, default: 4)
|
|
154
194
|
|
|
155
195
|
**Returns:** Promise resolving to EncodeResult with audio data and actual message sent
|
|
@@ -161,6 +201,13 @@ Decode WSPR signals from IQ data.
|
|
|
161
201
|
**Parameters:**
|
|
162
202
|
- `iqData`: Float32Array of interleaved I,Q samples
|
|
163
203
|
- `options`: WSPRDecodeOptions (optional)
|
|
204
|
+
- `dialFrequency`: RF dial frequency in Hz (default: 14095600)
|
|
205
|
+
- `callsign`: Station callsign
|
|
206
|
+
- `locator`: Grid locator
|
|
207
|
+
- `quickMode`: Enable quick decode mode (default: false)
|
|
208
|
+
- `useHashTable`: Use hash table optimization (default: true)
|
|
209
|
+
- `passes`: Number of decode passes (default: 2)
|
|
210
|
+
- `subtraction`: Enable signal subtraction (default: true)
|
|
164
211
|
|
|
165
212
|
**Returns:** Promise resolving to array of WSPR decode results
|
|
166
213
|
|
|
@@ -208,8 +255,6 @@ interface WSJTXMessage {
|
|
|
208
255
|
snr: number; // Signal-to-noise ratio in dB
|
|
209
256
|
deltaTime: number; // Time offset in seconds
|
|
210
257
|
deltaFrequency: number; // Frequency offset in Hz
|
|
211
|
-
timestamp: number; // Unix timestamp
|
|
212
|
-
sync: number; // Sync quality metric
|
|
213
258
|
}
|
|
214
259
|
```
|
|
215
260
|
|
|
@@ -217,7 +262,7 @@ interface WSJTXMessage {
|
|
|
217
262
|
|
|
218
263
|
```typescript
|
|
219
264
|
interface EncodeResult {
|
|
220
|
-
audioData: Float32Array; // Generated audio waveform
|
|
265
|
+
audioData: Float32Array; // Generated audio waveform (48kHz sample rate)
|
|
221
266
|
messageSent: string; // Actual message encoded
|
|
222
267
|
}
|
|
223
268
|
```
|
|
@@ -242,51 +287,90 @@ interface WSPRResult {
|
|
|
242
287
|
|
|
243
288
|
## Examples
|
|
244
289
|
|
|
245
|
-
###
|
|
290
|
+
### Complete FT8 Encode-Decode Cycle
|
|
246
291
|
|
|
247
292
|
```typescript
|
|
248
293
|
import { WSJTXLib, WSJTXMode } from 'wsjtx-lib';
|
|
294
|
+
import * as fs from 'fs';
|
|
295
|
+
import * as wav from 'wav';
|
|
249
296
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
297
|
+
async function ft8Example() {
|
|
298
|
+
const lib = new WSJTXLib();
|
|
299
|
+
const message = 'CQ DX BH1ABC OM88';
|
|
300
|
+
const audioFrequency = 1000;
|
|
301
|
+
|
|
302
|
+
// 1. Encode message
|
|
303
|
+
const encodeResult = await lib.encode(WSJTXMode.FT8, message, audioFrequency);
|
|
304
|
+
console.log(`Encoded: "${encodeResult.messageSent}"`);
|
|
305
|
+
|
|
306
|
+
// 2. Save as WAV file
|
|
307
|
+
const audioInt16 = new Int16Array(encodeResult.audioData.length);
|
|
308
|
+
for (let i = 0; i < encodeResult.audioData.length; i++) {
|
|
309
|
+
audioInt16[i] = Math.round(encodeResult.audioData[i] * 32767);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
const writer = new wav.FileWriter('ft8_test.wav', {
|
|
313
|
+
channels: 1,
|
|
314
|
+
sampleRate: lib.getSampleRate(WSJTXMode.FT8),
|
|
315
|
+
bitDepth: 16
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
const buffer = Buffer.from(audioInt16.buffer);
|
|
319
|
+
writer.write(buffer);
|
|
320
|
+
writer.end();
|
|
321
|
+
|
|
322
|
+
// 3. Read back and decode
|
|
323
|
+
// Note: For optimal decode, you may need resampling
|
|
324
|
+
const resampled = resampleTo12kHz(encodeResult.audioData);
|
|
325
|
+
const audioForDecode = new Int16Array(resampled.length);
|
|
326
|
+
for (let i = 0; i < resampled.length; i++) {
|
|
327
|
+
audioForDecode[i] = Math.round(resampled[i] * 32767);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
lib.pullMessages(); // Clear queue
|
|
331
|
+
const decodeResult = await lib.decode(WSJTXMode.FT8, audioForDecode, audioFrequency);
|
|
332
|
+
|
|
333
|
+
const messages = lib.pullMessages();
|
|
334
|
+
console.log(`Decoded ${messages.length} messages`);
|
|
335
|
+
}
|
|
259
336
|
|
|
260
|
-
//
|
|
261
|
-
|
|
262
|
-
|
|
337
|
+
// Helper function for resampling (48kHz -> 12kHz)
|
|
338
|
+
function resampleTo12kHz(audioData48k: Float32Array): Float32Array {
|
|
339
|
+
const audioData12k = new Float32Array(Math.floor(audioData48k.length / 4));
|
|
340
|
+
for (let i = 0; i < audioData12k.length; i++) {
|
|
341
|
+
audioData12k[i] = audioData48k[i * 4];
|
|
342
|
+
}
|
|
343
|
+
return audioData12k;
|
|
344
|
+
}
|
|
263
345
|
```
|
|
264
346
|
|
|
265
|
-
> **Important Note**: The `frequency` parameter is the **audio base frequency** (typically 500-3000 Hz), not the RF frequency. For example, if you're operating on 20m FT8 (14.074 MHz RF), you might use 1500 Hz as the audio frequency within your transceiver's passband.
|
|
266
|
-
|
|
267
347
|
### WSPR Decoding
|
|
268
348
|
|
|
269
349
|
```typescript
|
|
270
350
|
import { WSJTXLib } from 'wsjtx-lib';
|
|
271
351
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
//
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
results.
|
|
288
|
-
|
|
289
|
-
|
|
352
|
+
async function wsprExample() {
|
|
353
|
+
const lib = new WSJTXLib();
|
|
354
|
+
|
|
355
|
+
// IQ data (interleaved I,Q samples)
|
|
356
|
+
const iqData = new Float32Array(2 * 12000 * 120); // 2 minutes of IQ data
|
|
357
|
+
// ... fill with actual IQ data from SDR ...
|
|
358
|
+
|
|
359
|
+
const options = {
|
|
360
|
+
dialFrequency: 14095600, // 20m WSPR frequency
|
|
361
|
+
callsign: 'BH1ABC',
|
|
362
|
+
locator: 'OM88',
|
|
363
|
+
quickMode: false,
|
|
364
|
+
passes: 2
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
const results = await lib.decodeWSPR(iqData, options);
|
|
368
|
+
|
|
369
|
+
console.log('WSPR Decode Results:');
|
|
370
|
+
results.forEach(result => {
|
|
371
|
+
console.log(`${result.callsign} ${result.locator} ${result.power}dBm (SNR: ${result.snr}dB)`);
|
|
372
|
+
});
|
|
373
|
+
}
|
|
290
374
|
```
|
|
291
375
|
|
|
292
376
|
### Audio Format Conversion
|
|
@@ -295,11 +379,37 @@ results.forEach(result => {
|
|
|
295
379
|
import { WSJTXLib } from 'wsjtx-lib';
|
|
296
380
|
|
|
297
381
|
// Convert Float32Array to Int16Array
|
|
298
|
-
const floatData = new Float32Array([0.5, -0.5, 0.25]);
|
|
382
|
+
const floatData = new Float32Array([0.5, -0.5, 0.25, -0.25]);
|
|
299
383
|
const intData = WSJTXLib.convertAudioFormat(floatData, 'int16');
|
|
384
|
+
console.log(intData); // Int16Array [16384, -16384, 8192, -8192]
|
|
300
385
|
|
|
301
386
|
// Convert back to Float32Array
|
|
302
387
|
const backToFloat = WSJTXLib.convertAudioFormat(intData, 'float32');
|
|
388
|
+
console.log(backToFloat); // Float32Array [0.5, -0.5, 0.25, -0.25] (approximately)
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Multiple Message Types
|
|
392
|
+
|
|
393
|
+
```typescript
|
|
394
|
+
import { WSJTXLib, WSJTXMode } from 'wsjtx-lib';
|
|
395
|
+
|
|
396
|
+
async function multipleMessages() {
|
|
397
|
+
const lib = new WSJTXLib();
|
|
398
|
+
const audioFrequency = 1000;
|
|
399
|
+
|
|
400
|
+
const messages = [
|
|
401
|
+
'CQ DX BH1ABC OM88', // CQ call
|
|
402
|
+
'BH1ABC BH2DEF +05', // Signal report
|
|
403
|
+
'BH2DEF BH1ABC R-12', // Report acknowledgment
|
|
404
|
+
'BH1ABC BH2DEF RRR', // Received acknowledgment
|
|
405
|
+
'BH2DEF BH1ABC 73' // End contact
|
|
406
|
+
];
|
|
407
|
+
|
|
408
|
+
for (const message of messages) {
|
|
409
|
+
const result = await lib.encode(WSJTXMode.FT8, message, audioFrequency);
|
|
410
|
+
console.log(`"${message}" -> "${result.messageSent}" (${result.audioData.length} samples)`);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
303
413
|
```
|
|
304
414
|
|
|
305
415
|
## Error Handling
|
|
@@ -310,22 +420,44 @@ The library throws `WSJTXError` for all operation failures:
|
|
|
310
420
|
import { WSJTXError } from 'wsjtx-lib';
|
|
311
421
|
|
|
312
422
|
try {
|
|
313
|
-
await lib.decode(WSJTXMode.FT8, audioData,
|
|
423
|
+
await lib.decode(WSJTXMode.FT8, audioData, 1000);
|
|
314
424
|
} catch (error) {
|
|
315
425
|
if (error instanceof WSJTXError) {
|
|
316
426
|
console.error(`WSJTX Error [${error.code}]: ${error.message}`);
|
|
427
|
+
|
|
428
|
+
// Common error codes:
|
|
429
|
+
// - INVALID_MODE: Invalid mode parameter
|
|
430
|
+
// - INVALID_FREQUENCY: Invalid frequency parameter
|
|
431
|
+
// - INVALID_AUDIO_DATA: Invalid audio data format/size
|
|
432
|
+
// - INVALID_MESSAGE: Invalid message text
|
|
433
|
+
// - DECODE_ERROR: Decoding operation failed
|
|
434
|
+
// - ENCODE_ERROR: Encoding operation failed
|
|
317
435
|
} else {
|
|
318
436
|
console.error('Unexpected error:', error);
|
|
319
437
|
}
|
|
320
438
|
}
|
|
321
439
|
```
|
|
322
440
|
|
|
323
|
-
##
|
|
441
|
+
## Important Notes
|
|
442
|
+
|
|
443
|
+
1. **Audio Frequency**: The `frequency` parameter is the audio tone frequency within your audio passband (typically 500-3000 Hz), not the RF frequency.
|
|
444
|
+
|
|
445
|
+
2. **Sample Rates**: Different modes require different sample rates. Use `lib.getSampleRate(mode)` to get the correct rate.
|
|
446
|
+
|
|
447
|
+
3. **Audio Resampling**: For optimal FT8 decoding, audio may need to be resampled from 48kHz to 12kHz. See examples for implementation.
|
|
448
|
+
|
|
449
|
+
4. **Thread Safety**: Each WSJTXLib instance should be used from a single thread. Create separate instances for concurrent operations.
|
|
450
|
+
|
|
451
|
+
5. **Message Queue**: The `pullMessages()` method clears the internal message queue. Call it regularly to avoid memory buildup.
|
|
452
|
+
|
|
453
|
+
## Building from Source (Advanced)
|
|
454
|
+
|
|
455
|
+
For detailed build instructions when prebuilt binaries are not available, see [BUILD.md](BUILD.md).
|
|
324
456
|
|
|
325
457
|
```bash
|
|
326
458
|
# Clone with submodules
|
|
327
|
-
git clone --recursive https://github.com/
|
|
328
|
-
cd
|
|
459
|
+
git clone --recursive https://github.com/boybook/wsjtx_lib_nodejs.git
|
|
460
|
+
cd wsjtx_lib_nodejs
|
|
329
461
|
|
|
330
462
|
# Install dependencies
|
|
331
463
|
npm install
|
|
@@ -336,8 +468,11 @@ npm run build
|
|
|
336
468
|
# Run tests
|
|
337
469
|
npm test
|
|
338
470
|
|
|
339
|
-
# Run
|
|
340
|
-
|
|
471
|
+
# Run comprehensive tests
|
|
472
|
+
npm run test:full
|
|
473
|
+
|
|
474
|
+
# Run examples
|
|
475
|
+
node examples/examples.js
|
|
341
476
|
```
|
|
342
477
|
|
|
343
478
|
## Development
|
|
@@ -345,13 +480,14 @@ node examples/basic_usage.js
|
|
|
345
480
|
### Project Structure
|
|
346
481
|
|
|
347
482
|
```
|
|
348
|
-
|
|
483
|
+
wsjtx_lib_nodejs/
|
|
349
484
|
├── src/ # TypeScript source files
|
|
350
485
|
├── native/ # C++ wrapper code
|
|
351
|
-
├── wsjtx_lib/ # Git submodule (wsjtx_lib
|
|
486
|
+
├── wsjtx_lib/ # Git submodule (wsjtx_lib library)
|
|
352
487
|
├── test/ # Test files
|
|
353
488
|
├── examples/ # Usage examples
|
|
354
489
|
├── dist/ # Compiled TypeScript output
|
|
490
|
+
├── prebuilds/ # Prebuilt binaries for distribution
|
|
355
491
|
└── build/ # CMake build directory
|
|
356
492
|
```
|
|
357
493
|
|
|
@@ -360,8 +496,10 @@ wsjtx-lib-nodejs/
|
|
|
360
496
|
- `npm run build` - Build both native module and TypeScript
|
|
361
497
|
- `npm run build:native` - Build only the native C++ module
|
|
362
498
|
- `npm run build:ts` - Build only TypeScript
|
|
363
|
-
- `npm test` - Run
|
|
499
|
+
- `npm test` - Run basic tests (CI-friendly)
|
|
500
|
+
- `npm run test:full` - Run comprehensive tests
|
|
364
501
|
- `npm run clean` - Clean build artifacts
|
|
502
|
+
- `npm run package` - Package prebuilt binaries for distribution
|
|
365
503
|
|
|
366
504
|
## Contributing
|
|
367
505
|
|
|
@@ -374,17 +512,10 @@ wsjtx-lib-nodejs/
|
|
|
374
512
|
|
|
375
513
|
## License
|
|
376
514
|
|
|
377
|
-
This project is licensed under the
|
|
515
|
+
This project is licensed under the GPL-3.0 License - see the [LICENSE](LICENSE) file for details.
|
|
378
516
|
|
|
379
517
|
## Acknowledgments
|
|
380
518
|
|
|
381
|
-
- Based on the excellent [wsjtx_lib](https://github.com/
|
|
382
|
-
- WSJT-X development team for the original algorithms
|
|
383
|
-
- Amateur radio community for protocol specifications
|
|
384
|
-
|
|
385
|
-
## Support
|
|
386
|
-
|
|
387
|
-
- 📧 Email: support@example.com
|
|
388
|
-
- 🐛 Issues: [GitHub Issues](https://github.com/your-repo/wsjtx-lib-nodejs/issues)
|
|
389
|
-
- 📖 Documentation: [Wiki](https://github.com/your-repo/wsjtx-lib-nodejs/wiki)
|
|
390
|
-
- 💬 Discussions: [GitHub Discussions](https://github.com/your-repo/wsjtx-lib-nodejs/discussions)
|
|
519
|
+
- Based on the excellent [wsjtx_lib](https://github.com/paulh002/wsjtx_lib) library by PA0PHH
|
|
520
|
+
- WSJT-X development team for the original algorithms by K1JT
|
|
521
|
+
- Amateur radio community for protocol specifications
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wsjtx-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Node.js C++ extension for WSJTX digital radio protocol library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"scripts": {
|
|
30
30
|
"prebuild": "prebuild-install",
|
|
31
31
|
"build": "npm run build:native && npm run build:ts",
|
|
32
|
-
"build:
|
|
32
|
+
"build:win": "npm run build:native:win && npm run build:ts",
|
|
33
33
|
"build:native": "cmake-js compile",
|
|
34
34
|
"build:native:win": "cmake-js compile --generator=\"MinGW Makefiles\"",
|
|
35
35
|
"build:ts": "tsc",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2025-06-
|
|
2
|
+
"timestamp": "2025-06-06T02:37:19.525Z",
|
|
3
3
|
"platforms": [
|
|
4
4
|
{
|
|
5
5
|
"platform": "linux",
|
|
@@ -7,6 +7,12 @@
|
|
|
7
7
|
"available": true,
|
|
8
8
|
"path": "./prebuilds/linux-x64/wsjtx_lib_nodejs.node"
|
|
9
9
|
},
|
|
10
|
+
{
|
|
11
|
+
"platform": "linux",
|
|
12
|
+
"arch": "arm64",
|
|
13
|
+
"available": true,
|
|
14
|
+
"path": "./prebuilds/linux-arm64/wsjtx_lib_nodejs.node"
|
|
15
|
+
},
|
|
10
16
|
{
|
|
11
17
|
"platform": "darwin",
|
|
12
18
|
"arch": "arm64",
|
|
@@ -20,6 +26,6 @@
|
|
|
20
26
|
"path": "./prebuilds/win32-x64/wsjtx_lib_nodejs.node"
|
|
21
27
|
}
|
|
22
28
|
],
|
|
23
|
-
"totalPackages":
|
|
24
|
-
"totalSize":
|
|
29
|
+
"totalPackages": 4,
|
|
30
|
+
"totalSize": 4835007
|
|
25
31
|
}
|
|
Binary file
|