@xiashe/cli 0.1.44 → 0.1.45
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiashe/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.45",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"xiashe": "bin/xiashe.mjs"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"lib"
|
|
13
13
|
],
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@xiashe/sdk": "0.1.
|
|
15
|
+
"@xiashe/sdk": "0.1.45"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
18
|
"node": ">=20"
|
|
@@ -24,7 +24,7 @@ export function creatorCardFooter(value) {
|
|
|
24
24
|
const attribution = value?.creatorAttribution ?? value?.resolved?.creatorAttribution;
|
|
25
25
|
if (!attribution || typeof attribution.cardUrl !== 'string') return '';
|
|
26
26
|
try {
|
|
27
|
-
const url = new URL(attribution.
|
|
27
|
+
const url = new URL(attribution.cardUrl || attribution.stableCardUrl);
|
|
28
28
|
if (!new Set(ORIGINS.values()).has(url.origin) || url.username || url.password || url.search || url.hash || !/^\/(?:@[a-zA-Z0-9_-]+|c\/[a-zA-Z0-9_-]+)$/.test(url.pathname)) return '';
|
|
29
29
|
const name = typeof attribution.displayName === 'string'
|
|
30
30
|
? attribution.displayName.replace(/[\x00-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/g, '').slice(0, 80) : '';
|
|
@@ -24,7 +24,7 @@ export function creatorCardFooter(value) {
|
|
|
24
24
|
const attribution = value?.creatorAttribution ?? value?.resolved?.creatorAttribution;
|
|
25
25
|
if (!attribution || typeof attribution.cardUrl !== 'string') return '';
|
|
26
26
|
try {
|
|
27
|
-
const url = new URL(attribution.
|
|
27
|
+
const url = new URL(attribution.cardUrl || attribution.stableCardUrl);
|
|
28
28
|
if (!new Set(ORIGINS.values()).has(url.origin) || url.username || url.password || url.search || url.hash || !/^\/(?:@[a-zA-Z0-9_-]+|c\/[a-zA-Z0-9_-]+)$/.test(url.pathname)) return '';
|
|
29
29
|
const name = typeof attribution.displayName === 'string'
|
|
30
30
|
? attribution.displayName.replace(/[\x00-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/g, '').slice(0, 80) : '';
|