@fedify/fedify 0.11.0-dev.235 → 0.11.0-dev.237
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGES.md +3 -0
- package/esm/federation/middleware.js +7 -5
- package/esm/vocab/vocab.js +1117 -76
- package/package.json +1 -1
- package/types/federation/callback.d.ts +3 -3
- package/types/federation/callback.d.ts.map +1 -1
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +102 -0
- package/types/vocab/vocab.d.ts.map +1 -1
package/esm/vocab/vocab.js
CHANGED
@@ -3,6 +3,7 @@ var _a, _b, _c;
|
|
3
3
|
import * as dntShim from "../_dnt.shims.js";
|
4
4
|
// @ts-ignore TS7016
|
5
5
|
import jsonld from "jsonld";
|
6
|
+
import { getLogger } from "@logtape/logtape";
|
6
7
|
import { LanguageTag, parseLanguageTag } from "@phensley/language-tag";
|
7
8
|
import { decode as decodeMultibase, encode as encodeMultibase, } from "multibase";
|
8
9
|
import { fetchDocumentLoader, } from "../runtime/docloader.js";
|
@@ -1225,7 +1226,18 @@ export class Object {
|
|
1225
1226
|
fetchDocumentLoader;
|
1226
1227
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1227
1228
|
fetchDocumentLoader;
|
1228
|
-
|
1229
|
+
let fetchResult;
|
1230
|
+
try {
|
1231
|
+
fetchResult = await documentLoader(url.href);
|
1232
|
+
}
|
1233
|
+
catch (error) {
|
1234
|
+
if (options.suppressError) {
|
1235
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1236
|
+
return null;
|
1237
|
+
}
|
1238
|
+
throw error;
|
1239
|
+
}
|
1240
|
+
const { document } = fetchResult;
|
1229
1241
|
try {
|
1230
1242
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1231
1243
|
}
|
@@ -1272,6 +1284,8 @@ export class Object {
|
|
1272
1284
|
const v = vs[i];
|
1273
1285
|
if (v instanceof URL) {
|
1274
1286
|
const fetched = await this.#fetchAttachment(v, options);
|
1287
|
+
if (fetched == null)
|
1288
|
+
continue;
|
1275
1289
|
vs[i] = fetched;
|
1276
1290
|
yield fetched;
|
1277
1291
|
continue;
|
@@ -1284,7 +1298,18 @@ export class Object {
|
|
1284
1298
|
fetchDocumentLoader;
|
1285
1299
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1286
1300
|
fetchDocumentLoader;
|
1287
|
-
|
1301
|
+
let fetchResult;
|
1302
|
+
try {
|
1303
|
+
fetchResult = await documentLoader(url.href);
|
1304
|
+
}
|
1305
|
+
catch (error) {
|
1306
|
+
if (options.suppressError) {
|
1307
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1308
|
+
return null;
|
1309
|
+
}
|
1310
|
+
throw error;
|
1311
|
+
}
|
1312
|
+
const { document } = fetchResult;
|
1288
1313
|
try {
|
1289
1314
|
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
1290
1315
|
}
|
@@ -1352,6 +1377,8 @@ export class Object {
|
|
1352
1377
|
const v = this.#_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py[0];
|
1353
1378
|
if (v instanceof URL) {
|
1354
1379
|
const fetched = await this.#fetchAttribution(v, options);
|
1380
|
+
if (fetched == null)
|
1381
|
+
return null;
|
1355
1382
|
this.#_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py[0] = fetched;
|
1356
1383
|
return fetched;
|
1357
1384
|
}
|
@@ -1375,6 +1402,8 @@ export class Object {
|
|
1375
1402
|
const v = vs[i];
|
1376
1403
|
if (v instanceof URL) {
|
1377
1404
|
const fetched = await this.#fetchAttribution(v, options);
|
1405
|
+
if (fetched == null)
|
1406
|
+
continue;
|
1378
1407
|
vs[i] = fetched;
|
1379
1408
|
yield fetched;
|
1380
1409
|
continue;
|
@@ -1387,7 +1416,18 @@ export class Object {
|
|
1387
1416
|
fetchDocumentLoader;
|
1388
1417
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1389
1418
|
fetchDocumentLoader;
|
1390
|
-
|
1419
|
+
let fetchResult;
|
1420
|
+
try {
|
1421
|
+
fetchResult = await documentLoader(url.href);
|
1422
|
+
}
|
1423
|
+
catch (error) {
|
1424
|
+
if (options.suppressError) {
|
1425
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1426
|
+
return null;
|
1427
|
+
}
|
1428
|
+
throw error;
|
1429
|
+
}
|
1430
|
+
const { document } = fetchResult;
|
1391
1431
|
try {
|
1392
1432
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1393
1433
|
}
|
@@ -1420,6 +1460,8 @@ export class Object {
|
|
1420
1460
|
const v = this.#_3ocC3VVi88cEd5sPWL8djkZsvTN6[0];
|
1421
1461
|
if (v instanceof URL) {
|
1422
1462
|
const fetched = await this.#fetchAudience(v, options);
|
1463
|
+
if (fetched == null)
|
1464
|
+
return null;
|
1423
1465
|
this.#_3ocC3VVi88cEd5sPWL8djkZsvTN6[0] = fetched;
|
1424
1466
|
return fetched;
|
1425
1467
|
}
|
@@ -1442,6 +1484,8 @@ export class Object {
|
|
1442
1484
|
const v = vs[i];
|
1443
1485
|
if (v instanceof URL) {
|
1444
1486
|
const fetched = await this.#fetchAudience(v, options);
|
1487
|
+
if (fetched == null)
|
1488
|
+
continue;
|
1445
1489
|
vs[i] = fetched;
|
1446
1490
|
yield fetched;
|
1447
1491
|
continue;
|
@@ -1474,7 +1518,18 @@ export class Object {
|
|
1474
1518
|
fetchDocumentLoader;
|
1475
1519
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1476
1520
|
fetchDocumentLoader;
|
1477
|
-
|
1521
|
+
let fetchResult;
|
1522
|
+
try {
|
1523
|
+
fetchResult = await documentLoader(url.href);
|
1524
|
+
}
|
1525
|
+
catch (error) {
|
1526
|
+
if (options.suppressError) {
|
1527
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1528
|
+
return null;
|
1529
|
+
}
|
1530
|
+
throw error;
|
1531
|
+
}
|
1532
|
+
const { document } = fetchResult;
|
1478
1533
|
try {
|
1479
1534
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1480
1535
|
}
|
@@ -1517,6 +1572,8 @@ export class Object {
|
|
1517
1572
|
const v = vs[i];
|
1518
1573
|
if (v instanceof URL) {
|
1519
1574
|
const fetched = await this.#fetchContext(v, options);
|
1575
|
+
if (fetched == null)
|
1576
|
+
continue;
|
1520
1577
|
vs[i] = fetched;
|
1521
1578
|
yield fetched;
|
1522
1579
|
continue;
|
@@ -1555,7 +1612,18 @@ export class Object {
|
|
1555
1612
|
fetchDocumentLoader;
|
1556
1613
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1557
1614
|
fetchDocumentLoader;
|
1558
|
-
|
1615
|
+
let fetchResult;
|
1616
|
+
try {
|
1617
|
+
fetchResult = await documentLoader(url.href);
|
1618
|
+
}
|
1619
|
+
catch (error) {
|
1620
|
+
if (options.suppressError) {
|
1621
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1622
|
+
return null;
|
1623
|
+
}
|
1624
|
+
throw error;
|
1625
|
+
}
|
1626
|
+
const { document } = fetchResult;
|
1559
1627
|
try {
|
1560
1628
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1561
1629
|
}
|
@@ -1592,6 +1660,8 @@ export class Object {
|
|
1592
1660
|
const v = vs[i];
|
1593
1661
|
if (v instanceof URL) {
|
1594
1662
|
const fetched = await this.#fetchGenerator(v, options);
|
1663
|
+
if (fetched == null)
|
1664
|
+
continue;
|
1595
1665
|
vs[i] = fetched;
|
1596
1666
|
yield fetched;
|
1597
1667
|
continue;
|
@@ -1604,7 +1674,18 @@ export class Object {
|
|
1604
1674
|
fetchDocumentLoader;
|
1605
1675
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1606
1676
|
fetchDocumentLoader;
|
1607
|
-
|
1677
|
+
let fetchResult;
|
1678
|
+
try {
|
1679
|
+
fetchResult = await documentLoader(url.href);
|
1680
|
+
}
|
1681
|
+
catch (error) {
|
1682
|
+
if (options.suppressError) {
|
1683
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1684
|
+
return null;
|
1685
|
+
}
|
1686
|
+
throw error;
|
1687
|
+
}
|
1688
|
+
const { document } = fetchResult;
|
1608
1689
|
try {
|
1609
1690
|
return await Image.fromJsonLd(document, { documentLoader, contextLoader });
|
1610
1691
|
}
|
@@ -1638,6 +1719,8 @@ export class Object {
|
|
1638
1719
|
const v = this.#_33CjRLy5ujtsUrwRSCrsggvGdKuR[0];
|
1639
1720
|
if (v instanceof URL) {
|
1640
1721
|
const fetched = await this.#fetchIcon(v, options);
|
1722
|
+
if (fetched == null)
|
1723
|
+
return null;
|
1641
1724
|
this.#_33CjRLy5ujtsUrwRSCrsggvGdKuR[0] = fetched;
|
1642
1725
|
return fetched;
|
1643
1726
|
}
|
@@ -1661,6 +1744,8 @@ export class Object {
|
|
1661
1744
|
const v = vs[i];
|
1662
1745
|
if (v instanceof URL) {
|
1663
1746
|
const fetched = await this.#fetchIcon(v, options);
|
1747
|
+
if (fetched == null)
|
1748
|
+
continue;
|
1664
1749
|
vs[i] = fetched;
|
1665
1750
|
yield fetched;
|
1666
1751
|
continue;
|
@@ -1673,7 +1758,18 @@ export class Object {
|
|
1673
1758
|
fetchDocumentLoader;
|
1674
1759
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1675
1760
|
fetchDocumentLoader;
|
1676
|
-
|
1761
|
+
let fetchResult;
|
1762
|
+
try {
|
1763
|
+
fetchResult = await documentLoader(url.href);
|
1764
|
+
}
|
1765
|
+
catch (error) {
|
1766
|
+
if (options.suppressError) {
|
1767
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1768
|
+
return null;
|
1769
|
+
}
|
1770
|
+
throw error;
|
1771
|
+
}
|
1772
|
+
const { document } = fetchResult;
|
1677
1773
|
try {
|
1678
1774
|
return await Image.fromJsonLd(document, { documentLoader, contextLoader });
|
1679
1775
|
}
|
@@ -1707,6 +1803,8 @@ export class Object {
|
|
1707
1803
|
const v = this.#_3dXrUdkARxwyJLtJcYi1AJ92H41U[0];
|
1708
1804
|
if (v instanceof URL) {
|
1709
1805
|
const fetched = await this.#fetchImage(v, options);
|
1806
|
+
if (fetched == null)
|
1807
|
+
return null;
|
1710
1808
|
this.#_3dXrUdkARxwyJLtJcYi1AJ92H41U[0] = fetched;
|
1711
1809
|
return fetched;
|
1712
1810
|
}
|
@@ -1730,6 +1828,8 @@ export class Object {
|
|
1730
1828
|
const v = vs[i];
|
1731
1829
|
if (v instanceof URL) {
|
1732
1830
|
const fetched = await this.#fetchImage(v, options);
|
1831
|
+
if (fetched == null)
|
1832
|
+
continue;
|
1733
1833
|
vs[i] = fetched;
|
1734
1834
|
yield fetched;
|
1735
1835
|
continue;
|
@@ -1742,7 +1842,18 @@ export class Object {
|
|
1742
1842
|
fetchDocumentLoader;
|
1743
1843
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1744
1844
|
fetchDocumentLoader;
|
1745
|
-
|
1845
|
+
let fetchResult;
|
1846
|
+
try {
|
1847
|
+
fetchResult = await documentLoader(url.href);
|
1848
|
+
}
|
1849
|
+
catch (error) {
|
1850
|
+
if (options.suppressError) {
|
1851
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1852
|
+
return null;
|
1853
|
+
}
|
1854
|
+
throw error;
|
1855
|
+
}
|
1856
|
+
const { document } = fetchResult;
|
1746
1857
|
try {
|
1747
1858
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1748
1859
|
}
|
@@ -1785,6 +1896,8 @@ export class Object {
|
|
1785
1896
|
const v = this.#_3fpbDrvZgf3Kq1a5V9aByFn8kx3s[0];
|
1786
1897
|
if (v instanceof URL) {
|
1787
1898
|
const fetched = await this.#fetchReplyTarget(v, options);
|
1899
|
+
if (fetched == null)
|
1900
|
+
return null;
|
1788
1901
|
this.#_3fpbDrvZgf3Kq1a5V9aByFn8kx3s[0] = fetched;
|
1789
1902
|
return fetched;
|
1790
1903
|
}
|
@@ -1807,6 +1920,8 @@ export class Object {
|
|
1807
1920
|
const v = vs[i];
|
1808
1921
|
if (v instanceof URL) {
|
1809
1922
|
const fetched = await this.#fetchReplyTarget(v, options);
|
1923
|
+
if (fetched == null)
|
1924
|
+
continue;
|
1810
1925
|
vs[i] = fetched;
|
1811
1926
|
yield fetched;
|
1812
1927
|
continue;
|
@@ -1819,7 +1934,18 @@ export class Object {
|
|
1819
1934
|
fetchDocumentLoader;
|
1820
1935
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1821
1936
|
fetchDocumentLoader;
|
1822
|
-
|
1937
|
+
let fetchResult;
|
1938
|
+
try {
|
1939
|
+
fetchResult = await documentLoader(url.href);
|
1940
|
+
}
|
1941
|
+
catch (error) {
|
1942
|
+
if (options.suppressError) {
|
1943
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
1944
|
+
return null;
|
1945
|
+
}
|
1946
|
+
throw error;
|
1947
|
+
}
|
1948
|
+
const { document } = fetchResult;
|
1823
1949
|
try {
|
1824
1950
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
1825
1951
|
}
|
@@ -1862,6 +1988,8 @@ export class Object {
|
|
1862
1988
|
const v = this.#_31k5MUZJsnsPNg8dQQJieWaXTFnR[0];
|
1863
1989
|
if (v instanceof URL) {
|
1864
1990
|
const fetched = await this.#fetchLocation(v, options);
|
1991
|
+
if (fetched == null)
|
1992
|
+
return null;
|
1865
1993
|
this.#_31k5MUZJsnsPNg8dQQJieWaXTFnR[0] = fetched;
|
1866
1994
|
return fetched;
|
1867
1995
|
}
|
@@ -1884,6 +2012,8 @@ export class Object {
|
|
1884
2012
|
const v = vs[i];
|
1885
2013
|
if (v instanceof URL) {
|
1886
2014
|
const fetched = await this.#fetchLocation(v, options);
|
2015
|
+
if (fetched == null)
|
2016
|
+
continue;
|
1887
2017
|
vs[i] = fetched;
|
1888
2018
|
yield fetched;
|
1889
2019
|
continue;
|
@@ -1896,7 +2026,18 @@ export class Object {
|
|
1896
2026
|
fetchDocumentLoader;
|
1897
2027
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1898
2028
|
fetchDocumentLoader;
|
1899
|
-
|
2029
|
+
let fetchResult;
|
2030
|
+
try {
|
2031
|
+
fetchResult = await documentLoader(url.href);
|
2032
|
+
}
|
2033
|
+
catch (error) {
|
2034
|
+
if (options.suppressError) {
|
2035
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2036
|
+
return null;
|
2037
|
+
}
|
2038
|
+
throw error;
|
2039
|
+
}
|
2040
|
+
const { document } = fetchResult;
|
1900
2041
|
try {
|
1901
2042
|
return await Link.fromJsonLd(document, { documentLoader, contextLoader });
|
1902
2043
|
}
|
@@ -1938,6 +2079,8 @@ export class Object {
|
|
1938
2079
|
const v = this.#_gCVTegXxWWCw6wWRxa1QF65zusg[0];
|
1939
2080
|
if (v instanceof URL) {
|
1940
2081
|
const fetched = await this.#fetchPreview(v, options);
|
2082
|
+
if (fetched == null)
|
2083
|
+
return null;
|
1941
2084
|
this.#_gCVTegXxWWCw6wWRxa1QF65zusg[0] = fetched;
|
1942
2085
|
return fetched;
|
1943
2086
|
}
|
@@ -1959,6 +2102,8 @@ export class Object {
|
|
1959
2102
|
const v = vs[i];
|
1960
2103
|
if (v instanceof URL) {
|
1961
2104
|
const fetched = await this.#fetchPreview(v, options);
|
2105
|
+
if (fetched == null)
|
2106
|
+
continue;
|
1962
2107
|
vs[i] = fetched;
|
1963
2108
|
yield fetched;
|
1964
2109
|
continue;
|
@@ -1978,7 +2123,18 @@ export class Object {
|
|
1978
2123
|
fetchDocumentLoader;
|
1979
2124
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
1980
2125
|
fetchDocumentLoader;
|
1981
|
-
|
2126
|
+
let fetchResult;
|
2127
|
+
try {
|
2128
|
+
fetchResult = await documentLoader(url.href);
|
2129
|
+
}
|
2130
|
+
catch (error) {
|
2131
|
+
if (options.suppressError) {
|
2132
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2133
|
+
return null;
|
2134
|
+
}
|
2135
|
+
throw error;
|
2136
|
+
}
|
2137
|
+
const { document } = fetchResult;
|
1982
2138
|
try {
|
1983
2139
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
1984
2140
|
}
|
@@ -2011,6 +2167,8 @@ export class Object {
|
|
2011
2167
|
const v = this.#_7UpwM3JWcXhADcscukEehBorf6k[0];
|
2012
2168
|
if (v instanceof URL) {
|
2013
2169
|
const fetched = await this.#fetchReplies(v, options);
|
2170
|
+
if (fetched == null)
|
2171
|
+
return null;
|
2014
2172
|
this.#_7UpwM3JWcXhADcscukEehBorf6k[0] = fetched;
|
2015
2173
|
return fetched;
|
2016
2174
|
}
|
@@ -2045,7 +2203,18 @@ export class Object {
|
|
2045
2203
|
fetchDocumentLoader;
|
2046
2204
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2047
2205
|
fetchDocumentLoader;
|
2048
|
-
|
2206
|
+
let fetchResult;
|
2207
|
+
try {
|
2208
|
+
fetchResult = await documentLoader(url.href);
|
2209
|
+
}
|
2210
|
+
catch (error) {
|
2211
|
+
if (options.suppressError) {
|
2212
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2213
|
+
return null;
|
2214
|
+
}
|
2215
|
+
throw error;
|
2216
|
+
}
|
2217
|
+
const { document } = fetchResult;
|
2049
2218
|
try {
|
2050
2219
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
2051
2220
|
}
|
@@ -2085,6 +2254,8 @@ export class Object {
|
|
2085
2254
|
const v = vs[i];
|
2086
2255
|
if (v instanceof URL) {
|
2087
2256
|
const fetched = await this.#fetchTag(v, options);
|
2257
|
+
if (fetched == null)
|
2258
|
+
continue;
|
2088
2259
|
vs[i] = fetched;
|
2089
2260
|
yield fetched;
|
2090
2261
|
continue;
|
@@ -2116,7 +2287,18 @@ export class Object {
|
|
2116
2287
|
fetchDocumentLoader;
|
2117
2288
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2118
2289
|
fetchDocumentLoader;
|
2119
|
-
|
2290
|
+
let fetchResult;
|
2291
|
+
try {
|
2292
|
+
fetchResult = await documentLoader(url.href);
|
2293
|
+
}
|
2294
|
+
catch (error) {
|
2295
|
+
if (options.suppressError) {
|
2296
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2297
|
+
return null;
|
2298
|
+
}
|
2299
|
+
throw error;
|
2300
|
+
}
|
2301
|
+
const { document } = fetchResult;
|
2120
2302
|
try {
|
2121
2303
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
2122
2304
|
}
|
@@ -2149,6 +2331,8 @@ export class Object {
|
|
2149
2331
|
const v = this.#_3hFbw7DTpHhq3cvVhkY8njhcsXbd[0];
|
2150
2332
|
if (v instanceof URL) {
|
2151
2333
|
const fetched = await this.#fetchTo(v, options);
|
2334
|
+
if (fetched == null)
|
2335
|
+
return null;
|
2152
2336
|
this.#_3hFbw7DTpHhq3cvVhkY8njhcsXbd[0] = fetched;
|
2153
2337
|
return fetched;
|
2154
2338
|
}
|
@@ -2171,6 +2355,8 @@ export class Object {
|
|
2171
2355
|
const v = vs[i];
|
2172
2356
|
if (v instanceof URL) {
|
2173
2357
|
const fetched = await this.#fetchTo(v, options);
|
2358
|
+
if (fetched == null)
|
2359
|
+
continue;
|
2174
2360
|
vs[i] = fetched;
|
2175
2361
|
yield fetched;
|
2176
2362
|
continue;
|
@@ -2183,7 +2369,18 @@ export class Object {
|
|
2183
2369
|
fetchDocumentLoader;
|
2184
2370
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2185
2371
|
fetchDocumentLoader;
|
2186
|
-
|
2372
|
+
let fetchResult;
|
2373
|
+
try {
|
2374
|
+
fetchResult = await documentLoader(url.href);
|
2375
|
+
}
|
2376
|
+
catch (error) {
|
2377
|
+
if (options.suppressError) {
|
2378
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2379
|
+
return null;
|
2380
|
+
}
|
2381
|
+
throw error;
|
2382
|
+
}
|
2383
|
+
const { document } = fetchResult;
|
2187
2384
|
try {
|
2188
2385
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
2189
2386
|
}
|
@@ -2216,6 +2413,8 @@ export class Object {
|
|
2216
2413
|
const v = this.#_aLZupjwL8XB7tzdLgCMXdjZ6qej[0];
|
2217
2414
|
if (v instanceof URL) {
|
2218
2415
|
const fetched = await this.#fetchBto(v, options);
|
2416
|
+
if (fetched == null)
|
2417
|
+
return null;
|
2219
2418
|
this.#_aLZupjwL8XB7tzdLgCMXdjZ6qej[0] = fetched;
|
2220
2419
|
return fetched;
|
2221
2420
|
}
|
@@ -2238,6 +2437,8 @@ export class Object {
|
|
2238
2437
|
const v = vs[i];
|
2239
2438
|
if (v instanceof URL) {
|
2240
2439
|
const fetched = await this.#fetchBto(v, options);
|
2440
|
+
if (fetched == null)
|
2441
|
+
continue;
|
2241
2442
|
vs[i] = fetched;
|
2242
2443
|
yield fetched;
|
2243
2444
|
continue;
|
@@ -2250,7 +2451,18 @@ export class Object {
|
|
2250
2451
|
fetchDocumentLoader;
|
2251
2452
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2252
2453
|
fetchDocumentLoader;
|
2253
|
-
|
2454
|
+
let fetchResult;
|
2455
|
+
try {
|
2456
|
+
fetchResult = await documentLoader(url.href);
|
2457
|
+
}
|
2458
|
+
catch (error) {
|
2459
|
+
if (options.suppressError) {
|
2460
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2461
|
+
return null;
|
2462
|
+
}
|
2463
|
+
throw error;
|
2464
|
+
}
|
2465
|
+
const { document } = fetchResult;
|
2254
2466
|
try {
|
2255
2467
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
2256
2468
|
}
|
@@ -2283,6 +2495,8 @@ export class Object {
|
|
2283
2495
|
const v = this.#_42a1SvBs24QSLzKcfjCyNTjW5a1g[0];
|
2284
2496
|
if (v instanceof URL) {
|
2285
2497
|
const fetched = await this.#fetchCc(v, options);
|
2498
|
+
if (fetched == null)
|
2499
|
+
return null;
|
2286
2500
|
this.#_42a1SvBs24QSLzKcfjCyNTjW5a1g[0] = fetched;
|
2287
2501
|
return fetched;
|
2288
2502
|
}
|
@@ -2305,6 +2519,8 @@ export class Object {
|
|
2305
2519
|
const v = vs[i];
|
2306
2520
|
if (v instanceof URL) {
|
2307
2521
|
const fetched = await this.#fetchCc(v, options);
|
2522
|
+
if (fetched == null)
|
2523
|
+
continue;
|
2308
2524
|
vs[i] = fetched;
|
2309
2525
|
yield fetched;
|
2310
2526
|
continue;
|
@@ -2317,7 +2533,18 @@ export class Object {
|
|
2317
2533
|
fetchDocumentLoader;
|
2318
2534
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2319
2535
|
fetchDocumentLoader;
|
2320
|
-
|
2536
|
+
let fetchResult;
|
2537
|
+
try {
|
2538
|
+
fetchResult = await documentLoader(url.href);
|
2539
|
+
}
|
2540
|
+
catch (error) {
|
2541
|
+
if (options.suppressError) {
|
2542
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2543
|
+
return null;
|
2544
|
+
}
|
2545
|
+
throw error;
|
2546
|
+
}
|
2547
|
+
const { document } = fetchResult;
|
2321
2548
|
try {
|
2322
2549
|
return await _a.fromJsonLd(document, { documentLoader, contextLoader });
|
2323
2550
|
}
|
@@ -2350,6 +2577,8 @@ export class Object {
|
|
2350
2577
|
const v = this.#_3qvegKUB8YLgTXRpEf8E6JZSkz2H[0];
|
2351
2578
|
if (v instanceof URL) {
|
2352
2579
|
const fetched = await this.#fetchBcc(v, options);
|
2580
|
+
if (fetched == null)
|
2581
|
+
return null;
|
2353
2582
|
this.#_3qvegKUB8YLgTXRpEf8E6JZSkz2H[0] = fetched;
|
2354
2583
|
return fetched;
|
2355
2584
|
}
|
@@ -2372,6 +2601,8 @@ export class Object {
|
|
2372
2601
|
const v = vs[i];
|
2373
2602
|
if (v instanceof URL) {
|
2374
2603
|
const fetched = await this.#fetchBcc(v, options);
|
2604
|
+
if (fetched == null)
|
2605
|
+
continue;
|
2375
2606
|
vs[i] = fetched;
|
2376
2607
|
yield fetched;
|
2377
2608
|
continue;
|
@@ -2411,7 +2642,18 @@ export class Object {
|
|
2411
2642
|
fetchDocumentLoader;
|
2412
2643
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
2413
2644
|
fetchDocumentLoader;
|
2414
|
-
|
2645
|
+
let fetchResult;
|
2646
|
+
try {
|
2647
|
+
fetchResult = await documentLoader(url.href);
|
2648
|
+
}
|
2649
|
+
catch (error) {
|
2650
|
+
if (options.suppressError) {
|
2651
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
2652
|
+
return null;
|
2653
|
+
}
|
2654
|
+
throw error;
|
2655
|
+
}
|
2656
|
+
const { document } = fetchResult;
|
2415
2657
|
try {
|
2416
2658
|
return await DataIntegrityProof.fromJsonLd(document, { documentLoader, contextLoader });
|
2417
2659
|
}
|
@@ -2443,6 +2685,8 @@ export class Object {
|
|
2443
2685
|
const v = this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8[0];
|
2444
2686
|
if (v instanceof URL) {
|
2445
2687
|
const fetched = await this.#fetchProof(v, options);
|
2688
|
+
if (fetched == null)
|
2689
|
+
return null;
|
2446
2690
|
this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8[0] = fetched;
|
2447
2691
|
return fetched;
|
2448
2692
|
}
|
@@ -2464,6 +2708,8 @@ export class Object {
|
|
2464
2708
|
const v = vs[i];
|
2465
2709
|
if (v instanceof URL) {
|
2466
2710
|
const fetched = await this.#fetchProof(v, options);
|
2711
|
+
if (fetched == null)
|
2712
|
+
continue;
|
2467
2713
|
vs[i] = fetched;
|
2468
2714
|
yield fetched;
|
2469
2715
|
continue;
|
@@ -4746,7 +4992,18 @@ export class DataIntegrityProof {
|
|
4746
4992
|
fetchDocumentLoader;
|
4747
4993
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
4748
4994
|
fetchDocumentLoader;
|
4749
|
-
|
4995
|
+
let fetchResult;
|
4996
|
+
try {
|
4997
|
+
fetchResult = await documentLoader(url.href);
|
4998
|
+
}
|
4999
|
+
catch (error) {
|
5000
|
+
if (options.suppressError) {
|
5001
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
5002
|
+
return null;
|
5003
|
+
}
|
5004
|
+
throw error;
|
5005
|
+
}
|
5006
|
+
const { document } = fetchResult;
|
4750
5007
|
try {
|
4751
5008
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
4752
5009
|
}
|
@@ -4781,6 +5038,8 @@ export class DataIntegrityProof {
|
|
4781
5038
|
const v = this.#_2mHVKxqA7zncjveJrDEo3pWpMZqg[0];
|
4782
5039
|
if (v instanceof URL) {
|
4783
5040
|
const fetched = await this.#fetchVerificationMethod(v, options);
|
5041
|
+
if (fetched == null)
|
5042
|
+
return null;
|
4784
5043
|
this.#_2mHVKxqA7zncjveJrDEo3pWpMZqg[0] = fetched;
|
4785
5044
|
return fetched;
|
4786
5045
|
}
|
@@ -5140,7 +5399,18 @@ export class CryptographicKey {
|
|
5140
5399
|
fetchDocumentLoader;
|
5141
5400
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
5142
5401
|
fetchDocumentLoader;
|
5143
|
-
|
5402
|
+
let fetchResult;
|
5403
|
+
try {
|
5404
|
+
fetchResult = await documentLoader(url.href);
|
5405
|
+
}
|
5406
|
+
catch (error) {
|
5407
|
+
if (options.suppressError) {
|
5408
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
5409
|
+
return null;
|
5410
|
+
}
|
5411
|
+
throw error;
|
5412
|
+
}
|
5413
|
+
const { document } = fetchResult;
|
5144
5414
|
try {
|
5145
5415
|
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
5146
5416
|
}
|
@@ -5206,6 +5476,8 @@ export class CryptographicKey {
|
|
5206
5476
|
const v = this.#_5UJq9NDh3ZHgswFwwdVxQvJxdx2[0];
|
5207
5477
|
if (v instanceof URL) {
|
5208
5478
|
const fetched = await this.#fetchOwner(v, options);
|
5479
|
+
if (fetched == null)
|
5480
|
+
return null;
|
5209
5481
|
this.#_5UJq9NDh3ZHgswFwwdVxQvJxdx2[0] = fetched;
|
5210
5482
|
return fetched;
|
5211
5483
|
}
|
@@ -5495,7 +5767,18 @@ export class Multikey {
|
|
5495
5767
|
fetchDocumentLoader;
|
5496
5768
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
5497
5769
|
fetchDocumentLoader;
|
5498
|
-
|
5770
|
+
let fetchResult;
|
5771
|
+
try {
|
5772
|
+
fetchResult = await documentLoader(url.href);
|
5773
|
+
}
|
5774
|
+
catch (error) {
|
5775
|
+
if (options.suppressError) {
|
5776
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
5777
|
+
return null;
|
5778
|
+
}
|
5779
|
+
throw error;
|
5780
|
+
}
|
5781
|
+
const { document } = fetchResult;
|
5499
5782
|
try {
|
5500
5783
|
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
5501
5784
|
}
|
@@ -5561,6 +5844,8 @@ export class Multikey {
|
|
5561
5844
|
const v = this.#_2yr3eUBTP6cNcyaxKzAXWjFsnGzN[0];
|
5562
5845
|
if (v instanceof URL) {
|
5563
5846
|
const fetched = await this.#fetchController(v, options);
|
5847
|
+
if (fetched == null)
|
5848
|
+
return null;
|
5564
5849
|
this.#_2yr3eUBTP6cNcyaxKzAXWjFsnGzN[0] = fetched;
|
5565
5850
|
return fetched;
|
5566
5851
|
}
|
@@ -5901,7 +6186,18 @@ export class Activity extends Object {
|
|
5901
6186
|
fetchDocumentLoader;
|
5902
6187
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
5903
6188
|
fetchDocumentLoader;
|
5904
|
-
|
6189
|
+
let fetchResult;
|
6190
|
+
try {
|
6191
|
+
fetchResult = await documentLoader(url.href);
|
6192
|
+
}
|
6193
|
+
catch (error) {
|
6194
|
+
if (options.suppressError) {
|
6195
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
6196
|
+
return null;
|
6197
|
+
}
|
6198
|
+
throw error;
|
6199
|
+
}
|
6200
|
+
const { document } = fetchResult;
|
5905
6201
|
try {
|
5906
6202
|
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
5907
6203
|
}
|
@@ -5969,6 +6265,8 @@ export class Activity extends Object {
|
|
5969
6265
|
const v = this.#_2DjTTboo3CNHU2a2JQqUSE2dbv9D[0];
|
5970
6266
|
if (v instanceof URL) {
|
5971
6267
|
const fetched = await this.#fetchActor(v, options);
|
6268
|
+
if (fetched == null)
|
6269
|
+
return null;
|
5972
6270
|
this.#_2DjTTboo3CNHU2a2JQqUSE2dbv9D[0] = fetched;
|
5973
6271
|
return fetched;
|
5974
6272
|
}
|
@@ -5992,6 +6290,8 @@ export class Activity extends Object {
|
|
5992
6290
|
const v = vs[i];
|
5993
6291
|
if (v instanceof URL) {
|
5994
6292
|
const fetched = await this.#fetchActor(v, options);
|
6293
|
+
if (fetched == null)
|
6294
|
+
continue;
|
5995
6295
|
vs[i] = fetched;
|
5996
6296
|
yield fetched;
|
5997
6297
|
continue;
|
@@ -6004,7 +6304,18 @@ export class Activity extends Object {
|
|
6004
6304
|
fetchDocumentLoader;
|
6005
6305
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
6006
6306
|
fetchDocumentLoader;
|
6007
|
-
|
6307
|
+
let fetchResult;
|
6308
|
+
try {
|
6309
|
+
fetchResult = await documentLoader(url.href);
|
6310
|
+
}
|
6311
|
+
catch (error) {
|
6312
|
+
if (options.suppressError) {
|
6313
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
6314
|
+
return null;
|
6315
|
+
}
|
6316
|
+
throw error;
|
6317
|
+
}
|
6318
|
+
const { document } = fetchResult;
|
6008
6319
|
try {
|
6009
6320
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
6010
6321
|
}
|
@@ -6038,6 +6349,8 @@ export class Activity extends Object {
|
|
6038
6349
|
const v = this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc[0];
|
6039
6350
|
if (v instanceof URL) {
|
6040
6351
|
const fetched = await this.#fetchObject(v, options);
|
6352
|
+
if (fetched == null)
|
6353
|
+
return null;
|
6041
6354
|
this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc[0] = fetched;
|
6042
6355
|
return fetched;
|
6043
6356
|
}
|
@@ -6061,6 +6374,8 @@ export class Activity extends Object {
|
|
6061
6374
|
const v = vs[i];
|
6062
6375
|
if (v instanceof URL) {
|
6063
6376
|
const fetched = await this.#fetchObject(v, options);
|
6377
|
+
if (fetched == null)
|
6378
|
+
continue;
|
6064
6379
|
vs[i] = fetched;
|
6065
6380
|
yield fetched;
|
6066
6381
|
continue;
|
@@ -7168,7 +7483,18 @@ export class Application extends Object {
|
|
7168
7483
|
fetchDocumentLoader;
|
7169
7484
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7170
7485
|
fetchDocumentLoader;
|
7171
|
-
|
7486
|
+
let fetchResult;
|
7487
|
+
try {
|
7488
|
+
fetchResult = await documentLoader(url.href);
|
7489
|
+
}
|
7490
|
+
catch (error) {
|
7491
|
+
if (options.suppressError) {
|
7492
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7493
|
+
return null;
|
7494
|
+
}
|
7495
|
+
throw error;
|
7496
|
+
}
|
7497
|
+
const { document } = fetchResult;
|
7172
7498
|
try {
|
7173
7499
|
return await CryptographicKey.fromJsonLd(document, { documentLoader, contextLoader });
|
7174
7500
|
}
|
@@ -7200,6 +7526,8 @@ export class Application extends Object {
|
|
7200
7526
|
const v = this.#_axq166E2eZADq34V4MYUc8KMZdC[0];
|
7201
7527
|
if (v instanceof URL) {
|
7202
7528
|
const fetched = await this.#fetchPublicKey(v, options);
|
7529
|
+
if (fetched == null)
|
7530
|
+
return null;
|
7203
7531
|
this.#_axq166E2eZADq34V4MYUc8KMZdC[0] = fetched;
|
7204
7532
|
return fetched;
|
7205
7533
|
}
|
@@ -7221,6 +7549,8 @@ export class Application extends Object {
|
|
7221
7549
|
const v = vs[i];
|
7222
7550
|
if (v instanceof URL) {
|
7223
7551
|
const fetched = await this.#fetchPublicKey(v, options);
|
7552
|
+
if (fetched == null)
|
7553
|
+
continue;
|
7224
7554
|
vs[i] = fetched;
|
7225
7555
|
yield fetched;
|
7226
7556
|
continue;
|
@@ -7233,7 +7563,18 @@ export class Application extends Object {
|
|
7233
7563
|
fetchDocumentLoader;
|
7234
7564
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7235
7565
|
fetchDocumentLoader;
|
7236
|
-
|
7566
|
+
let fetchResult;
|
7567
|
+
try {
|
7568
|
+
fetchResult = await documentLoader(url.href);
|
7569
|
+
}
|
7570
|
+
catch (error) {
|
7571
|
+
if (options.suppressError) {
|
7572
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7573
|
+
return null;
|
7574
|
+
}
|
7575
|
+
throw error;
|
7576
|
+
}
|
7577
|
+
const { document } = fetchResult;
|
7237
7578
|
try {
|
7238
7579
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
7239
7580
|
}
|
@@ -7268,6 +7609,8 @@ export class Application extends Object {
|
|
7268
7609
|
const v = this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0];
|
7269
7610
|
if (v instanceof URL) {
|
7270
7611
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
7612
|
+
if (fetched == null)
|
7613
|
+
return null;
|
7271
7614
|
this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0] = fetched;
|
7272
7615
|
return fetched;
|
7273
7616
|
}
|
@@ -7292,6 +7635,8 @@ export class Application extends Object {
|
|
7292
7635
|
const v = vs[i];
|
7293
7636
|
if (v instanceof URL) {
|
7294
7637
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
7638
|
+
if (fetched == null)
|
7639
|
+
continue;
|
7295
7640
|
vs[i] = fetched;
|
7296
7641
|
yield fetched;
|
7297
7642
|
continue;
|
@@ -7316,7 +7661,18 @@ export class Application extends Object {
|
|
7316
7661
|
fetchDocumentLoader;
|
7317
7662
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7318
7663
|
fetchDocumentLoader;
|
7319
|
-
|
7664
|
+
let fetchResult;
|
7665
|
+
try {
|
7666
|
+
fetchResult = await documentLoader(url.href);
|
7667
|
+
}
|
7668
|
+
catch (error) {
|
7669
|
+
if (options.suppressError) {
|
7670
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7671
|
+
return null;
|
7672
|
+
}
|
7673
|
+
throw error;
|
7674
|
+
}
|
7675
|
+
const { document } = fetchResult;
|
7320
7676
|
try {
|
7321
7677
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
7322
7678
|
}
|
@@ -7360,6 +7716,8 @@ export class Application extends Object {
|
|
7360
7716
|
const v = this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0];
|
7361
7717
|
if (v instanceof URL) {
|
7362
7718
|
const fetched = await this.#fetchInbox(v, options);
|
7719
|
+
if (fetched == null)
|
7720
|
+
return null;
|
7363
7721
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0] = fetched;
|
7364
7722
|
return fetched;
|
7365
7723
|
}
|
@@ -7370,7 +7728,18 @@ export class Application extends Object {
|
|
7370
7728
|
fetchDocumentLoader;
|
7371
7729
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7372
7730
|
fetchDocumentLoader;
|
7373
|
-
|
7731
|
+
let fetchResult;
|
7732
|
+
try {
|
7733
|
+
fetchResult = await documentLoader(url.href);
|
7734
|
+
}
|
7735
|
+
catch (error) {
|
7736
|
+
if (options.suppressError) {
|
7737
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7738
|
+
return null;
|
7739
|
+
}
|
7740
|
+
throw error;
|
7741
|
+
}
|
7742
|
+
const { document } = fetchResult;
|
7374
7743
|
try {
|
7375
7744
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
7376
7745
|
}
|
@@ -7411,6 +7780,8 @@ export class Application extends Object {
|
|
7411
7780
|
const v = this.#_41QwhqJouoLg3h8dRPKat21brynC[0];
|
7412
7781
|
if (v instanceof URL) {
|
7413
7782
|
const fetched = await this.#fetchOutbox(v, options);
|
7783
|
+
if (fetched == null)
|
7784
|
+
return null;
|
7414
7785
|
this.#_41QwhqJouoLg3h8dRPKat21brynC[0] = fetched;
|
7415
7786
|
return fetched;
|
7416
7787
|
}
|
@@ -7421,7 +7792,18 @@ export class Application extends Object {
|
|
7421
7792
|
fetchDocumentLoader;
|
7422
7793
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7423
7794
|
fetchDocumentLoader;
|
7424
|
-
|
7795
|
+
let fetchResult;
|
7796
|
+
try {
|
7797
|
+
fetchResult = await documentLoader(url.href);
|
7798
|
+
}
|
7799
|
+
catch (error) {
|
7800
|
+
if (options.suppressError) {
|
7801
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7802
|
+
return null;
|
7803
|
+
}
|
7804
|
+
throw error;
|
7805
|
+
}
|
7806
|
+
const { document } = fetchResult;
|
7425
7807
|
try {
|
7426
7808
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
7427
7809
|
}
|
@@ -7457,6 +7839,8 @@ export class Application extends Object {
|
|
7457
7839
|
const v = this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0];
|
7458
7840
|
if (v instanceof URL) {
|
7459
7841
|
const fetched = await this.#fetchFollowing(v, options);
|
7842
|
+
if (fetched == null)
|
7843
|
+
return null;
|
7460
7844
|
this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0] = fetched;
|
7461
7845
|
return fetched;
|
7462
7846
|
}
|
@@ -7467,7 +7851,18 @@ export class Application extends Object {
|
|
7467
7851
|
fetchDocumentLoader;
|
7468
7852
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7469
7853
|
fetchDocumentLoader;
|
7470
|
-
|
7854
|
+
let fetchResult;
|
7855
|
+
try {
|
7856
|
+
fetchResult = await documentLoader(url.href);
|
7857
|
+
}
|
7858
|
+
catch (error) {
|
7859
|
+
if (options.suppressError) {
|
7860
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7861
|
+
return null;
|
7862
|
+
}
|
7863
|
+
throw error;
|
7864
|
+
}
|
7865
|
+
const { document } = fetchResult;
|
7471
7866
|
try {
|
7472
7867
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
7473
7868
|
}
|
@@ -7506,6 +7901,8 @@ export class Application extends Object {
|
|
7506
7901
|
const v = this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0];
|
7507
7902
|
if (v instanceof URL) {
|
7508
7903
|
const fetched = await this.#fetchFollowers(v, options);
|
7904
|
+
if (fetched == null)
|
7905
|
+
return null;
|
7509
7906
|
this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0] = fetched;
|
7510
7907
|
return fetched;
|
7511
7908
|
}
|
@@ -7516,7 +7913,18 @@ export class Application extends Object {
|
|
7516
7913
|
fetchDocumentLoader;
|
7517
7914
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7518
7915
|
fetchDocumentLoader;
|
7519
|
-
|
7916
|
+
let fetchResult;
|
7917
|
+
try {
|
7918
|
+
fetchResult = await documentLoader(url.href);
|
7919
|
+
}
|
7920
|
+
catch (error) {
|
7921
|
+
if (options.suppressError) {
|
7922
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7923
|
+
return null;
|
7924
|
+
}
|
7925
|
+
throw error;
|
7926
|
+
}
|
7927
|
+
const { document } = fetchResult;
|
7520
7928
|
try {
|
7521
7929
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
7522
7930
|
}
|
@@ -7553,6 +7961,8 @@ export class Application extends Object {
|
|
7553
7961
|
const v = this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0];
|
7554
7962
|
if (v instanceof URL) {
|
7555
7963
|
const fetched = await this.#fetchLinked(v, options);
|
7964
|
+
if (fetched == null)
|
7965
|
+
return null;
|
7556
7966
|
this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0] = fetched;
|
7557
7967
|
return fetched;
|
7558
7968
|
}
|
@@ -7563,7 +7973,18 @@ export class Application extends Object {
|
|
7563
7973
|
fetchDocumentLoader;
|
7564
7974
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
7565
7975
|
fetchDocumentLoader;
|
7566
|
-
|
7976
|
+
let fetchResult;
|
7977
|
+
try {
|
7978
|
+
fetchResult = await documentLoader(url.href);
|
7979
|
+
}
|
7980
|
+
catch (error) {
|
7981
|
+
if (options.suppressError) {
|
7982
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
7983
|
+
return null;
|
7984
|
+
}
|
7985
|
+
throw error;
|
7986
|
+
}
|
7987
|
+
const { document } = fetchResult;
|
7567
7988
|
try {
|
7568
7989
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
7569
7990
|
}
|
@@ -7590,6 +8011,8 @@ export class Application extends Object {
|
|
7590
8011
|
const v = vs[i];
|
7591
8012
|
if (v instanceof URL) {
|
7592
8013
|
const fetched = await this.#fetchStream(v, options);
|
8014
|
+
if (fetched == null)
|
8015
|
+
continue;
|
7593
8016
|
vs[i] = fetched;
|
7594
8017
|
yield fetched;
|
7595
8018
|
continue;
|
@@ -9311,7 +9734,18 @@ export class Collection extends Object {
|
|
9311
9734
|
fetchDocumentLoader;
|
9312
9735
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
9313
9736
|
fetchDocumentLoader;
|
9314
|
-
|
9737
|
+
let fetchResult;
|
9738
|
+
try {
|
9739
|
+
fetchResult = await documentLoader(url.href);
|
9740
|
+
}
|
9741
|
+
catch (error) {
|
9742
|
+
if (options.suppressError) {
|
9743
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
9744
|
+
return null;
|
9745
|
+
}
|
9746
|
+
throw error;
|
9747
|
+
}
|
9748
|
+
const { document } = fetchResult;
|
9315
9749
|
try {
|
9316
9750
|
return await CollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
9317
9751
|
}
|
@@ -9354,6 +9788,8 @@ export class Collection extends Object {
|
|
9354
9788
|
const v = this.#_3UyUdxnyn6cDn53QKrh4MBiearma[0];
|
9355
9789
|
if (v instanceof URL) {
|
9356
9790
|
const fetched = await this.#fetchCurrent(v, options);
|
9791
|
+
if (fetched == null)
|
9792
|
+
return null;
|
9357
9793
|
this.#_3UyUdxnyn6cDn53QKrh4MBiearma[0] = fetched;
|
9358
9794
|
return fetched;
|
9359
9795
|
}
|
@@ -9364,7 +9800,18 @@ export class Collection extends Object {
|
|
9364
9800
|
fetchDocumentLoader;
|
9365
9801
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
9366
9802
|
fetchDocumentLoader;
|
9367
|
-
|
9803
|
+
let fetchResult;
|
9804
|
+
try {
|
9805
|
+
fetchResult = await documentLoader(url.href);
|
9806
|
+
}
|
9807
|
+
catch (error) {
|
9808
|
+
if (options.suppressError) {
|
9809
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
9810
|
+
return null;
|
9811
|
+
}
|
9812
|
+
throw error;
|
9813
|
+
}
|
9814
|
+
const { document } = fetchResult;
|
9368
9815
|
try {
|
9369
9816
|
return await CollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
9370
9817
|
}
|
@@ -9407,6 +9854,8 @@ export class Collection extends Object {
|
|
9407
9854
|
const v = this.#_J52RqweMe6hhv7RnLJMC8BExTE5[0];
|
9408
9855
|
if (v instanceof URL) {
|
9409
9856
|
const fetched = await this.#fetchFirst(v, options);
|
9857
|
+
if (fetched == null)
|
9858
|
+
return null;
|
9410
9859
|
this.#_J52RqweMe6hhv7RnLJMC8BExTE5[0] = fetched;
|
9411
9860
|
return fetched;
|
9412
9861
|
}
|
@@ -9417,7 +9866,18 @@ export class Collection extends Object {
|
|
9417
9866
|
fetchDocumentLoader;
|
9418
9867
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
9419
9868
|
fetchDocumentLoader;
|
9420
|
-
|
9869
|
+
let fetchResult;
|
9870
|
+
try {
|
9871
|
+
fetchResult = await documentLoader(url.href);
|
9872
|
+
}
|
9873
|
+
catch (error) {
|
9874
|
+
if (options.suppressError) {
|
9875
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
9876
|
+
return null;
|
9877
|
+
}
|
9878
|
+
throw error;
|
9879
|
+
}
|
9880
|
+
const { document } = fetchResult;
|
9421
9881
|
try {
|
9422
9882
|
return await CollectionPage.fromJsonLd(document, { documentLoader, contextLoader });
|
9423
9883
|
}
|
@@ -9460,6 +9920,8 @@ export class Collection extends Object {
|
|
9460
9920
|
const v = this.#_gyJJnyEFnuNVi1HFZKfAn3Hfn26[0];
|
9461
9921
|
if (v instanceof URL) {
|
9462
9922
|
const fetched = await this.#fetchLast(v, options);
|
9923
|
+
if (fetched == null)
|
9924
|
+
return null;
|
9463
9925
|
this.#_gyJJnyEFnuNVi1HFZKfAn3Hfn26[0] = fetched;
|
9464
9926
|
return fetched;
|
9465
9927
|
}
|
@@ -9470,7 +9932,18 @@ export class Collection extends Object {
|
|
9470
9932
|
fetchDocumentLoader;
|
9471
9933
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
9472
9934
|
fetchDocumentLoader;
|
9473
|
-
|
9935
|
+
let fetchResult;
|
9936
|
+
try {
|
9937
|
+
fetchResult = await documentLoader(url.href);
|
9938
|
+
}
|
9939
|
+
catch (error) {
|
9940
|
+
if (options.suppressError) {
|
9941
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
9942
|
+
return null;
|
9943
|
+
}
|
9944
|
+
throw error;
|
9945
|
+
}
|
9946
|
+
const { document } = fetchResult;
|
9474
9947
|
try {
|
9475
9948
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
9476
9949
|
}
|
@@ -9508,6 +9981,8 @@ export class Collection extends Object {
|
|
9508
9981
|
const v = vs[i];
|
9509
9982
|
if (v instanceof URL) {
|
9510
9983
|
const fetched = await this.#fetchItem(v, options);
|
9984
|
+
if (fetched == null)
|
9985
|
+
continue;
|
9511
9986
|
vs[i] = fetched;
|
9512
9987
|
yield fetched;
|
9513
9988
|
continue;
|
@@ -9997,7 +10472,18 @@ export class CollectionPage extends Collection {
|
|
9997
10472
|
fetchDocumentLoader;
|
9998
10473
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
9999
10474
|
fetchDocumentLoader;
|
10000
|
-
|
10475
|
+
let fetchResult;
|
10476
|
+
try {
|
10477
|
+
fetchResult = await documentLoader(url.href);
|
10478
|
+
}
|
10479
|
+
catch (error) {
|
10480
|
+
if (options.suppressError) {
|
10481
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
10482
|
+
return null;
|
10483
|
+
}
|
10484
|
+
throw error;
|
10485
|
+
}
|
10486
|
+
const { document } = fetchResult;
|
10001
10487
|
try {
|
10002
10488
|
return await Link.fromJsonLd(document, { documentLoader, contextLoader });
|
10003
10489
|
}
|
@@ -10040,6 +10526,8 @@ export class CollectionPage extends Collection {
|
|
10040
10526
|
const v = this.#_2kWgBhQKjEauxx8C6qF3ZQamK4Le[0];
|
10041
10527
|
if (v instanceof URL) {
|
10042
10528
|
const fetched = await this.#fetchPartOf(v, options);
|
10529
|
+
if (fetched == null)
|
10530
|
+
return null;
|
10043
10531
|
this.#_2kWgBhQKjEauxx8C6qF3ZQamK4Le[0] = fetched;
|
10044
10532
|
return fetched;
|
10045
10533
|
}
|
@@ -10050,7 +10538,18 @@ export class CollectionPage extends Collection {
|
|
10050
10538
|
fetchDocumentLoader;
|
10051
10539
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
10052
10540
|
fetchDocumentLoader;
|
10053
|
-
|
10541
|
+
let fetchResult;
|
10542
|
+
try {
|
10543
|
+
fetchResult = await documentLoader(url.href);
|
10544
|
+
}
|
10545
|
+
catch (error) {
|
10546
|
+
if (options.suppressError) {
|
10547
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
10548
|
+
return null;
|
10549
|
+
}
|
10550
|
+
throw error;
|
10551
|
+
}
|
10552
|
+
const { document } = fetchResult;
|
10054
10553
|
try {
|
10055
10554
|
return await _b.fromJsonLd(document, { documentLoader, contextLoader });
|
10056
10555
|
}
|
@@ -10092,6 +10591,8 @@ export class CollectionPage extends Collection {
|
|
10092
10591
|
const v = this.#_3BT4kQLcXhHx7TAWaNDKh8nFn9eY[0];
|
10093
10592
|
if (v instanceof URL) {
|
10094
10593
|
const fetched = await this.#fetchNext(v, options);
|
10594
|
+
if (fetched == null)
|
10595
|
+
return null;
|
10095
10596
|
this.#_3BT4kQLcXhHx7TAWaNDKh8nFn9eY[0] = fetched;
|
10096
10597
|
return fetched;
|
10097
10598
|
}
|
@@ -10102,7 +10603,18 @@ export class CollectionPage extends Collection {
|
|
10102
10603
|
fetchDocumentLoader;
|
10103
10604
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
10104
10605
|
fetchDocumentLoader;
|
10105
|
-
|
10606
|
+
let fetchResult;
|
10607
|
+
try {
|
10608
|
+
fetchResult = await documentLoader(url.href);
|
10609
|
+
}
|
10610
|
+
catch (error) {
|
10611
|
+
if (options.suppressError) {
|
10612
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
10613
|
+
return null;
|
10614
|
+
}
|
10615
|
+
throw error;
|
10616
|
+
}
|
10617
|
+
const { document } = fetchResult;
|
10106
10618
|
try {
|
10107
10619
|
return await _b.fromJsonLd(document, { documentLoader, contextLoader });
|
10108
10620
|
}
|
@@ -10144,6 +10656,8 @@ export class CollectionPage extends Collection {
|
|
10144
10656
|
const v = this.#_3b8yG8tDNzQFFEnWhCc13G8eHooA[0];
|
10145
10657
|
if (v instanceof URL) {
|
10146
10658
|
const fetched = await this.#fetchPrev(v, options);
|
10659
|
+
if (fetched == null)
|
10660
|
+
return null;
|
10147
10661
|
this.#_3b8yG8tDNzQFFEnWhCc13G8eHooA[0] = fetched;
|
10148
10662
|
return fetched;
|
10149
10663
|
}
|
@@ -12041,7 +12555,18 @@ export class Group extends Object {
|
|
12041
12555
|
fetchDocumentLoader;
|
12042
12556
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12043
12557
|
fetchDocumentLoader;
|
12044
|
-
|
12558
|
+
let fetchResult;
|
12559
|
+
try {
|
12560
|
+
fetchResult = await documentLoader(url.href);
|
12561
|
+
}
|
12562
|
+
catch (error) {
|
12563
|
+
if (options.suppressError) {
|
12564
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12565
|
+
return null;
|
12566
|
+
}
|
12567
|
+
throw error;
|
12568
|
+
}
|
12569
|
+
const { document } = fetchResult;
|
12045
12570
|
try {
|
12046
12571
|
return await CryptographicKey.fromJsonLd(document, { documentLoader, contextLoader });
|
12047
12572
|
}
|
@@ -12073,6 +12598,8 @@ export class Group extends Object {
|
|
12073
12598
|
const v = this.#_axq166E2eZADq34V4MYUc8KMZdC[0];
|
12074
12599
|
if (v instanceof URL) {
|
12075
12600
|
const fetched = await this.#fetchPublicKey(v, options);
|
12601
|
+
if (fetched == null)
|
12602
|
+
return null;
|
12076
12603
|
this.#_axq166E2eZADq34V4MYUc8KMZdC[0] = fetched;
|
12077
12604
|
return fetched;
|
12078
12605
|
}
|
@@ -12094,6 +12621,8 @@ export class Group extends Object {
|
|
12094
12621
|
const v = vs[i];
|
12095
12622
|
if (v instanceof URL) {
|
12096
12623
|
const fetched = await this.#fetchPublicKey(v, options);
|
12624
|
+
if (fetched == null)
|
12625
|
+
continue;
|
12097
12626
|
vs[i] = fetched;
|
12098
12627
|
yield fetched;
|
12099
12628
|
continue;
|
@@ -12106,7 +12635,18 @@ export class Group extends Object {
|
|
12106
12635
|
fetchDocumentLoader;
|
12107
12636
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12108
12637
|
fetchDocumentLoader;
|
12109
|
-
|
12638
|
+
let fetchResult;
|
12639
|
+
try {
|
12640
|
+
fetchResult = await documentLoader(url.href);
|
12641
|
+
}
|
12642
|
+
catch (error) {
|
12643
|
+
if (options.suppressError) {
|
12644
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12645
|
+
return null;
|
12646
|
+
}
|
12647
|
+
throw error;
|
12648
|
+
}
|
12649
|
+
const { document } = fetchResult;
|
12110
12650
|
try {
|
12111
12651
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
12112
12652
|
}
|
@@ -12141,6 +12681,8 @@ export class Group extends Object {
|
|
12141
12681
|
const v = this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0];
|
12142
12682
|
if (v instanceof URL) {
|
12143
12683
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
12684
|
+
if (fetched == null)
|
12685
|
+
return null;
|
12144
12686
|
this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0] = fetched;
|
12145
12687
|
return fetched;
|
12146
12688
|
}
|
@@ -12165,6 +12707,8 @@ export class Group extends Object {
|
|
12165
12707
|
const v = vs[i];
|
12166
12708
|
if (v instanceof URL) {
|
12167
12709
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
12710
|
+
if (fetched == null)
|
12711
|
+
continue;
|
12168
12712
|
vs[i] = fetched;
|
12169
12713
|
yield fetched;
|
12170
12714
|
continue;
|
@@ -12189,7 +12733,18 @@ export class Group extends Object {
|
|
12189
12733
|
fetchDocumentLoader;
|
12190
12734
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12191
12735
|
fetchDocumentLoader;
|
12192
|
-
|
12736
|
+
let fetchResult;
|
12737
|
+
try {
|
12738
|
+
fetchResult = await documentLoader(url.href);
|
12739
|
+
}
|
12740
|
+
catch (error) {
|
12741
|
+
if (options.suppressError) {
|
12742
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12743
|
+
return null;
|
12744
|
+
}
|
12745
|
+
throw error;
|
12746
|
+
}
|
12747
|
+
const { document } = fetchResult;
|
12193
12748
|
try {
|
12194
12749
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
12195
12750
|
}
|
@@ -12233,6 +12788,8 @@ export class Group extends Object {
|
|
12233
12788
|
const v = this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0];
|
12234
12789
|
if (v instanceof URL) {
|
12235
12790
|
const fetched = await this.#fetchInbox(v, options);
|
12791
|
+
if (fetched == null)
|
12792
|
+
return null;
|
12236
12793
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0] = fetched;
|
12237
12794
|
return fetched;
|
12238
12795
|
}
|
@@ -12243,7 +12800,18 @@ export class Group extends Object {
|
|
12243
12800
|
fetchDocumentLoader;
|
12244
12801
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12245
12802
|
fetchDocumentLoader;
|
12246
|
-
|
12803
|
+
let fetchResult;
|
12804
|
+
try {
|
12805
|
+
fetchResult = await documentLoader(url.href);
|
12806
|
+
}
|
12807
|
+
catch (error) {
|
12808
|
+
if (options.suppressError) {
|
12809
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12810
|
+
return null;
|
12811
|
+
}
|
12812
|
+
throw error;
|
12813
|
+
}
|
12814
|
+
const { document } = fetchResult;
|
12247
12815
|
try {
|
12248
12816
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
12249
12817
|
}
|
@@ -12284,6 +12852,8 @@ export class Group extends Object {
|
|
12284
12852
|
const v = this.#_41QwhqJouoLg3h8dRPKat21brynC[0];
|
12285
12853
|
if (v instanceof URL) {
|
12286
12854
|
const fetched = await this.#fetchOutbox(v, options);
|
12855
|
+
if (fetched == null)
|
12856
|
+
return null;
|
12287
12857
|
this.#_41QwhqJouoLg3h8dRPKat21brynC[0] = fetched;
|
12288
12858
|
return fetched;
|
12289
12859
|
}
|
@@ -12294,7 +12864,18 @@ export class Group extends Object {
|
|
12294
12864
|
fetchDocumentLoader;
|
12295
12865
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12296
12866
|
fetchDocumentLoader;
|
12297
|
-
|
12867
|
+
let fetchResult;
|
12868
|
+
try {
|
12869
|
+
fetchResult = await documentLoader(url.href);
|
12870
|
+
}
|
12871
|
+
catch (error) {
|
12872
|
+
if (options.suppressError) {
|
12873
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12874
|
+
return null;
|
12875
|
+
}
|
12876
|
+
throw error;
|
12877
|
+
}
|
12878
|
+
const { document } = fetchResult;
|
12298
12879
|
try {
|
12299
12880
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
12300
12881
|
}
|
@@ -12330,6 +12911,8 @@ export class Group extends Object {
|
|
12330
12911
|
const v = this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0];
|
12331
12912
|
if (v instanceof URL) {
|
12332
12913
|
const fetched = await this.#fetchFollowing(v, options);
|
12914
|
+
if (fetched == null)
|
12915
|
+
return null;
|
12333
12916
|
this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0] = fetched;
|
12334
12917
|
return fetched;
|
12335
12918
|
}
|
@@ -12340,7 +12923,18 @@ export class Group extends Object {
|
|
12340
12923
|
fetchDocumentLoader;
|
12341
12924
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12342
12925
|
fetchDocumentLoader;
|
12343
|
-
|
12926
|
+
let fetchResult;
|
12927
|
+
try {
|
12928
|
+
fetchResult = await documentLoader(url.href);
|
12929
|
+
}
|
12930
|
+
catch (error) {
|
12931
|
+
if (options.suppressError) {
|
12932
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12933
|
+
return null;
|
12934
|
+
}
|
12935
|
+
throw error;
|
12936
|
+
}
|
12937
|
+
const { document } = fetchResult;
|
12344
12938
|
try {
|
12345
12939
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
12346
12940
|
}
|
@@ -12379,6 +12973,8 @@ export class Group extends Object {
|
|
12379
12973
|
const v = this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0];
|
12380
12974
|
if (v instanceof URL) {
|
12381
12975
|
const fetched = await this.#fetchFollowers(v, options);
|
12976
|
+
if (fetched == null)
|
12977
|
+
return null;
|
12382
12978
|
this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0] = fetched;
|
12383
12979
|
return fetched;
|
12384
12980
|
}
|
@@ -12389,7 +12985,18 @@ export class Group extends Object {
|
|
12389
12985
|
fetchDocumentLoader;
|
12390
12986
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12391
12987
|
fetchDocumentLoader;
|
12392
|
-
|
12988
|
+
let fetchResult;
|
12989
|
+
try {
|
12990
|
+
fetchResult = await documentLoader(url.href);
|
12991
|
+
}
|
12992
|
+
catch (error) {
|
12993
|
+
if (options.suppressError) {
|
12994
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
12995
|
+
return null;
|
12996
|
+
}
|
12997
|
+
throw error;
|
12998
|
+
}
|
12999
|
+
const { document } = fetchResult;
|
12393
13000
|
try {
|
12394
13001
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
12395
13002
|
}
|
@@ -12426,6 +13033,8 @@ export class Group extends Object {
|
|
12426
13033
|
const v = this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0];
|
12427
13034
|
if (v instanceof URL) {
|
12428
13035
|
const fetched = await this.#fetchLinked(v, options);
|
13036
|
+
if (fetched == null)
|
13037
|
+
return null;
|
12429
13038
|
this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0] = fetched;
|
12430
13039
|
return fetched;
|
12431
13040
|
}
|
@@ -12436,7 +13045,18 @@ export class Group extends Object {
|
|
12436
13045
|
fetchDocumentLoader;
|
12437
13046
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
12438
13047
|
fetchDocumentLoader;
|
12439
|
-
|
13048
|
+
let fetchResult;
|
13049
|
+
try {
|
13050
|
+
fetchResult = await documentLoader(url.href);
|
13051
|
+
}
|
13052
|
+
catch (error) {
|
13053
|
+
if (options.suppressError) {
|
13054
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
13055
|
+
return null;
|
13056
|
+
}
|
13057
|
+
throw error;
|
13058
|
+
}
|
13059
|
+
const { document } = fetchResult;
|
12440
13060
|
try {
|
12441
13061
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
12442
13062
|
}
|
@@ -12463,6 +13083,8 @@ export class Group extends Object {
|
|
12463
13083
|
const v = vs[i];
|
12464
13084
|
if (v instanceof URL) {
|
12465
13085
|
const fetched = await this.#fetchStream(v, options);
|
13086
|
+
if (fetched == null)
|
13087
|
+
continue;
|
12466
13088
|
vs[i] = fetched;
|
12467
13089
|
yield fetched;
|
12468
13090
|
continue;
|
@@ -13462,7 +14084,18 @@ export class Link {
|
|
13462
14084
|
fetchDocumentLoader;
|
13463
14085
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
13464
14086
|
fetchDocumentLoader;
|
13465
|
-
|
14087
|
+
let fetchResult;
|
14088
|
+
try {
|
14089
|
+
fetchResult = await documentLoader(url.href);
|
14090
|
+
}
|
14091
|
+
catch (error) {
|
14092
|
+
if (options.suppressError) {
|
14093
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
14094
|
+
return null;
|
14095
|
+
}
|
14096
|
+
throw error;
|
14097
|
+
}
|
14098
|
+
const { document } = fetchResult;
|
13466
14099
|
try {
|
13467
14100
|
return await _c.fromJsonLd(document, { documentLoader, contextLoader });
|
13468
14101
|
}
|
@@ -13499,6 +14132,8 @@ export class Link {
|
|
13499
14132
|
const v = vs[i];
|
13500
14133
|
if (v instanceof URL) {
|
13501
14134
|
const fetched = await this.#fetchPreview(v, options);
|
14135
|
+
if (fetched == null)
|
14136
|
+
continue;
|
13502
14137
|
vs[i] = fetched;
|
13503
14138
|
yield fetched;
|
13504
14139
|
continue;
|
@@ -15332,7 +15967,18 @@ export class Organization extends Object {
|
|
15332
15967
|
fetchDocumentLoader;
|
15333
15968
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15334
15969
|
fetchDocumentLoader;
|
15335
|
-
|
15970
|
+
let fetchResult;
|
15971
|
+
try {
|
15972
|
+
fetchResult = await documentLoader(url.href);
|
15973
|
+
}
|
15974
|
+
catch (error) {
|
15975
|
+
if (options.suppressError) {
|
15976
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
15977
|
+
return null;
|
15978
|
+
}
|
15979
|
+
throw error;
|
15980
|
+
}
|
15981
|
+
const { document } = fetchResult;
|
15336
15982
|
try {
|
15337
15983
|
return await CryptographicKey.fromJsonLd(document, { documentLoader, contextLoader });
|
15338
15984
|
}
|
@@ -15364,6 +16010,8 @@ export class Organization extends Object {
|
|
15364
16010
|
const v = this.#_axq166E2eZADq34V4MYUc8KMZdC[0];
|
15365
16011
|
if (v instanceof URL) {
|
15366
16012
|
const fetched = await this.#fetchPublicKey(v, options);
|
16013
|
+
if (fetched == null)
|
16014
|
+
return null;
|
15367
16015
|
this.#_axq166E2eZADq34V4MYUc8KMZdC[0] = fetched;
|
15368
16016
|
return fetched;
|
15369
16017
|
}
|
@@ -15385,6 +16033,8 @@ export class Organization extends Object {
|
|
15385
16033
|
const v = vs[i];
|
15386
16034
|
if (v instanceof URL) {
|
15387
16035
|
const fetched = await this.#fetchPublicKey(v, options);
|
16036
|
+
if (fetched == null)
|
16037
|
+
continue;
|
15388
16038
|
vs[i] = fetched;
|
15389
16039
|
yield fetched;
|
15390
16040
|
continue;
|
@@ -15397,7 +16047,18 @@ export class Organization extends Object {
|
|
15397
16047
|
fetchDocumentLoader;
|
15398
16048
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15399
16049
|
fetchDocumentLoader;
|
15400
|
-
|
16050
|
+
let fetchResult;
|
16051
|
+
try {
|
16052
|
+
fetchResult = await documentLoader(url.href);
|
16053
|
+
}
|
16054
|
+
catch (error) {
|
16055
|
+
if (options.suppressError) {
|
16056
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16057
|
+
return null;
|
16058
|
+
}
|
16059
|
+
throw error;
|
16060
|
+
}
|
16061
|
+
const { document } = fetchResult;
|
15401
16062
|
try {
|
15402
16063
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
15403
16064
|
}
|
@@ -15432,6 +16093,8 @@ export class Organization extends Object {
|
|
15432
16093
|
const v = this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0];
|
15433
16094
|
if (v instanceof URL) {
|
15434
16095
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
16096
|
+
if (fetched == null)
|
16097
|
+
return null;
|
15435
16098
|
this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0] = fetched;
|
15436
16099
|
return fetched;
|
15437
16100
|
}
|
@@ -15456,6 +16119,8 @@ export class Organization extends Object {
|
|
15456
16119
|
const v = vs[i];
|
15457
16120
|
if (v instanceof URL) {
|
15458
16121
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
16122
|
+
if (fetched == null)
|
16123
|
+
continue;
|
15459
16124
|
vs[i] = fetched;
|
15460
16125
|
yield fetched;
|
15461
16126
|
continue;
|
@@ -15480,7 +16145,18 @@ export class Organization extends Object {
|
|
15480
16145
|
fetchDocumentLoader;
|
15481
16146
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15482
16147
|
fetchDocumentLoader;
|
15483
|
-
|
16148
|
+
let fetchResult;
|
16149
|
+
try {
|
16150
|
+
fetchResult = await documentLoader(url.href);
|
16151
|
+
}
|
16152
|
+
catch (error) {
|
16153
|
+
if (options.suppressError) {
|
16154
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16155
|
+
return null;
|
16156
|
+
}
|
16157
|
+
throw error;
|
16158
|
+
}
|
16159
|
+
const { document } = fetchResult;
|
15484
16160
|
try {
|
15485
16161
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
15486
16162
|
}
|
@@ -15524,6 +16200,8 @@ export class Organization extends Object {
|
|
15524
16200
|
const v = this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0];
|
15525
16201
|
if (v instanceof URL) {
|
15526
16202
|
const fetched = await this.#fetchInbox(v, options);
|
16203
|
+
if (fetched == null)
|
16204
|
+
return null;
|
15527
16205
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0] = fetched;
|
15528
16206
|
return fetched;
|
15529
16207
|
}
|
@@ -15534,7 +16212,18 @@ export class Organization extends Object {
|
|
15534
16212
|
fetchDocumentLoader;
|
15535
16213
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15536
16214
|
fetchDocumentLoader;
|
15537
|
-
|
16215
|
+
let fetchResult;
|
16216
|
+
try {
|
16217
|
+
fetchResult = await documentLoader(url.href);
|
16218
|
+
}
|
16219
|
+
catch (error) {
|
16220
|
+
if (options.suppressError) {
|
16221
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16222
|
+
return null;
|
16223
|
+
}
|
16224
|
+
throw error;
|
16225
|
+
}
|
16226
|
+
const { document } = fetchResult;
|
15538
16227
|
try {
|
15539
16228
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
15540
16229
|
}
|
@@ -15575,6 +16264,8 @@ export class Organization extends Object {
|
|
15575
16264
|
const v = this.#_41QwhqJouoLg3h8dRPKat21brynC[0];
|
15576
16265
|
if (v instanceof URL) {
|
15577
16266
|
const fetched = await this.#fetchOutbox(v, options);
|
16267
|
+
if (fetched == null)
|
16268
|
+
return null;
|
15578
16269
|
this.#_41QwhqJouoLg3h8dRPKat21brynC[0] = fetched;
|
15579
16270
|
return fetched;
|
15580
16271
|
}
|
@@ -15585,7 +16276,18 @@ export class Organization extends Object {
|
|
15585
16276
|
fetchDocumentLoader;
|
15586
16277
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15587
16278
|
fetchDocumentLoader;
|
15588
|
-
|
16279
|
+
let fetchResult;
|
16280
|
+
try {
|
16281
|
+
fetchResult = await documentLoader(url.href);
|
16282
|
+
}
|
16283
|
+
catch (error) {
|
16284
|
+
if (options.suppressError) {
|
16285
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16286
|
+
return null;
|
16287
|
+
}
|
16288
|
+
throw error;
|
16289
|
+
}
|
16290
|
+
const { document } = fetchResult;
|
15589
16291
|
try {
|
15590
16292
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
15591
16293
|
}
|
@@ -15621,6 +16323,8 @@ export class Organization extends Object {
|
|
15621
16323
|
const v = this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0];
|
15622
16324
|
if (v instanceof URL) {
|
15623
16325
|
const fetched = await this.#fetchFollowing(v, options);
|
16326
|
+
if (fetched == null)
|
16327
|
+
return null;
|
15624
16328
|
this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0] = fetched;
|
15625
16329
|
return fetched;
|
15626
16330
|
}
|
@@ -15631,7 +16335,18 @@ export class Organization extends Object {
|
|
15631
16335
|
fetchDocumentLoader;
|
15632
16336
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15633
16337
|
fetchDocumentLoader;
|
15634
|
-
|
16338
|
+
let fetchResult;
|
16339
|
+
try {
|
16340
|
+
fetchResult = await documentLoader(url.href);
|
16341
|
+
}
|
16342
|
+
catch (error) {
|
16343
|
+
if (options.suppressError) {
|
16344
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16345
|
+
return null;
|
16346
|
+
}
|
16347
|
+
throw error;
|
16348
|
+
}
|
16349
|
+
const { document } = fetchResult;
|
15635
16350
|
try {
|
15636
16351
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
15637
16352
|
}
|
@@ -15670,6 +16385,8 @@ export class Organization extends Object {
|
|
15670
16385
|
const v = this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0];
|
15671
16386
|
if (v instanceof URL) {
|
15672
16387
|
const fetched = await this.#fetchFollowers(v, options);
|
16388
|
+
if (fetched == null)
|
16389
|
+
return null;
|
15673
16390
|
this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0] = fetched;
|
15674
16391
|
return fetched;
|
15675
16392
|
}
|
@@ -15680,7 +16397,18 @@ export class Organization extends Object {
|
|
15680
16397
|
fetchDocumentLoader;
|
15681
16398
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15682
16399
|
fetchDocumentLoader;
|
15683
|
-
|
16400
|
+
let fetchResult;
|
16401
|
+
try {
|
16402
|
+
fetchResult = await documentLoader(url.href);
|
16403
|
+
}
|
16404
|
+
catch (error) {
|
16405
|
+
if (options.suppressError) {
|
16406
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16407
|
+
return null;
|
16408
|
+
}
|
16409
|
+
throw error;
|
16410
|
+
}
|
16411
|
+
const { document } = fetchResult;
|
15684
16412
|
try {
|
15685
16413
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
15686
16414
|
}
|
@@ -15717,6 +16445,8 @@ export class Organization extends Object {
|
|
15717
16445
|
const v = this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0];
|
15718
16446
|
if (v instanceof URL) {
|
15719
16447
|
const fetched = await this.#fetchLinked(v, options);
|
16448
|
+
if (fetched == null)
|
16449
|
+
return null;
|
15720
16450
|
this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0] = fetched;
|
15721
16451
|
return fetched;
|
15722
16452
|
}
|
@@ -15727,7 +16457,18 @@ export class Organization extends Object {
|
|
15727
16457
|
fetchDocumentLoader;
|
15728
16458
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
15729
16459
|
fetchDocumentLoader;
|
15730
|
-
|
16460
|
+
let fetchResult;
|
16461
|
+
try {
|
16462
|
+
fetchResult = await documentLoader(url.href);
|
16463
|
+
}
|
16464
|
+
catch (error) {
|
16465
|
+
if (options.suppressError) {
|
16466
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
16467
|
+
return null;
|
16468
|
+
}
|
16469
|
+
throw error;
|
16470
|
+
}
|
16471
|
+
const { document } = fetchResult;
|
15731
16472
|
try {
|
15732
16473
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
15733
16474
|
}
|
@@ -15754,6 +16495,8 @@ export class Organization extends Object {
|
|
15754
16495
|
const v = vs[i];
|
15755
16496
|
if (v instanceof URL) {
|
15756
16497
|
const fetched = await this.#fetchStream(v, options);
|
16498
|
+
if (fetched == null)
|
16499
|
+
continue;
|
15757
16500
|
vs[i] = fetched;
|
15758
16501
|
yield fetched;
|
15759
16502
|
continue;
|
@@ -16974,7 +17717,18 @@ export class Person extends Object {
|
|
16974
17717
|
fetchDocumentLoader;
|
16975
17718
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
16976
17719
|
fetchDocumentLoader;
|
16977
|
-
|
17720
|
+
let fetchResult;
|
17721
|
+
try {
|
17722
|
+
fetchResult = await documentLoader(url.href);
|
17723
|
+
}
|
17724
|
+
catch (error) {
|
17725
|
+
if (options.suppressError) {
|
17726
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
17727
|
+
return null;
|
17728
|
+
}
|
17729
|
+
throw error;
|
17730
|
+
}
|
17731
|
+
const { document } = fetchResult;
|
16978
17732
|
try {
|
16979
17733
|
return await CryptographicKey.fromJsonLd(document, { documentLoader, contextLoader });
|
16980
17734
|
}
|
@@ -17006,6 +17760,8 @@ export class Person extends Object {
|
|
17006
17760
|
const v = this.#_axq166E2eZADq34V4MYUc8KMZdC[0];
|
17007
17761
|
if (v instanceof URL) {
|
17008
17762
|
const fetched = await this.#fetchPublicKey(v, options);
|
17763
|
+
if (fetched == null)
|
17764
|
+
return null;
|
17009
17765
|
this.#_axq166E2eZADq34V4MYUc8KMZdC[0] = fetched;
|
17010
17766
|
return fetched;
|
17011
17767
|
}
|
@@ -17027,6 +17783,8 @@ export class Person extends Object {
|
|
17027
17783
|
const v = vs[i];
|
17028
17784
|
if (v instanceof URL) {
|
17029
17785
|
const fetched = await this.#fetchPublicKey(v, options);
|
17786
|
+
if (fetched == null)
|
17787
|
+
continue;
|
17030
17788
|
vs[i] = fetched;
|
17031
17789
|
yield fetched;
|
17032
17790
|
continue;
|
@@ -17039,7 +17797,18 @@ export class Person extends Object {
|
|
17039
17797
|
fetchDocumentLoader;
|
17040
17798
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17041
17799
|
fetchDocumentLoader;
|
17042
|
-
|
17800
|
+
let fetchResult;
|
17801
|
+
try {
|
17802
|
+
fetchResult = await documentLoader(url.href);
|
17803
|
+
}
|
17804
|
+
catch (error) {
|
17805
|
+
if (options.suppressError) {
|
17806
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
17807
|
+
return null;
|
17808
|
+
}
|
17809
|
+
throw error;
|
17810
|
+
}
|
17811
|
+
const { document } = fetchResult;
|
17043
17812
|
try {
|
17044
17813
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
17045
17814
|
}
|
@@ -17074,6 +17843,8 @@ export class Person extends Object {
|
|
17074
17843
|
const v = this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0];
|
17075
17844
|
if (v instanceof URL) {
|
17076
17845
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
17846
|
+
if (fetched == null)
|
17847
|
+
return null;
|
17077
17848
|
this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0] = fetched;
|
17078
17849
|
return fetched;
|
17079
17850
|
}
|
@@ -17098,6 +17869,8 @@ export class Person extends Object {
|
|
17098
17869
|
const v = vs[i];
|
17099
17870
|
if (v instanceof URL) {
|
17100
17871
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
17872
|
+
if (fetched == null)
|
17873
|
+
continue;
|
17101
17874
|
vs[i] = fetched;
|
17102
17875
|
yield fetched;
|
17103
17876
|
continue;
|
@@ -17122,7 +17895,18 @@ export class Person extends Object {
|
|
17122
17895
|
fetchDocumentLoader;
|
17123
17896
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17124
17897
|
fetchDocumentLoader;
|
17125
|
-
|
17898
|
+
let fetchResult;
|
17899
|
+
try {
|
17900
|
+
fetchResult = await documentLoader(url.href);
|
17901
|
+
}
|
17902
|
+
catch (error) {
|
17903
|
+
if (options.suppressError) {
|
17904
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
17905
|
+
return null;
|
17906
|
+
}
|
17907
|
+
throw error;
|
17908
|
+
}
|
17909
|
+
const { document } = fetchResult;
|
17126
17910
|
try {
|
17127
17911
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
17128
17912
|
}
|
@@ -17166,6 +17950,8 @@ export class Person extends Object {
|
|
17166
17950
|
const v = this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0];
|
17167
17951
|
if (v instanceof URL) {
|
17168
17952
|
const fetched = await this.#fetchInbox(v, options);
|
17953
|
+
if (fetched == null)
|
17954
|
+
return null;
|
17169
17955
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0] = fetched;
|
17170
17956
|
return fetched;
|
17171
17957
|
}
|
@@ -17176,7 +17962,18 @@ export class Person extends Object {
|
|
17176
17962
|
fetchDocumentLoader;
|
17177
17963
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17178
17964
|
fetchDocumentLoader;
|
17179
|
-
|
17965
|
+
let fetchResult;
|
17966
|
+
try {
|
17967
|
+
fetchResult = await documentLoader(url.href);
|
17968
|
+
}
|
17969
|
+
catch (error) {
|
17970
|
+
if (options.suppressError) {
|
17971
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
17972
|
+
return null;
|
17973
|
+
}
|
17974
|
+
throw error;
|
17975
|
+
}
|
17976
|
+
const { document } = fetchResult;
|
17180
17977
|
try {
|
17181
17978
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
17182
17979
|
}
|
@@ -17217,6 +18014,8 @@ export class Person extends Object {
|
|
17217
18014
|
const v = this.#_41QwhqJouoLg3h8dRPKat21brynC[0];
|
17218
18015
|
if (v instanceof URL) {
|
17219
18016
|
const fetched = await this.#fetchOutbox(v, options);
|
18017
|
+
if (fetched == null)
|
18018
|
+
return null;
|
17220
18019
|
this.#_41QwhqJouoLg3h8dRPKat21brynC[0] = fetched;
|
17221
18020
|
return fetched;
|
17222
18021
|
}
|
@@ -17227,7 +18026,18 @@ export class Person extends Object {
|
|
17227
18026
|
fetchDocumentLoader;
|
17228
18027
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17229
18028
|
fetchDocumentLoader;
|
17230
|
-
|
18029
|
+
let fetchResult;
|
18030
|
+
try {
|
18031
|
+
fetchResult = await documentLoader(url.href);
|
18032
|
+
}
|
18033
|
+
catch (error) {
|
18034
|
+
if (options.suppressError) {
|
18035
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
18036
|
+
return null;
|
18037
|
+
}
|
18038
|
+
throw error;
|
18039
|
+
}
|
18040
|
+
const { document } = fetchResult;
|
17231
18041
|
try {
|
17232
18042
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
17233
18043
|
}
|
@@ -17263,6 +18073,8 @@ export class Person extends Object {
|
|
17263
18073
|
const v = this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0];
|
17264
18074
|
if (v instanceof URL) {
|
17265
18075
|
const fetched = await this.#fetchFollowing(v, options);
|
18076
|
+
if (fetched == null)
|
18077
|
+
return null;
|
17266
18078
|
this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0] = fetched;
|
17267
18079
|
return fetched;
|
17268
18080
|
}
|
@@ -17273,7 +18085,18 @@ export class Person extends Object {
|
|
17273
18085
|
fetchDocumentLoader;
|
17274
18086
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17275
18087
|
fetchDocumentLoader;
|
17276
|
-
|
18088
|
+
let fetchResult;
|
18089
|
+
try {
|
18090
|
+
fetchResult = await documentLoader(url.href);
|
18091
|
+
}
|
18092
|
+
catch (error) {
|
18093
|
+
if (options.suppressError) {
|
18094
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
18095
|
+
return null;
|
18096
|
+
}
|
18097
|
+
throw error;
|
18098
|
+
}
|
18099
|
+
const { document } = fetchResult;
|
17277
18100
|
try {
|
17278
18101
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
17279
18102
|
}
|
@@ -17312,6 +18135,8 @@ export class Person extends Object {
|
|
17312
18135
|
const v = this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0];
|
17313
18136
|
if (v instanceof URL) {
|
17314
18137
|
const fetched = await this.#fetchFollowers(v, options);
|
18138
|
+
if (fetched == null)
|
18139
|
+
return null;
|
17315
18140
|
this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0] = fetched;
|
17316
18141
|
return fetched;
|
17317
18142
|
}
|
@@ -17322,7 +18147,18 @@ export class Person extends Object {
|
|
17322
18147
|
fetchDocumentLoader;
|
17323
18148
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17324
18149
|
fetchDocumentLoader;
|
17325
|
-
|
18150
|
+
let fetchResult;
|
18151
|
+
try {
|
18152
|
+
fetchResult = await documentLoader(url.href);
|
18153
|
+
}
|
18154
|
+
catch (error) {
|
18155
|
+
if (options.suppressError) {
|
18156
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
18157
|
+
return null;
|
18158
|
+
}
|
18159
|
+
throw error;
|
18160
|
+
}
|
18161
|
+
const { document } = fetchResult;
|
17326
18162
|
try {
|
17327
18163
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
17328
18164
|
}
|
@@ -17359,6 +18195,8 @@ export class Person extends Object {
|
|
17359
18195
|
const v = this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0];
|
17360
18196
|
if (v instanceof URL) {
|
17361
18197
|
const fetched = await this.#fetchLinked(v, options);
|
18198
|
+
if (fetched == null)
|
18199
|
+
return null;
|
17362
18200
|
this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0] = fetched;
|
17363
18201
|
return fetched;
|
17364
18202
|
}
|
@@ -17369,7 +18207,18 @@ export class Person extends Object {
|
|
17369
18207
|
fetchDocumentLoader;
|
17370
18208
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
17371
18209
|
fetchDocumentLoader;
|
17372
|
-
|
18210
|
+
let fetchResult;
|
18211
|
+
try {
|
18212
|
+
fetchResult = await documentLoader(url.href);
|
18213
|
+
}
|
18214
|
+
catch (error) {
|
18215
|
+
if (options.suppressError) {
|
18216
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
18217
|
+
return null;
|
18218
|
+
}
|
18219
|
+
throw error;
|
18220
|
+
}
|
18221
|
+
const { document } = fetchResult;
|
17373
18222
|
try {
|
17374
18223
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
17375
18224
|
}
|
@@ -17396,6 +18245,8 @@ export class Person extends Object {
|
|
17396
18245
|
const v = vs[i];
|
17397
18246
|
if (v instanceof URL) {
|
17398
18247
|
const fetched = await this.#fetchStream(v, options);
|
18248
|
+
if (fetched == null)
|
18249
|
+
continue;
|
17399
18250
|
vs[i] = fetched;
|
17400
18251
|
yield fetched;
|
17401
18252
|
continue;
|
@@ -18559,7 +19410,18 @@ export class Profile extends Object {
|
|
18559
19410
|
fetchDocumentLoader;
|
18560
19411
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
18561
19412
|
fetchDocumentLoader;
|
18562
|
-
|
19413
|
+
let fetchResult;
|
19414
|
+
try {
|
19415
|
+
fetchResult = await documentLoader(url.href);
|
19416
|
+
}
|
19417
|
+
catch (error) {
|
19418
|
+
if (options.suppressError) {
|
19419
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
19420
|
+
return null;
|
19421
|
+
}
|
19422
|
+
throw error;
|
19423
|
+
}
|
19424
|
+
const { document } = fetchResult;
|
18563
19425
|
try {
|
18564
19426
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
18565
19427
|
}
|
@@ -18592,6 +19454,8 @@ export class Profile extends Object {
|
|
18592
19454
|
const v = this.#_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1[0];
|
18593
19455
|
if (v instanceof URL) {
|
18594
19456
|
const fetched = await this.#fetchDescribes(v, options);
|
19457
|
+
if (fetched == null)
|
19458
|
+
return null;
|
18595
19459
|
this.#_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1[0] = fetched;
|
18596
19460
|
return fetched;
|
18597
19461
|
}
|
@@ -18799,7 +19663,18 @@ export class Question extends IntransitiveActivity {
|
|
18799
19663
|
fetchDocumentLoader;
|
18800
19664
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
18801
19665
|
fetchDocumentLoader;
|
18802
|
-
|
19666
|
+
let fetchResult;
|
19667
|
+
try {
|
19668
|
+
fetchResult = await documentLoader(url.href);
|
19669
|
+
}
|
19670
|
+
catch (error) {
|
19671
|
+
if (options.suppressError) {
|
19672
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
19673
|
+
return null;
|
19674
|
+
}
|
19675
|
+
throw error;
|
19676
|
+
}
|
19677
|
+
const { document } = fetchResult;
|
18803
19678
|
try {
|
18804
19679
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
18805
19680
|
}
|
@@ -18828,6 +19703,8 @@ export class Question extends IntransitiveActivity {
|
|
18828
19703
|
const v = vs[i];
|
18829
19704
|
if (v instanceof URL) {
|
18830
19705
|
const fetched = await this.#fetchExclusiveOption(v, options);
|
19706
|
+
if (fetched == null)
|
19707
|
+
continue;
|
18831
19708
|
vs[i] = fetched;
|
18832
19709
|
yield fetched;
|
18833
19710
|
continue;
|
@@ -18840,7 +19717,18 @@ export class Question extends IntransitiveActivity {
|
|
18840
19717
|
fetchDocumentLoader;
|
18841
19718
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
18842
19719
|
fetchDocumentLoader;
|
18843
|
-
|
19720
|
+
let fetchResult;
|
19721
|
+
try {
|
19722
|
+
fetchResult = await documentLoader(url.href);
|
19723
|
+
}
|
19724
|
+
catch (error) {
|
19725
|
+
if (options.suppressError) {
|
19726
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
19727
|
+
return null;
|
19728
|
+
}
|
19729
|
+
throw error;
|
19730
|
+
}
|
19731
|
+
const { document } = fetchResult;
|
18844
19732
|
try {
|
18845
19733
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
18846
19734
|
}
|
@@ -18869,6 +19757,8 @@ export class Question extends IntransitiveActivity {
|
|
18869
19757
|
const v = vs[i];
|
18870
19758
|
if (v instanceof URL) {
|
18871
19759
|
const fetched = await this.#fetchInclusiveOption(v, options);
|
19760
|
+
if (fetched == null)
|
19761
|
+
continue;
|
18872
19762
|
vs[i] = fetched;
|
18873
19763
|
yield fetched;
|
18874
19764
|
continue;
|
@@ -19316,7 +20206,18 @@ export class Relationship extends Object {
|
|
19316
20206
|
fetchDocumentLoader;
|
19317
20207
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
19318
20208
|
fetchDocumentLoader;
|
19319
|
-
|
20209
|
+
let fetchResult;
|
20210
|
+
try {
|
20211
|
+
fetchResult = await documentLoader(url.href);
|
20212
|
+
}
|
20213
|
+
catch (error) {
|
20214
|
+
if (options.suppressError) {
|
20215
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
20216
|
+
return null;
|
20217
|
+
}
|
20218
|
+
throw error;
|
20219
|
+
}
|
20220
|
+
const { document } = fetchResult;
|
19320
20221
|
try {
|
19321
20222
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
19322
20223
|
}
|
@@ -19351,6 +20252,8 @@ export class Relationship extends Object {
|
|
19351
20252
|
const v = this.#_2Zqdmi46ZnDQsECS6mzwhrv3rUKq[0];
|
19352
20253
|
if (v instanceof URL) {
|
19353
20254
|
const fetched = await this.#fetchSubject(v, options);
|
20255
|
+
if (fetched == null)
|
20256
|
+
return null;
|
19354
20257
|
this.#_2Zqdmi46ZnDQsECS6mzwhrv3rUKq[0] = fetched;
|
19355
20258
|
return fetched;
|
19356
20259
|
}
|
@@ -19361,7 +20264,18 @@ export class Relationship extends Object {
|
|
19361
20264
|
fetchDocumentLoader;
|
19362
20265
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
19363
20266
|
fetchDocumentLoader;
|
19364
|
-
|
20267
|
+
let fetchResult;
|
20268
|
+
try {
|
20269
|
+
fetchResult = await documentLoader(url.href);
|
20270
|
+
}
|
20271
|
+
catch (error) {
|
20272
|
+
if (options.suppressError) {
|
20273
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
20274
|
+
return null;
|
20275
|
+
}
|
20276
|
+
throw error;
|
20277
|
+
}
|
20278
|
+
const { document } = fetchResult;
|
19365
20279
|
try {
|
19366
20280
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
19367
20281
|
}
|
@@ -19393,6 +20307,8 @@ export class Relationship extends Object {
|
|
19393
20307
|
const v = this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc[0];
|
19394
20308
|
if (v instanceof URL) {
|
19395
20309
|
const fetched = await this.#fetchObject(v, options);
|
20310
|
+
if (fetched == null)
|
20311
|
+
return null;
|
19396
20312
|
this.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc[0] = fetched;
|
19397
20313
|
return fetched;
|
19398
20314
|
}
|
@@ -19414,6 +20330,8 @@ export class Relationship extends Object {
|
|
19414
20330
|
const v = vs[i];
|
19415
20331
|
if (v instanceof URL) {
|
19416
20332
|
const fetched = await this.#fetchObject(v, options);
|
20333
|
+
if (fetched == null)
|
20334
|
+
continue;
|
19417
20335
|
vs[i] = fetched;
|
19418
20336
|
yield fetched;
|
19419
20337
|
continue;
|
@@ -19426,7 +20344,18 @@ export class Relationship extends Object {
|
|
19426
20344
|
fetchDocumentLoader;
|
19427
20345
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
19428
20346
|
fetchDocumentLoader;
|
19429
|
-
|
20347
|
+
let fetchResult;
|
20348
|
+
try {
|
20349
|
+
fetchResult = await documentLoader(url.href);
|
20350
|
+
}
|
20351
|
+
catch (error) {
|
20352
|
+
if (options.suppressError) {
|
20353
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
20354
|
+
return null;
|
20355
|
+
}
|
20356
|
+
throw error;
|
20357
|
+
}
|
20358
|
+
const { document } = fetchResult;
|
19430
20359
|
try {
|
19431
20360
|
return await Object.fromJsonLd(document, { documentLoader, contextLoader });
|
19432
20361
|
}
|
@@ -19460,6 +20389,8 @@ export class Relationship extends Object {
|
|
19460
20389
|
const v = this.#_4Lzz89F9qipAQSGkWyX9DGWiUojG[0];
|
19461
20390
|
if (v instanceof URL) {
|
19462
20391
|
const fetched = await this.#fetchRelationship(v, options);
|
20392
|
+
if (fetched == null)
|
20393
|
+
return null;
|
19463
20394
|
this.#_4Lzz89F9qipAQSGkWyX9DGWiUojG[0] = fetched;
|
19464
20395
|
return fetched;
|
19465
20396
|
}
|
@@ -19483,6 +20414,8 @@ export class Relationship extends Object {
|
|
19483
20414
|
const v = vs[i];
|
19484
20415
|
if (v instanceof URL) {
|
19485
20416
|
const fetched = await this.#fetchRelationship(v, options);
|
20417
|
+
if (fetched == null)
|
20418
|
+
continue;
|
19486
20419
|
vs[i] = fetched;
|
19487
20420
|
yield fetched;
|
19488
20421
|
continue;
|
@@ -20284,7 +21217,18 @@ export class Service extends Object {
|
|
20284
21217
|
fetchDocumentLoader;
|
20285
21218
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20286
21219
|
fetchDocumentLoader;
|
20287
|
-
|
21220
|
+
let fetchResult;
|
21221
|
+
try {
|
21222
|
+
fetchResult = await documentLoader(url.href);
|
21223
|
+
}
|
21224
|
+
catch (error) {
|
21225
|
+
if (options.suppressError) {
|
21226
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21227
|
+
return null;
|
21228
|
+
}
|
21229
|
+
throw error;
|
21230
|
+
}
|
21231
|
+
const { document } = fetchResult;
|
20288
21232
|
try {
|
20289
21233
|
return await CryptographicKey.fromJsonLd(document, { documentLoader, contextLoader });
|
20290
21234
|
}
|
@@ -20316,6 +21260,8 @@ export class Service extends Object {
|
|
20316
21260
|
const v = this.#_axq166E2eZADq34V4MYUc8KMZdC[0];
|
20317
21261
|
if (v instanceof URL) {
|
20318
21262
|
const fetched = await this.#fetchPublicKey(v, options);
|
21263
|
+
if (fetched == null)
|
21264
|
+
return null;
|
20319
21265
|
this.#_axq166E2eZADq34V4MYUc8KMZdC[0] = fetched;
|
20320
21266
|
return fetched;
|
20321
21267
|
}
|
@@ -20337,6 +21283,8 @@ export class Service extends Object {
|
|
20337
21283
|
const v = vs[i];
|
20338
21284
|
if (v instanceof URL) {
|
20339
21285
|
const fetched = await this.#fetchPublicKey(v, options);
|
21286
|
+
if (fetched == null)
|
21287
|
+
continue;
|
20340
21288
|
vs[i] = fetched;
|
20341
21289
|
yield fetched;
|
20342
21290
|
continue;
|
@@ -20349,7 +21297,18 @@ export class Service extends Object {
|
|
20349
21297
|
fetchDocumentLoader;
|
20350
21298
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20351
21299
|
fetchDocumentLoader;
|
20352
|
-
|
21300
|
+
let fetchResult;
|
21301
|
+
try {
|
21302
|
+
fetchResult = await documentLoader(url.href);
|
21303
|
+
}
|
21304
|
+
catch (error) {
|
21305
|
+
if (options.suppressError) {
|
21306
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21307
|
+
return null;
|
21308
|
+
}
|
21309
|
+
throw error;
|
21310
|
+
}
|
21311
|
+
const { document } = fetchResult;
|
20353
21312
|
try {
|
20354
21313
|
return await Multikey.fromJsonLd(document, { documentLoader, contextLoader });
|
20355
21314
|
}
|
@@ -20384,6 +21343,8 @@ export class Service extends Object {
|
|
20384
21343
|
const v = this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0];
|
20385
21344
|
if (v instanceof URL) {
|
20386
21345
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
21346
|
+
if (fetched == null)
|
21347
|
+
return null;
|
20387
21348
|
this.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3[0] = fetched;
|
20388
21349
|
return fetched;
|
20389
21350
|
}
|
@@ -20408,6 +21369,8 @@ export class Service extends Object {
|
|
20408
21369
|
const v = vs[i];
|
20409
21370
|
if (v instanceof URL) {
|
20410
21371
|
const fetched = await this.#fetchAssertionMethod(v, options);
|
21372
|
+
if (fetched == null)
|
21373
|
+
continue;
|
20411
21374
|
vs[i] = fetched;
|
20412
21375
|
yield fetched;
|
20413
21376
|
continue;
|
@@ -20432,7 +21395,18 @@ export class Service extends Object {
|
|
20432
21395
|
fetchDocumentLoader;
|
20433
21396
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20434
21397
|
fetchDocumentLoader;
|
20435
|
-
|
21398
|
+
let fetchResult;
|
21399
|
+
try {
|
21400
|
+
fetchResult = await documentLoader(url.href);
|
21401
|
+
}
|
21402
|
+
catch (error) {
|
21403
|
+
if (options.suppressError) {
|
21404
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21405
|
+
return null;
|
21406
|
+
}
|
21407
|
+
throw error;
|
21408
|
+
}
|
21409
|
+
const { document } = fetchResult;
|
20436
21410
|
try {
|
20437
21411
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
20438
21412
|
}
|
@@ -20476,6 +21450,8 @@ export class Service extends Object {
|
|
20476
21450
|
const v = this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0];
|
20477
21451
|
if (v instanceof URL) {
|
20478
21452
|
const fetched = await this.#fetchInbox(v, options);
|
21453
|
+
if (fetched == null)
|
21454
|
+
return null;
|
20479
21455
|
this.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB[0] = fetched;
|
20480
21456
|
return fetched;
|
20481
21457
|
}
|
@@ -20486,7 +21462,18 @@ export class Service extends Object {
|
|
20486
21462
|
fetchDocumentLoader;
|
20487
21463
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20488
21464
|
fetchDocumentLoader;
|
20489
|
-
|
21465
|
+
let fetchResult;
|
21466
|
+
try {
|
21467
|
+
fetchResult = await documentLoader(url.href);
|
21468
|
+
}
|
21469
|
+
catch (error) {
|
21470
|
+
if (options.suppressError) {
|
21471
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21472
|
+
return null;
|
21473
|
+
}
|
21474
|
+
throw error;
|
21475
|
+
}
|
21476
|
+
const { document } = fetchResult;
|
20490
21477
|
try {
|
20491
21478
|
return await OrderedCollection.fromJsonLd(document, { documentLoader, contextLoader });
|
20492
21479
|
}
|
@@ -20527,6 +21514,8 @@ export class Service extends Object {
|
|
20527
21514
|
const v = this.#_41QwhqJouoLg3h8dRPKat21brynC[0];
|
20528
21515
|
if (v instanceof URL) {
|
20529
21516
|
const fetched = await this.#fetchOutbox(v, options);
|
21517
|
+
if (fetched == null)
|
21518
|
+
return null;
|
20530
21519
|
this.#_41QwhqJouoLg3h8dRPKat21brynC[0] = fetched;
|
20531
21520
|
return fetched;
|
20532
21521
|
}
|
@@ -20537,7 +21526,18 @@ export class Service extends Object {
|
|
20537
21526
|
fetchDocumentLoader;
|
20538
21527
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20539
21528
|
fetchDocumentLoader;
|
20540
|
-
|
21529
|
+
let fetchResult;
|
21530
|
+
try {
|
21531
|
+
fetchResult = await documentLoader(url.href);
|
21532
|
+
}
|
21533
|
+
catch (error) {
|
21534
|
+
if (options.suppressError) {
|
21535
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21536
|
+
return null;
|
21537
|
+
}
|
21538
|
+
throw error;
|
21539
|
+
}
|
21540
|
+
const { document } = fetchResult;
|
20541
21541
|
try {
|
20542
21542
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
20543
21543
|
}
|
@@ -20573,6 +21573,8 @@ export class Service extends Object {
|
|
20573
21573
|
const v = this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0];
|
20574
21574
|
if (v instanceof URL) {
|
20575
21575
|
const fetched = await this.#fetchFollowing(v, options);
|
21576
|
+
if (fetched == null)
|
21577
|
+
return null;
|
20576
21578
|
this.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee[0] = fetched;
|
20577
21579
|
return fetched;
|
20578
21580
|
}
|
@@ -20583,7 +21585,18 @@ export class Service extends Object {
|
|
20583
21585
|
fetchDocumentLoader;
|
20584
21586
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20585
21587
|
fetchDocumentLoader;
|
20586
|
-
|
21588
|
+
let fetchResult;
|
21589
|
+
try {
|
21590
|
+
fetchResult = await documentLoader(url.href);
|
21591
|
+
}
|
21592
|
+
catch (error) {
|
21593
|
+
if (options.suppressError) {
|
21594
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21595
|
+
return null;
|
21596
|
+
}
|
21597
|
+
throw error;
|
21598
|
+
}
|
21599
|
+
const { document } = fetchResult;
|
20587
21600
|
try {
|
20588
21601
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
20589
21602
|
}
|
@@ -20622,6 +21635,8 @@ export class Service extends Object {
|
|
20622
21635
|
const v = this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0];
|
20623
21636
|
if (v instanceof URL) {
|
20624
21637
|
const fetched = await this.#fetchFollowers(v, options);
|
21638
|
+
if (fetched == null)
|
21639
|
+
return null;
|
20625
21640
|
this.#_BBCTgfphhsFzpVfKTykGSpBNwoA[0] = fetched;
|
20626
21641
|
return fetched;
|
20627
21642
|
}
|
@@ -20632,7 +21647,18 @@ export class Service extends Object {
|
|
20632
21647
|
fetchDocumentLoader;
|
20633
21648
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20634
21649
|
fetchDocumentLoader;
|
20635
|
-
|
21650
|
+
let fetchResult;
|
21651
|
+
try {
|
21652
|
+
fetchResult = await documentLoader(url.href);
|
21653
|
+
}
|
21654
|
+
catch (error) {
|
21655
|
+
if (options.suppressError) {
|
21656
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21657
|
+
return null;
|
21658
|
+
}
|
21659
|
+
throw error;
|
21660
|
+
}
|
21661
|
+
const { document } = fetchResult;
|
20636
21662
|
try {
|
20637
21663
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
20638
21664
|
}
|
@@ -20669,6 +21695,8 @@ export class Service extends Object {
|
|
20669
21695
|
const v = this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0];
|
20670
21696
|
if (v instanceof URL) {
|
20671
21697
|
const fetched = await this.#fetchLinked(v, options);
|
21698
|
+
if (fetched == null)
|
21699
|
+
return null;
|
20672
21700
|
this.#_3bgkPwJanyTCoVFM9ovRcus8tKkU[0] = fetched;
|
20673
21701
|
return fetched;
|
20674
21702
|
}
|
@@ -20679,7 +21707,18 @@ export class Service extends Object {
|
|
20679
21707
|
fetchDocumentLoader;
|
20680
21708
|
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
20681
21709
|
fetchDocumentLoader;
|
20682
|
-
|
21710
|
+
let fetchResult;
|
21711
|
+
try {
|
21712
|
+
fetchResult = await documentLoader(url.href);
|
21713
|
+
}
|
21714
|
+
catch (error) {
|
21715
|
+
if (options.suppressError) {
|
21716
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
21717
|
+
return null;
|
21718
|
+
}
|
21719
|
+
throw error;
|
21720
|
+
}
|
21721
|
+
const { document } = fetchResult;
|
20683
21722
|
try {
|
20684
21723
|
return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
|
20685
21724
|
}
|
@@ -20706,6 +21745,8 @@ export class Service extends Object {
|
|
20706
21745
|
const v = vs[i];
|
20707
21746
|
if (v instanceof URL) {
|
20708
21747
|
const fetched = await this.#fetchStream(v, options);
|
21748
|
+
if (fetched == null)
|
21749
|
+
continue;
|
20709
21750
|
vs[i] = fetched;
|
20710
21751
|
yield fetched;
|
20711
21752
|
continue;
|