@unavatar/core 3.36.0 → 3.37.1
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 +1 -23
- package/package.json +3 -3
- package/src/providers/index.js +2 -0
- package/src/providers/raycast.js +24 -0
package/README.md
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
- [Buy Me a Coffee](#buy-me-a-coffee)
|
|
25
25
|
- [CodePen](#codepen)
|
|
26
26
|
- [Cults3D](#cults3d)
|
|
27
|
-
- [Cursor](#cursor)
|
|
28
27
|
- [DeviantArt](#deviantart)
|
|
29
28
|
- [Discord](#discord)
|
|
30
29
|
- [Docker Hub](#docker-hub)
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
- [Patreon](#patreon)
|
|
53
52
|
- [Pinterest](#pinterest)
|
|
54
53
|
- [Printables](#printables)
|
|
55
|
-
- [Primal](#primal)
|
|
56
54
|
- [Product Hunt](#product-hunt)
|
|
57
55
|
- [PSN Profiles](#psn-profiles)
|
|
58
56
|
- [Reddit](#reddit)
|
|
@@ -61,7 +59,6 @@
|
|
|
61
59
|
- [Spotify](#spotify)
|
|
62
60
|
- [Stack Overflow](#stack-overflow)
|
|
63
61
|
- [Steam](#steam)
|
|
64
|
-
- [Strava](#strava)
|
|
65
62
|
- [Substack](#substack)
|
|
66
63
|
- [Telegram](#telegram)
|
|
67
64
|
- [Thingiverse](#thingiverse)
|
|
@@ -91,7 +88,7 @@ Welcome to **unavatar.io**, the ultimate avatar service that offers everything y
|
|
|
91
88
|
|
|
92
89
|
- **Versatile**: A wide range of platforms and services including [TikTok](https://unavatar.io/docs#tiktok), [Instagram](https://unavatar.io/docs#instagram), [YouTube](https://unavatar.io/docs#youtube), [X/Twitter](https://unavatar.io/docs#xtwitter), [Gravatar](https://unavatar.io/docs#gravatar), etc., meaning you can rule all of them just querying against unavatar.
|
|
93
90
|
|
|
94
|
-
- **Speed**: Designed to be fast and efficient with a
|
|
91
|
+
- **Speed**: Designed to be fast and efficient with a 92% cache hit rate, serving 9.59 TB of data across 258.5M requests.
|
|
95
92
|
|
|
96
93
|
- **Optimize**: All the images are not only compressed on-the-fly to reduce their size and save bandwidth, but also optimized to maintain a high-quality ratio. They are ready for immediate use, enhancing the overall optimization of your website or application.
|
|
97
94
|
|
|
@@ -587,12 +584,6 @@ Get any Cults3D creator's profile picture by username.
|
|
|
587
584
|
|
|
588
585
|
e.g., [unavatar.io/cults3d/RaBros](https://unavatar.io/cults3d/RaBros)
|
|
589
586
|
|
|
590
|
-
### Cursor
|
|
591
|
-
|
|
592
|
-
Get any Cursor user's profile picture by their username.
|
|
593
|
-
|
|
594
|
-
e.g., [unavatar.io/cursor/eric](https://unavatar.io/cursor/eric)
|
|
595
|
-
|
|
596
587
|
### DeviantArt
|
|
597
588
|
|
|
598
589
|
Get any DeviantArt user's profile picture by their username.
|
|
@@ -662,7 +653,6 @@ Available inputs:
|
|
|
662
653
|
|
|
663
654
|
- Username, e.g., [unavatar.io/facebook/zuck](https://unavatar.io/facebook/zuck)
|
|
664
655
|
- Page, e.g., [unavatar.io/facebook/windtodayco](https://unavatar.io/facebook/windtodayco)
|
|
665
|
-
- Group ID, e.g., [unavatar.io/facebook/1426378481098002](https://unavatar.io/facebook/1426378481098002)
|
|
666
656
|
|
|
667
657
|
### Flickr
|
|
668
658
|
|
|
@@ -818,12 +808,6 @@ Get any Printables user's profile picture by their username.
|
|
|
818
808
|
|
|
819
809
|
e.g., [unavatar.io/printables/DukeDoks](https://unavatar.io/printables/DukeDoks)
|
|
820
810
|
|
|
821
|
-
### Primal
|
|
822
|
-
|
|
823
|
-
Get any Primal user's profile picture by their username.
|
|
824
|
-
|
|
825
|
-
e.g., [unavatar.io/primal/jack](https://unavatar.io/primal/jack)
|
|
826
|
-
|
|
827
811
|
### Product Hunt
|
|
828
812
|
|
|
829
813
|
Get profile pictures for Product Hunt users or logos for Product Hunt products.
|
|
@@ -902,12 +886,6 @@ Available inputs:
|
|
|
902
886
|
- `profile`: [unavatar.io/steam/profile:76561198044605749](https://unavatar.io/steam/profile:76561198044605749)
|
|
903
887
|
- `group`: [unavatar.io/steam/group:murcia-gaming](https://unavatar.io/steam/group:murcia-gaming)
|
|
904
888
|
|
|
905
|
-
### Strava
|
|
906
|
-
|
|
907
|
-
Get any Strava athlete's profile picture by their username or athlete ID.
|
|
908
|
-
|
|
909
|
-
e.g., [unavatar.io/strava/kikobeats](https://unavatar.io/strava/kikobeats)
|
|
910
|
-
|
|
911
889
|
### Substack
|
|
912
890
|
|
|
913
891
|
Get any Substack author's profile picture by their publication username.
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@unavatar/core",
|
|
3
3
|
"description": "Get unified user avatar from social networks, including Instagram, SoundCloud, Telegram, Twitter, YouTube & more.",
|
|
4
4
|
"homepage": "https://unavatar.io",
|
|
5
|
-
"version": "3.
|
|
5
|
+
"version": "3.37.1",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"exports": {
|
|
8
8
|
".": "./src/index.js",
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
"@metascraper/helpers": "~5.50.0",
|
|
129
129
|
"@microlink/mql": "~0.16.0",
|
|
130
130
|
"@microlink/ping-url": "~1.4.16",
|
|
131
|
-
"browserless": "~13.
|
|
131
|
+
"browserless": "~13.1.0",
|
|
132
132
|
"cacheable-lookup": "~6.1.0",
|
|
133
133
|
"data-uri-regex": "~0.1.4",
|
|
134
134
|
"debug-logfmt": "~1.4.10",
|
|
135
135
|
"got": "~11.8.6",
|
|
136
|
-
"html-get": "~2.
|
|
136
|
+
"html-get": "~2.24.3",
|
|
137
137
|
"https-tls": "~1.0.24",
|
|
138
138
|
"ipaddr.js": "~2.4.0",
|
|
139
139
|
"is-absolute-url": "~3.0.3",
|
package/src/providers/index.js
CHANGED
|
@@ -36,6 +36,7 @@ const providersBy = {
|
|
|
36
36
|
'primal',
|
|
37
37
|
'producthunt',
|
|
38
38
|
'psnprofiles',
|
|
39
|
+
'raycast',
|
|
39
40
|
'reddit',
|
|
40
41
|
'snapchat',
|
|
41
42
|
'soundcloud',
|
|
@@ -97,6 +98,7 @@ module.exports = ctx => {
|
|
|
97
98
|
primal: require('./primal')(ctx),
|
|
98
99
|
producthunt: require('./producthunt')(ctx),
|
|
99
100
|
psnprofiles: require('./psnprofiles')(ctx),
|
|
101
|
+
raycast: require('./raycast')(ctx),
|
|
100
102
|
reddit: require('./reddit')(ctx),
|
|
101
103
|
snapchat: require('./snapchat')(ctx),
|
|
102
104
|
soundcloud: require('./soundcloud')(ctx),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const getAvatarUrl = input => {
|
|
4
|
+
const handle = input.startsWith('@') ? input.slice(1) : input
|
|
5
|
+
return `https://www.raycast.com/${handle}`
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const getAvatar = $ => {
|
|
9
|
+
const src = $('img[alt="Avatar"]').attr('src')
|
|
10
|
+
if (!src) return
|
|
11
|
+
|
|
12
|
+
const url = new URL(src, 'https://www.raycast.com')
|
|
13
|
+
return url.searchParams.get('url') ?? src
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = ({ createHtmlProvider }) =>
|
|
17
|
+
createHtmlProvider({
|
|
18
|
+
name: 'raycast',
|
|
19
|
+
url: getAvatarUrl,
|
|
20
|
+
getter: getAvatar
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
module.exports.getAvatarUrl = getAvatarUrl
|
|
24
|
+
module.exports.getAvatar = getAvatar
|