libp2r2p 0.10.16 → 0.10.17

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 CHANGED
@@ -377,6 +377,9 @@ plus NIP-05 in its standard, root and custom compact spellings.
377
377
  `decodeReference()` parses a single reference, and `decodeMediaMetadata()`
378
378
  reads the file/media metadata carried in a URL fragment
379
379
  (`#m=image/png&dim=640x480&...`).
380
+ URLs can contain literal `+` in their paths, including launcher links such as
381
+ `https://44billion.net/+apps?by=fiatjaf.com`. They produce a single URL item
382
+ with the full address, rather than an app item for the embedded reference.
380
383
 
381
384
  App references are a library extension to NIP-27. `extractMedia()` recognizes
382
385
  encoded `+…` app entities and named references such as `+hallway@fiatjaf.com`,
package/nip27/index.js CHANGED
@@ -24,7 +24,7 @@ const BOUNDARY_SUFFIX = /(?=\.?$|[.,]?\s|\.(?=\.)|\.?["»”」'!?;\])}])/.sourc
24
24
  const URL_SOURCE =
25
25
  '(?<url>' +
26
26
  /(?<protocol>https:\/\/)?(?:[-_A-Za-z0-9]{1,30}\.){1,4}[a-z]{2,63}/.source +
27
- /(?:(?:\/[-._A-Za-z0-9%@#]{1,300}){0,11}(?<ext>\.[a-z-0-9]{3,4})|(?:\/[-._A-Za-z0-9%@#]{1,300}){0,11})\/?/.source +
27
+ /(?:(?:\/[-._+A-Za-z0-9%@#]{1,300}){0,11}(?<ext>\.[a-z-0-9]{3,4})|(?:\/[-._+A-Za-z0-9%@#]{1,300}){0,11})\/?/.source +
28
28
  /(?:\??&?(?:[-_+.A-Za-z0-9%*]{1,30}=[-_+.A-Za-z0-9%*]{1,300}&?){1,40}|\?)?/.source +
29
29
  /(?:(?:#|(?<=#))[-_+.A-Za-z0-9%=&*:~,]{1,4000})?/.source +
30
30
  /(?:\/|(?<![.,]))/.source +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libp2r2p",
3
- "version": "0.10.16",
3
+ "version": "0.10.17",
4
4
  "description": "Peer-to-relay-to-peer",
5
5
  "keywords": [
6
6
  "p2r2p",