Commit graph

207 commits

Author SHA1 Message Date
Manuel Bahamóndez-Honores
452f5c7e58 export bufferreader 2026-02-18 06:44:19 -03:00
Manuel Bahamóndez-Honores
718ff78877 removes index.d.ts 2026-02-18 06:24:02 -03:00
Manuel Bahamóndez-Honores
af262cd21b Restore lost comments, use literal union for AdvertParsedData.type, remove partial event overloads
- Restore behavioral descriptions for sendCommandExportContact and getNeighbours
- Use string literal union for AdvertParsedData.type and Advert.getTypeString()
- Remove on/once/off overrides that provided minimal type-safety value
2026-02-18 06:17:02 -03:00
Manuel Bahamóndez-Honores
7fbf737631 remove github action 2026-02-18 06:07:00 -03:00
Manuel Bahamóndez-Honores
8bf1d728bf
Merge branch 'master' into add-typescript-declarations 2026-02-18 06:05:31 -03:00
Manuel Bahamóndez-Honores
3f8e11c0ab
Merge branch 'meshcore-dev:master' into master 2026-02-18 06:02:32 -03:00
Manuel Bahamóndez-Honores
43e25b4acb Use boolean type for manualAddContacts with ternary conversion
Keep setAutoAddContacts/setManualAddContacts passing true/false as
originally intended. Convert to 0/1 at the writeByte boundary using
a ternary operator.
2026-02-18 06:00:24 -03:00
Manuel Bahamóndez-Honores
2d4cb35e51 Replace hand-written .d.ts with JSDoc + tsc auto-generation
- Delete hand-written index.d.ts that drifted from source
- Add JSDoc type annotations to all source files
- Create src/types.js with shared typedefs (SelfInfo, Contact,
  ContactMessage, ChannelInfo, RepeaterStats, etc.)
- Add tsconfig.json for declaration generation
- Add build:types script and prepublishOnly hook
- Add GitHub Actions CI workflow for type checking
- Use Uint8Array everywhere (no Buffer references)
- Add semantic type aliases (EpochSeconds, Milliseconds, MilliVolts)
- Add typed event overloads on Connection (on/once/off)
- All 11 PR #15 review comments addressed
2026-02-18 05:49:46 -03:00
Manuel Bahamóndez-Honores
de31939a28
Merge branch 'meshcore-dev:master' into add-typescript-declarations 2026-02-17 20:31:40 -03:00
liamcottle
f59b0f7ce4 parse feature flags if present in advert app data 2026-02-11 09:56:26 +13:00
liamcottle
438478ee3d 1.11.0 2026-02-11 01:09:45 +13:00
liamcottle
7ba63d5f54 parse transport codes 2026-02-11 01:05:30 +13:00
Manuel Bahamóndez-Honores
e47fd0c102 Remove placeholder comments from type definitions 2026-01-24 08:53:04 -03:00
Manuel Bahamóndez-Honores
1f0b684beb Add TypeScript type declarations
- Add index.d.ts with comprehensive type definitions for all exported classes
- Include type declarations for Connection, NodeJSSerialConnection, and other connection types
- Add types for Constants, Advert, Packet, BufferUtils, and CayenneLpp
- Add type declarations for submodules (constants, buffer_reader, buffer_writer)
- Update package.json to reference the types file

This enables TypeScript users to have proper type checking and autocomplete when using the library.
2026-01-24 08:47:07 -03:00
liamcottle
9a979df471 Revert "Fix race condition in WebBleConnection"
This reverts commit 78a003767f.
2026-01-23 23:05:22 +13:00
Liam Cottle
359725a22c
Merge pull request #13 from kellegous/lat-int32-fix
Fix calls that treat lat/lng as uint32 instead of int32
2026-01-22 18:37:22 +13:00
Kelly Norton
6e42badf59 Fix calls that treat lat/lng as uint32 instead of int32 2026-01-21 21:07:40 -05:00
Liam Cottle
3a9fd3dab2
Merge pull request #8 from bryantkelley/feat/update-README-links
Update README to link to new meshcore-dev/MeshCore repo
2026-01-02 23:37:35 +13:00
Liam Cottle
9671e46955
Merge pull request #10 from mtlynch/race-condition
Fix race condition in WebBleConnection
2026-01-02 23:36:19 +13:00
Michael Lynch
78a003767f Fix race condition in WebBleConnection
WebBleConnection's constructor calls init(), which is async. Constructors can't be async, so this means that callers who instantiate WebBleConnection can end up with it in an invalid state after construction if init() hasn't completed by the time the caller tries to access class members that depend on init.

I think the cleaner solution is to push the init() call to open(), which is async, so it can just await the results of init(), and the caller can trust that after calling open(), the connection is fully initialized.
2026-01-01 19:23:47 -05:00
Bryant Kelley
19fd8d3c46 Update README to link to new meshcore-dev/MeshCore repo 2025-12-09 19:54:39 -08:00
liamcottle
f6fea65063 1.10.0 2025-10-14 15:32:44 +13:00
liamcottle
156a02e6be add example to parse advert from meshcore packet url 2025-10-08 22:38:20 +13:00
Liam Cottle
83c07a6ce2
Merge pull request #3 from recrof/patch-2
fix: ed25519 import bug
2025-10-08 21:59:52 +13:00
liamcottle
64434d11dc 1.9.0 2025-10-07 12:10:03 +13:00
liamcottle
b652cff50e add error code to error response data 2025-10-07 12:09:49 +13:00
liamcottle
80175a7128 added example for signing data 2025-10-07 12:09:15 +13:00
liamcottle
db5831b9c6 added ability to sign data 2025-10-07 12:08:50 +13:00
Rastislav Vysoky
5c0f3b1b98
fix: ed25519 import bug 2025-10-06 22:07:24 +02:00
liamcottle
3164f1b3b5 1.8.0 2025-09-26 17:54:56 +12:00
liamcottle
3e4147b917 add example for fetching repeater neighbours 2025-09-26 17:53:49 +12:00
liamcottle
5e2df84d9b add docs 2025-09-26 17:52:59 +12:00
liamcottle
c90bf3ddd9 add ability to fetch repeater neighbours via binary request 2025-09-26 17:51:51 +12:00
liamcottle
23814a56ee add deprecation notice 2025-09-26 17:25:12 +12:00
liamcottle
10b3079d14 1.7.0 2025-09-13 21:03:26 +12:00
liamcottle
44deca2c74 add cayenne lpp to exported classes 2025-09-13 21:02:38 +12:00
liamcottle
d1ae420d66 add sensor telemetry example 2025-09-13 20:58:36 +12:00
liamcottle
3fcd1ec89e add cayenne lpp parser 2025-09-13 20:49:12 +12:00
liamcottle
1b5c11f7bc 1.6.0 2025-08-29 21:31:31 +12:00
liamcottle
8695474d04 remove event listeners on timeout 2025-08-29 21:30:49 +12:00
liamcottle
95107eb2eb implement timeout for trace path 2025-08-29 21:30:49 +12:00
liamcottle
352333153c fix removing error listeners 2025-08-29 21:30:49 +12:00
Liam Cottle
536e7641e0
Merge pull request #2 from recrof/patch-1
remove console.log from findChannelByName loop
2025-08-25 17:12:23 +12:00
Rastislav Vysoky
bc65c5a98d
remove console.log from findChannelByName loop 2025-08-24 19:45:20 +02:00
liamcottle
9acf56ed81 parse advert packet types 2025-08-19 12:51:25 +12:00
liamcottle
8ce2cf53e3 update repeater stats 2025-07-17 23:06:18 +12:00
liamcottle
9a9ad43671 1.5.0 2025-06-20 16:23:10 +12:00
liamcottle
83ea9c8e3c add support for fetching telemetry from contacts 2025-06-20 16:17:02 +12:00
liamcottle
7acd0eefa0 1.4.5 2025-04-22 12:22:05 +12:00
liamcottle
3edc69dacc fix parsing advert type 2025-04-22 12:21:24 +12:00