@atproto/bsky 0.3.7 → 0.3.8

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,11 @@
1
1
  # @atproto/bsky
2
2
 
3
+ ## 0.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#5710](https://github.com/bluesky-social/atproto/pull/5710) [`bbd530d`](https://github.com/bluesky-social/atproto/commit/bbd530d4407b95d06862daa04616506568233ae8) Thanks [@vineyardbovines](https://github.com/vineyardbovines)! - Leave links to more URL shorteners out of profile views.
8
+
3
9
  ## 0.3.7
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"profile-link-rules.d.ts","sourceRoot":"","sources":["../../src/views/profile-link-rules.ts"],"names":[],"mappings":"AAIA,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAuB7B,CAAA;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAY5D"}
1
+ {"version":3,"file":"profile-link-rules.d.ts","sourceRoot":"","sources":["../../src/views/profile-link-rules.ts"],"names":[],"mappings":"AAIA,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,KAAK,CAAA;AAEnC;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,UAkD7B,CAAA;AAED,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAY5D"}
@@ -9,6 +9,7 @@ export const MAX_PROFILE_LINKS = 10;
9
9
  * listed. Kept in sync with the Bluesky app.
10
10
  */
11
11
  export const SHORTENER_DOMAINS = [
12
+ 'acel.me',
12
13
  'adf.ly',
13
14
  'bit.ly',
14
15
  'bitly.com',
@@ -16,21 +17,47 @@ export const SHORTENER_DOMAINS = [
16
17
  'buff.ly',
17
18
  'clck.ru',
18
19
  'cutt.ly',
20
+ 'fc-lc.xyz',
19
21
  'goo.gl',
22
+ 'goto.now',
20
23
  'is.gd',
24
+ 'link2.fm',
25
+ 'ln.run',
26
+ 'lnk.ua',
21
27
  'lnkd.in',
28
+ 'n9.cl',
22
29
  'ow.ly',
30
+ 'psee.io',
23
31
  'rb.gy',
24
32
  'rebrand.ly',
33
+ 'rg.by',
25
34
  's.id',
35
+ 'short.do',
26
36
  'short.gy',
37
+ 'shorten.as',
38
+ 'shorten.ee',
39
+ 'shorten.is',
40
+ 'shorten.so',
41
+ 'shorten.tv',
42
+ 'shorten.world',
43
+ 'shorter.me',
44
+ 'shortn.icu',
27
45
  'shorturl.at',
46
+ 'shorturl.lt',
47
+ 'shorturl.ly',
48
+ 'slnt.to',
49
+ 'smarturl.lt',
50
+ 'smarturl.my',
51
+ 'sprl.me',
52
+ 'sw.run',
28
53
  't.co',
29
54
  't.ly',
30
55
  'tiny.cc',
31
56
  'tinyurl.com',
57
+ 'urlr.me',
32
58
  'v.gd',
33
59
  'x.gd',
60
+ 'zig.ht',
34
61
  ];
35
62
  export function isAllowedProfileLinkUrl(url) {
36
63
  let parsed;
@@ -1 +1 @@
1
- {"version":3,"file":"profile-link-rules.js","sourceRoot":"","sources":["../../src/views/profile-link-rules.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,uDAAuD;AAEvD,kFAAkF;AAClF,MAAM,CAAC,MAAM,iBAAiB,GAAG,EAAE,CAAA;AAEnC;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,SAAS;IACT,SAAS;IACT,SAAS;IACT,QAAQ;IACR,OAAO;IACP,SAAS;IACT,OAAO;IACP,OAAO;IACP,YAAY;IACZ,MAAM;IACN,UAAU;IACV,aAAa;IACb,MAAM;IACN,MAAM;IACN,SAAS;IACT,aAAa;IACb,MAAM;IACN,MAAM;CACP,CAAA;AAED,MAAM,UAAU,uBAAuB,CAAC,GAAW;IACjD,IAAI,MAAW,CAAA;IACf,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAA;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAA;IAC9C,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAA;IAC1C,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAC5B,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,EAAE,CAAC,CAC3D,CAAA;AACH,CAAC","sourcesContent":["// Server-side rules for profile link destinations. Clients enforce the same\n// rules when a link is saved, but any client can write a link record, so\n// links that break them are left out of profile views.\n\n/** Profiles show at most this many links, in the order the profile lists them. */\nexport const MAX_PROFILE_LINKS = 10\n\n/**\n * General-purpose URL shorteners, which hide where a link goes. A brand's own\n * short links (youtu.be, amzn.to) only lead to that brand, so they aren't\n * listed. Kept in sync with the Bluesky app.\n */\nexport const SHORTENER_DOMAINS = [\n 'adf.ly',\n 'bit.ly',\n 'bitly.com',\n 'bl.ink',\n 'buff.ly',\n 'clck.ru',\n 'cutt.ly',\n 'goo.gl',\n 'is.gd',\n 'lnkd.in',\n 'ow.ly',\n 'rb.gy',\n 'rebrand.ly',\n 's.id',\n 'short.gy',\n 'shorturl.at',\n 't.co',\n 't.ly',\n 'tiny.cc',\n 'tinyurl.com',\n 'v.gd',\n 'x.gd',\n]\n\nexport function isAllowedProfileLinkUrl(url: string): boolean {\n let parsed: URL\n try {\n parsed = new URL(url)\n } catch {\n return false\n }\n if (parsed.protocol !== 'https:') return false\n const host = parsed.hostname.toLowerCase()\n return !SHORTENER_DOMAINS.some(\n (domain) => host === domain || host.endsWith(`.${domain}`),\n )\n}\n"]}
1
+ {"version":3,"file":"profile-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AAQ,CAAC,IAAI,MAAM,EAAE,CAAC,CAC3D,CAAA;AACH,CAAC","sourcesContent":["// Server-side rules for profile link destinations. Clients enforce the same\n// rules when a link is saved, but any client can write a link record, so\n// links that break them are left out of profile views.\n\n/** Profiles show at most this many links, in the order the profile lists them. */\nexport const MAX_PROFILE_LINKS = 10\n\n/**\n * General-purpose URL shorteners, which hide where a link goes. A brand's own\n * short links (youtu.be, amzn.to) only lead to that brand, so they aren't\n * listed. Kept in sync with the Bluesky app.\n */\nexport const SHORTENER_DOMAINS = [\n 'acel.me',\n 'adf.ly',\n 'bit.ly',\n 'bitly.com',\n 'bl.ink',\n 'buff.ly',\n 'clck.ru',\n 'cutt.ly',\n 'fc-lc.xyz',\n 'goo.gl',\n 'goto.now',\n 'is.gd',\n 'link2.fm',\n 'ln.run',\n 'lnk.ua',\n 'lnkd.in',\n 'n9.cl',\n 'ow.ly',\n 'psee.io',\n 'rb.gy',\n 'rebrand.ly',\n 'rg.by',\n 's.id',\n 'short.do',\n 'short.gy',\n 'shorten.as',\n 'shorten.ee',\n 'shorten.is',\n 'shorten.so',\n 'shorten.tv',\n 'shorten.world',\n 'shorter.me',\n 'shortn.icu',\n 'shorturl.at',\n 'shorturl.lt',\n 'shorturl.ly',\n 'slnt.to',\n 'smarturl.lt',\n 'smarturl.my',\n 'sprl.me',\n 'sw.run',\n 't.co',\n 't.ly',\n 'tiny.cc',\n 'tinyurl.com',\n 'urlr.me',\n 'v.gd',\n 'x.gd',\n 'zig.ht',\n]\n\nexport function isAllowedProfileLinkUrl(url: string): boolean {\n let parsed: URL\n try {\n parsed = new URL(url)\n } catch {\n return false\n }\n if (parsed.protocol !== 'https:') return false\n const host = parsed.hostname.toLowerCase()\n return !SHORTENER_DOMAINS.some(\n (domain) => host === domain || host.endsWith(`.${domain}`),\n )\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/bsky",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "license": "MIT",
5
5
  "description": "Reference implementation of app.bsky App View (Bluesky API)",
6
6
  "keywords": [
@@ -78,8 +78,8 @@
78
78
  "@atproto/common": "^0.8.6",
79
79
  "@atproto/crypto": "^0.5.7",
80
80
  "@atproto/did": "^0.5.6",
81
- "@atproto/identity": "^0.5.20",
82
81
  "@atproto/lex": "^0.4.2",
82
+ "@atproto/identity": "^0.5.20",
83
83
  "@atproto/repo": "^0.11.1",
84
84
  "@atproto/sync": "^0.4.17",
85
85
  "@atproto/syntax": "^0.7.7",