From 2142c2e3bb763cd922b2d926ee372daaf22b6942 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 28 Sep 2026 04:08:53 +0200 Subject: [PATCH] Spell out the hand-wired ESME's bind, and where a getter-only assignment throws --- CHANGELOG.md | 3 ++- MIGRATION.md | 3 ++- README.md | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index abdd134..b7f7a54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,7 +78,8 @@ removed: read `session.boundAs !== undefined`. A session you wire yourself records the bind it accepted or had accepted with `session.bound(bindType, declaredVersion)`, which returns `err` for a bind type or version it cannot record. An assignment to either field does not compile in - TypeScript, and throws a `TypeError` in strict-mode JavaScript, which every module is. + TypeScript, throws a `TypeError` in an ES module or strict-mode script, and is ignored in + sloppy-mode CommonJS. ## 0.5.0 diff --git a/MIGRATION.md b/MIGRATION.md index 7d96689..9c0e433 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -13,7 +13,8 @@ shape is the same, connect, send, listen for delivery reports, with callbacks re a `session` event. It no longer calls back once per connection. - **The id a message is answered with goes to `sendResp({ smsId })`.** `sms.smsId` is read-only: the id the segments were answered with, the id `sendResp()` was given, or the generated UUID v7. - Assigning to it throws a `TypeError`, since modules are strict mode. + Assigning to it throws a `TypeError` in an ES module or strict-mode script, and is ignored in + sloppy-mode CommonJS. - **`smsIds` from `sendSms()` is `(string | undefined)[]`**, one entry per segment, positional with `pduObjs`, `undefined` where the SMSC took the segment without naming an id. - **`checkuserpass` is `authenticate`**, takes `{ password, session, systemId, systemType }` and diff --git a/README.md b/README.md index ffdf4eb..5906e53 100644 --- a/README.md +++ b/README.md @@ -429,8 +429,10 @@ const { err, pduObj } = await session.send({ end accepted it, on every link it binds. `bindType` is `receiver`, `transceiver` or `transmitter`; `declaredVersion` is 0-255, or `undefined` where the peer declared none. Anything else returns `err` and records nothing. -- An ESME records the bind from its `bind_resp`, in `reconnect.onConnected` on every rebind: - `session.bound('transmitter', pduObj.tlvs.sc_interface_version?.tagValue)`. +- An ESME wired by hand sends its own `bind_` through `session.send()`, after it is + constructed and again in `reconnect.onConnected`, and records each accepted one with + `session.bound(bindType, pduObj.tlvs.sc_interface_version?.tagValue)`, where `bindType` is the one + it sent and `pduObj` the `bind_resp` that `send()` resolved with. ## Receiving in depth