@corbit2/node-red-corbit-sms 1.0.4 → 1.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.5 (2026-11-20)
4
+
5
+ - A number copied from iPhone Contacts is accepted again. iOS wraps it in two hidden direction marks (U+202D and U+202C); the previous version refused U+202D. Only U+202E, which shows the digits in reverse order, is still refused.
6
+
3
7
  ## 1.0.4 (2026-11-20)
4
8
 
5
9
  - Hidden direction marks that come with numbers copied on Android, iOS or from Arabic text (such as U+200F and U+061C) are removed before a number is checked, so a correct number is no longer refused because of them. The two direction overrides (U+202D and U+202E) are refused instead, because they show the digits in a different order from the number that would be sent.
@@ -21,12 +21,13 @@ class CorbitError extends Error {
21
21
  }
22
22
 
23
23
  // Invisible marks that come with numbers copied on Android, iOS and Arabic pages: Arabic letter
24
- // mark, zero-width characters, direction marks, embeddings and isolates, word joiner, BOM.
24
+ // mark, zero-width characters, direction marks, embeddings, the left-to-right override (iOS wraps a
25
+ // number copied from Contacts in U+202D \u2026 U+202C) and isolates, word joiner, BOM.
25
26
  // Removing them never changes a number.
26
- const PHONE_MARKS = /[\u061c\u200b-\u200f\u202a-\u202c\u2060-\u2064\u2066-\u2069\ufeff]/g;
27
- // Direction overrides (U+202D, U+202E) reverse how the digits are shown, so the number on the
27
+ const PHONE_MARKS = /[\u061c\u200b-\u200f\u202a-\u202d\u2060-\u2064\u2066-\u2069\ufeff]/g;
28
+ // The right-to-left override (U+202E) reverses how the digits are shown, so the number on the
28
29
  // screen is not the number that would be sent: such a number is refused, not cleaned.
29
- const DIRECTION_OVERRIDES = /[\u202d\u202e]/;
30
+ const DIRECTION_OVERRIDES = /\u202e/;
30
31
  // A number is at most 40 characters once the invisible marks are removed, and 200 with them.
31
32
  const MAX_NUMBER_LENGTH = 40;
32
33
  const MAX_RAW_NUMBER_LENGTH = 200;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corbit2/node-red-corbit-sms",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Node-RED node for Corbit SMS: send SMS (single and bulk), check delivery status and reports, read the balance and sender names.",
5
5
  "license": "MIT",
6
6
  "author": {