@fedify/fedify 2.3.7 → 2.3.9-dev.2048
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{assert_instance_of-DBC5X09g.mjs → assert-jSdZMYam.mjs} +19 -1
- package/dist/{builder-Bg7nkigw.mjs → builder-BfY2wZ4V.mjs} +3 -3
- package/dist/{client-D1KuWxjH.mjs → client-DYDoDpMa.mjs} +78 -4
- package/dist/compat/mod.d.cts +1 -1
- package/dist/compat/mod.d.ts +1 -1
- package/dist/compat/outgoing-jsonld.test.mjs +1 -1
- package/dist/compat/public-audience.test.mjs +1 -1
- package/dist/compat/transformers.test.mjs +3 -4
- package/dist/{context-DVoTs_wM.mjs → context-BepjCFHN.mjs} +1 -0
- package/dist/{context-BxVVO5Ro.d.ts → context-CAKnQy1x.d.ts} +4 -3
- package/dist/{context-BpmLyiPx.d.cts → context-CSIggG9_.d.cts} +4 -3
- package/dist/{deno-CTdCdRmf.mjs → deno-ayal9buz.mjs} +1 -1
- package/dist/{docloader-BVBWf8Bg.mjs → docloader-C-JrNL14.mjs} +2 -2
- package/dist/federation/builder.test.mjs +2 -2
- package/dist/federation/circuit-breaker.test.mjs +3 -3
- package/dist/federation/collection.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +128 -11
- package/dist/federation/idempotency.test.mjs +4 -4
- package/dist/federation/inbox.test.mjs +1 -1
- package/dist/federation/keycache.test.mjs +44 -10
- package/dist/federation/kv.test.mjs +1 -1
- package/dist/federation/metrics.test.mjs +1 -1
- package/dist/federation/middleware.test.mjs +109 -19
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.d.cts +2 -2
- package/dist/federation/mod.d.ts +2 -2
- package/dist/federation/mod.js +1 -1
- package/dist/federation/mq.test.mjs +1 -1
- package/dist/federation/negotiation.test.mjs +2 -2
- package/dist/federation/retry.test.mjs +1 -1
- package/dist/federation/router.test.mjs +1 -1
- package/dist/federation/send.test.mjs +141 -7
- package/dist/federation/temporal.test.mjs +2 -2
- package/dist/federation/webfinger.test.mjs +3 -3
- package/dist/{http-B3-zan5-.mjs → http-B2u6PvNX.mjs} +4 -4
- package/dist/{http-BjV0BTWd.cjs → http-BGP2QCbe.cjs} +166 -6
- package/dist/{http-DRVY9K4R.js → http-BPPCh0xN.js} +155 -7
- package/dist/{http-lf8Hsd91.d.ts → http-DQmNpfym.d.ts} +1 -1
- package/dist/{http-VyDTd4G3.d.cts → http-DiWQB8Mr.d.cts} +1 -1
- package/dist/{key-C_a6iE1-.mjs → key-C9DkrWwb.mjs} +155 -7
- package/dist/{keycache-BeU0LCII.mjs → keycache-B3qRQNLj.mjs} +12 -4
- package/dist/{kv-cache-OzUoHKnZ.cjs → kv-cache-C1TC_e9y.cjs} +2 -2
- package/dist/{kv-cache-b1dJZHUx.js → kv-cache-Cl1q1aA9.js} +2 -2
- package/dist/{kv-cache-BjjcmjtG.mjs → kv-cache-qJSjfLGm.mjs} +1 -1
- package/dist/{ld-COo05yJj.mjs → ld-DNl7KwLY.mjs} +3 -3
- package/dist/{metrics-V6vX0M13.mjs → metrics-Ce55disp.mjs} +1 -1
- package/dist/{middleware-DRk6xiYo.mjs → middleware-BCG2BX1n.mjs} +41 -30
- package/dist/{middleware-EDVv6ewB.cjs → middleware-BZojifnF.cjs} +101 -25
- package/dist/{middleware-DRGWEo0V.mjs → middleware-C96wm_7x.mjs} +1 -1
- package/dist/{middleware-K13LhN5w.js → middleware-C_utyVa_.js} +101 -25
- package/dist/{mod-yvIXFAEi.d.cts → mod-1TuoXkGs.d.cts} +1 -1
- package/dist/{mod-B0hW12_O.d.cts → mod-Bid79LFU.d.cts} +1 -1
- package/dist/{mod-Rpy4Uwkk.d.ts → mod-CFuyfw3c.d.ts} +1 -1
- package/dist/{mod-DFvNJcNb.d.ts → mod-DHgc4ygG.d.ts} +1 -1
- package/dist/{mod-CjERT09F.d.cts → mod-PVR75MeU.d.cts} +1 -1
- package/dist/{mod-COIAjwRS.d.ts → mod-TLEvgT1i.d.ts} +1 -1
- package/dist/mod.cjs +5 -5
- package/dist/mod.d.cts +6 -6
- package/dist/mod.d.ts +6 -6
- package/dist/mod.js +5 -5
- package/dist/nodeinfo/client.test.mjs +28 -1
- package/dist/nodeinfo/handler.test.mjs +3 -3
- package/dist/nodeinfo/mod.cjs +1 -1
- package/dist/nodeinfo/mod.js +1 -1
- package/dist/nodeinfo/types.test.mjs +1 -1
- package/dist/otel/exporter.test.mjs +1 -1
- package/dist/{outgoing-jsonld-OFoubetZ.mjs → outgoing-jsonld-HOAywiid.mjs} +1 -1
- package/dist/{owner-CnngXDNJ.d.ts → owner-B3hNQCG8.d.cts} +12 -1
- package/dist/{owner-DEvZuyOE.d.cts → owner-CiBPcC6F.d.ts} +12 -1
- package/dist/owner-DqqDBw-l.mjs +175 -0
- package/dist/{proof-kFq0IDK4.mjs → proof-D5vP7VIN.mjs} +5 -5
- package/dist/{proof-D6gZeewf.js → proof-Dz9ObvUq.js} +112 -58
- package/dist/{proof-Xk8lHNc0.cjs → proof-I6YcKRRq.cjs} +112 -58
- package/dist/{send-3lH63Nqf.mjs → send-CBtR8DQK.mjs} +68 -11
- package/dist/sig/accept.test.mjs +1 -1
- package/dist/sig/http.test.mjs +4 -4
- package/dist/sig/key.test.mjs +170 -3
- package/dist/sig/ld.test.mjs +56 -4
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.d.cts +3 -3
- package/dist/sig/mod.d.ts +3 -3
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +105 -6
- package/dist/sig/proof.test.mjs +73 -5
- package/dist/{temporal-Chwx9cEn.mjs → temporal-B9t2tY9A.mjs} +1 -1
- package/dist/testing/mod.mjs +1 -1
- package/dist/{types-m8u9L86X.cjs → types-DWs-qZaY.cjs} +94 -2
- package/dist/{types-DTONwNqL.js → types-sXITXcWa.js} +78 -4
- package/dist/utils/docloader.test.mjs +28 -4
- package/dist/utils/kv-cache.test.mjs +1 -1
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.d.cts +1 -1
- package/dist/utils/mod.d.ts +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +6 -6
- package/dist/assert-OguE97r2.mjs +0 -23
- package/dist/owner-B3720pz3.mjs +0 -120
- /package/dist/{accept-CPkZzmGN.mjs → accept-Dd__NiUL.mjs} +0 -0
- /package/dist/{activity-listener-tztVvlNb.mjs → activity-listener-ell7W1s9.mjs} +0 -0
- /package/dist/{circuit-breaker-D1fxthDI.mjs → circuit-breaker-CDABzqVf.mjs} +0 -0
- /package/dist/{circuit-breaker-test-utils-CAdwjgMi.mjs → circuit-breaker-test-utils-Dm5MM6l9.mjs} +0 -0
- /package/dist/{collection-Cc3DVAhE.mjs → collection-CA3V5zyK.mjs} +0 -0
- /package/dist/{keys-DGu1NFwu.mjs → keys-BAK-tUlf.mjs} +0 -0
- /package/dist/{kv-rV3vodCc.mjs → kv-CX8qfaad.mjs} +0 -0
- /package/dist/{negotiation-DDstyBvc.mjs → negotiation-CDW-_gUU.mjs} +0 -0
- /package/dist/{public-audience-DZJAUUi8.mjs → public-audience-jwoSIGUw.mjs} +0 -0
- /package/dist/{retry-CXg_MBI-.mjs → retry-_VvV0h9f.mjs} +0 -0
- /package/dist/{types-J53Kw7so.mjs → types-s4mCTGkT.mjs} +0 -0
|
@@ -2,17 +2,17 @@ const { Temporal } = require("@js-temporal/polyfill");
|
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
4
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
5
|
-
const require_http = require("./http-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
5
|
+
const require_http = require("./http-BGP2QCbe.cjs");
|
|
6
|
+
const require_types = require("./types-DWs-qZaY.cjs");
|
|
7
|
+
const require_proof = require("./proof-I6YcKRRq.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-C1TC_e9y.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_uri_template = require("@fedify/uri-template");
|
|
11
11
|
let _fedify_vocab = require("@fedify/vocab");
|
|
12
12
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
13
13
|
let byte_encodings_hex = require("byte-encodings/hex");
|
|
14
|
-
let es_toolkit = require("es-toolkit");
|
|
15
14
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
15
|
+
let es_toolkit = require("es-toolkit");
|
|
16
16
|
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
17
17
|
let _fedify_vocab_runtime_jsonld = require("@fedify/vocab-runtime/jsonld");
|
|
18
18
|
_fedify_vocab_runtime_jsonld = require_chunk.__toESM(_fedify_vocab_runtime_jsonld, 1);
|
|
@@ -1414,6 +1414,7 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
|
|
|
1414
1414
|
}
|
|
1415
1415
|
//#endregion
|
|
1416
1416
|
//#region src/federation/keycache.ts
|
|
1417
|
+
const KEY_CACHE_GENERATION = "2";
|
|
1417
1418
|
var KvKeyCache = class {
|
|
1418
1419
|
kv;
|
|
1419
1420
|
prefix;
|
|
@@ -1434,13 +1435,20 @@ var KvKeyCache = class {
|
|
|
1434
1435
|
keyId.href
|
|
1435
1436
|
];
|
|
1436
1437
|
}
|
|
1438
|
+
#entryKey(keyId) {
|
|
1439
|
+
return [
|
|
1440
|
+
...this.prefix,
|
|
1441
|
+
KEY_CACHE_GENERATION,
|
|
1442
|
+
keyId.href
|
|
1443
|
+
];
|
|
1444
|
+
}
|
|
1437
1445
|
async get(keyId) {
|
|
1438
1446
|
const negativeExpiration = this.nullKeys.get(keyId.href);
|
|
1439
1447
|
if (negativeExpiration != null) {
|
|
1440
1448
|
if (Temporal.Now.instant().until(negativeExpiration).sign >= 0) return null;
|
|
1441
1449
|
this.nullKeys.delete(keyId.href);
|
|
1442
1450
|
}
|
|
1443
|
-
const serialized = await this.kv.get(
|
|
1451
|
+
const serialized = await this.kv.get(this.#entryKey(keyId));
|
|
1444
1452
|
if (serialized === void 0) return void 0;
|
|
1445
1453
|
if (serialized === null) {
|
|
1446
1454
|
this.nullKeys.set(keyId.href, Temporal.Now.instant().add(this.unavailableKeyTtl));
|
|
@@ -1452,7 +1460,7 @@ var KvKeyCache = class {
|
|
|
1452
1460
|
try {
|
|
1453
1461
|
return await _fedify_vocab.Multikey.fromJsonLd(serialized, this.options);
|
|
1454
1462
|
} catch {
|
|
1455
|
-
await this.kv.delete(
|
|
1463
|
+
await this.kv.delete(this.#entryKey(keyId));
|
|
1456
1464
|
return;
|
|
1457
1465
|
}
|
|
1458
1466
|
}
|
|
@@ -1460,12 +1468,12 @@ var KvKeyCache = class {
|
|
|
1460
1468
|
async set(keyId, key) {
|
|
1461
1469
|
if (key == null) {
|
|
1462
1470
|
this.nullKeys.set(keyId.href, Temporal.Now.instant().add(this.unavailableKeyTtl));
|
|
1463
|
-
await this.kv.set(
|
|
1471
|
+
await this.kv.set(this.#entryKey(keyId), null, { ttl: this.unavailableKeyTtl });
|
|
1464
1472
|
return;
|
|
1465
1473
|
}
|
|
1466
1474
|
this.nullKeys.delete(keyId.href);
|
|
1467
1475
|
const serialized = await key.toJsonLd(this.options);
|
|
1468
|
-
await this.kv.set(
|
|
1476
|
+
await this.kv.set(this.#entryKey(keyId), serialized);
|
|
1469
1477
|
}
|
|
1470
1478
|
async getFetchError(keyId) {
|
|
1471
1479
|
const cached = await this.kv.get(this.#getFetchErrorKey(keyId));
|
|
@@ -1812,13 +1820,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
|
|
|
1812
1820
|
* @param parameters The parameters for handling the collection.
|
|
1813
1821
|
* @returns A promise that resolves to an HTTP response.
|
|
1814
1822
|
*/
|
|
1815
|
-
async function handleCollection(request, { name: name$
|
|
1816
|
-
const spanName = name$
|
|
1823
|
+
async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
|
|
1824
|
+
const spanName = name$2.trim().replace(/\s+/g, "_");
|
|
1817
1825
|
tracerProvider = tracerProvider ?? _opentelemetry_api.trace.getTracerProvider();
|
|
1818
1826
|
const tracer = tracerProvider.getTracer(require_http.name, require_http.version);
|
|
1819
1827
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
1820
1828
|
const metricBase = {
|
|
1821
|
-
kind: getCollectionMetricKind(name$
|
|
1829
|
+
kind: getCollectionMetricKind(name$2),
|
|
1822
1830
|
page: cursor != null,
|
|
1823
1831
|
dispatcher: "built_in"
|
|
1824
1832
|
};
|
|
@@ -1859,7 +1867,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1859
1867
|
span.setStatus({ code: _opentelemetry_api.SpanStatusCode.ERROR });
|
|
1860
1868
|
return await onNotFound(request);
|
|
1861
1869
|
}
|
|
1862
|
-
const items = filterCollectionItems(page.items, name$
|
|
1870
|
+
const items = filterCollectionItems(page.items, name$2, filterPredicate);
|
|
1863
1871
|
itemCount = items.length;
|
|
1864
1872
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
1865
1873
|
return items;
|
|
@@ -1899,7 +1907,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1899
1907
|
} else {
|
|
1900
1908
|
const uri = new URL(baseUri);
|
|
1901
1909
|
uri.searchParams.set("cursor", cursor);
|
|
1902
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
1910
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
|
|
1903
1911
|
kind: _opentelemetry_api.SpanKind.SERVER,
|
|
1904
1912
|
attributes: {
|
|
1905
1913
|
"activitypub.collection.id": uri.href,
|
|
@@ -1915,7 +1923,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1915
1923
|
span.setStatus({ code: _opentelemetry_api.SpanStatusCode.ERROR });
|
|
1916
1924
|
return await onNotFound(request);
|
|
1917
1925
|
}
|
|
1918
|
-
const items = filterCollectionItems(page.items, name$
|
|
1926
|
+
const items = filterCollectionItems(page.items, name$2, filterPredicate);
|
|
1919
1927
|
itemCount = items.length;
|
|
1920
1928
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
1921
1929
|
return {
|
|
@@ -2281,8 +2289,16 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
2281
2289
|
}
|
|
2282
2290
|
let json;
|
|
2283
2291
|
try {
|
|
2284
|
-
json = await request.clone().
|
|
2292
|
+
json = JSON.parse(await require_types.readBoundedText(request.clone(), require_types.MAX_BODY_SIZE, request.url));
|
|
2285
2293
|
} catch (error) {
|
|
2294
|
+
if (error instanceof require_types.BodyTooLargeError) {
|
|
2295
|
+
request.body?.cancel(error).catch(() => {});
|
|
2296
|
+
span.setStatus({
|
|
2297
|
+
code: _opentelemetry_api.SpanStatusCode.ERROR,
|
|
2298
|
+
message: String(error)
|
|
2299
|
+
});
|
|
2300
|
+
return new Response("Inbox body too large.", { status: 413 });
|
|
2301
|
+
}
|
|
2286
2302
|
logger.error("Failed to parse JSON:\n{error}", {
|
|
2287
2303
|
recipient,
|
|
2288
2304
|
error
|
|
@@ -2783,8 +2799,8 @@ var CustomCollectionHandler = class {
|
|
|
2783
2799
|
* @param CollectionPage The CollectionPage constructor.
|
|
2784
2800
|
* @param filterPredicate Optional filter predicate for items.
|
|
2785
2801
|
*/
|
|
2786
|
-
constructor(name$
|
|
2787
|
-
this.name = name$
|
|
2802
|
+
constructor(name$1, values, context, callbacks, tracerProvider = _opentelemetry_api.trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
|
|
2803
|
+
this.name = name$1;
|
|
2788
2804
|
this.values = values;
|
|
2789
2805
|
this.context = context;
|
|
2790
2806
|
this.callbacks = callbacks;
|
|
@@ -3409,7 +3425,7 @@ async function readLimitedResponseBody(response, maxBytes) {
|
|
|
3409
3425
|
if (truncated) result += "… (truncated)";
|
|
3410
3426
|
return result;
|
|
3411
3427
|
}
|
|
3412
|
-
async function sendActivityInternal({ activity, activityId, activityType, keys, inbox, headers, specDeterminer, meterProvider, tracerProvider }, span) {
|
|
3428
|
+
async function sendActivityInternal({ activity, activityId, activityType, keys, inbox, allowPrivateAddress, headers, specDeterminer, meterProvider, tracerProvider }, span) {
|
|
3413
3429
|
const logger = (0, _logtape_logtape.getLogger)([
|
|
3414
3430
|
"fedify",
|
|
3415
3431
|
"federation",
|
|
@@ -3418,12 +3434,25 @@ async function sendActivityInternal({ activity, activityId, activityType, keys,
|
|
|
3418
3434
|
const federationMetrics = require_http.getFederationMetrics(meterProvider);
|
|
3419
3435
|
const started = performance.now();
|
|
3420
3436
|
let deliverySuccess = false;
|
|
3437
|
+
async function validateUrl(url) {
|
|
3438
|
+
if (!allowPrivateAddress) try {
|
|
3439
|
+
await (0, _fedify_vocab_runtime.validatePublicUrl)(url);
|
|
3440
|
+
} catch (error) {
|
|
3441
|
+
if (error instanceof _fedify_vocab_runtime.UrlError) logger.error("Disallowed private URL: {url}", {
|
|
3442
|
+
url,
|
|
3443
|
+
error
|
|
3444
|
+
});
|
|
3445
|
+
throw error;
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3448
|
+
await validateUrl(inbox.href);
|
|
3421
3449
|
headers = new Headers(headers);
|
|
3422
3450
|
headers.set("Content-Type", "application/activity+json");
|
|
3423
3451
|
const request = new Request(inbox, {
|
|
3424
3452
|
method: "POST",
|
|
3425
3453
|
headers,
|
|
3426
|
-
body: JSON.stringify(activity)
|
|
3454
|
+
body: JSON.stringify(activity),
|
|
3455
|
+
redirect: "manual"
|
|
3427
3456
|
});
|
|
3428
3457
|
let rsaKey = null;
|
|
3429
3458
|
for (const key of keys) if (key.privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
@@ -3439,19 +3468,20 @@ async function sendActivityInternal({ activity, activityId, activityType, keys,
|
|
|
3439
3468
|
});
|
|
3440
3469
|
let response;
|
|
3441
3470
|
try {
|
|
3442
|
-
response = rsaKey == null ? await
|
|
3471
|
+
response = rsaKey == null ? await fetchWithValidatedRedirects(request, validateUrl) : await require_http.doubleKnock(request, rsaKey, {
|
|
3443
3472
|
tracerProvider,
|
|
3444
|
-
specDeterminer
|
|
3473
|
+
specDeterminer,
|
|
3474
|
+
validateRedirect: validateUrl
|
|
3445
3475
|
});
|
|
3446
3476
|
} catch (error) {
|
|
3447
|
-
const
|
|
3477
|
+
const failure = error instanceof _fedify_vocab_runtime.FetchError || error instanceof _fedify_vocab_runtime.UrlError ? error : createFetchError(inbox.href, error);
|
|
3448
3478
|
logger.error("Failed to send activity {activityId} to {inbox}:\n{error}", {
|
|
3449
3479
|
activityId,
|
|
3450
3480
|
inbox: inbox.href,
|
|
3451
|
-
error:
|
|
3481
|
+
error: failure
|
|
3452
3482
|
});
|
|
3453
3483
|
federationMetrics.recordDelivery(inbox, require_http.getDurationMs(started), false, activityType);
|
|
3454
|
-
throw
|
|
3484
|
+
throw failure;
|
|
3455
3485
|
}
|
|
3456
3486
|
try {
|
|
3457
3487
|
if (!response.ok) {
|
|
@@ -3488,6 +3518,49 @@ function createFetchError(url, cause) {
|
|
|
3488
3518
|
error.cause = cause;
|
|
3489
3519
|
return error;
|
|
3490
3520
|
}
|
|
3521
|
+
async function fetchWithValidatedRedirects(request, validateUrl) {
|
|
3522
|
+
let body = await request.clone().text();
|
|
3523
|
+
for (let redirects = 0;; redirects++) {
|
|
3524
|
+
const response = await fetch(request, { redirect: "manual" });
|
|
3525
|
+
const location = response.headers.get("Location");
|
|
3526
|
+
if (![
|
|
3527
|
+
301,
|
|
3528
|
+
302,
|
|
3529
|
+
303,
|
|
3530
|
+
307,
|
|
3531
|
+
308
|
|
3532
|
+
].includes(response.status) || location == null) return response;
|
|
3533
|
+
await response.body?.cancel();
|
|
3534
|
+
if (redirects >= 20) throw new TypeError("Too many redirects");
|
|
3535
|
+
const url = new URL(location, request.url);
|
|
3536
|
+
await validateUrl(url.href);
|
|
3537
|
+
const headers = new Headers(request.headers);
|
|
3538
|
+
if (url.origin !== new URL(request.url).origin) {
|
|
3539
|
+
headers.delete("Authorization");
|
|
3540
|
+
headers.delete("Proxy-Authorization");
|
|
3541
|
+
headers.delete("Cookie");
|
|
3542
|
+
headers.delete("Host");
|
|
3543
|
+
}
|
|
3544
|
+
let method = request.method;
|
|
3545
|
+
if ((response.status === 301 || response.status === 302) && method === "POST" || response.status === 303 && method !== "GET" && method !== "HEAD") {
|
|
3546
|
+
method = "GET";
|
|
3547
|
+
body = void 0;
|
|
3548
|
+
for (const name of [
|
|
3549
|
+
"Content-Encoding",
|
|
3550
|
+
"Content-Language",
|
|
3551
|
+
"Content-Length",
|
|
3552
|
+
"Content-Location",
|
|
3553
|
+
"Content-Type"
|
|
3554
|
+
]) headers.delete(name);
|
|
3555
|
+
}
|
|
3556
|
+
request = new Request(url, {
|
|
3557
|
+
method,
|
|
3558
|
+
headers,
|
|
3559
|
+
body,
|
|
3560
|
+
redirect: "manual"
|
|
3561
|
+
});
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3491
3564
|
/**
|
|
3492
3565
|
* An error that is thrown when an activity fails to send to a remote inbox.
|
|
3493
3566
|
* It contains structured information about the failure, including the HTTP
|
|
@@ -4633,6 +4706,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
4633
4706
|
if (decision.stateChange != null) recordCircuitBreakerSpanEvent(span, remoteHost, decision.stateChange);
|
|
4634
4707
|
}
|
|
4635
4708
|
await sendActivity({
|
|
4709
|
+
allowPrivateAddress: this.allowPrivateAddress,
|
|
4636
4710
|
keys,
|
|
4637
4711
|
activity: message.activity,
|
|
4638
4712
|
activityId: message.activityId,
|
|
@@ -5155,6 +5229,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
5155
5229
|
});
|
|
5156
5230
|
const promises = [];
|
|
5157
5231
|
for (const inbox in inboxes) promises.push(sendActivity({
|
|
5232
|
+
allowPrivateAddress: this.allowPrivateAddress,
|
|
5158
5233
|
keys,
|
|
5159
5234
|
activity: jsonLd,
|
|
5160
5235
|
activityId: activity.id?.href,
|
|
@@ -6432,6 +6507,7 @@ async function forwardActivityInternal(ctx, loggerCategory, forwarder, recipient
|
|
|
6432
6507
|
else logger.debug("Forwarding activity immediately without queue since queue is not set.");
|
|
6433
6508
|
const promises = [];
|
|
6434
6509
|
for (const inbox in inboxes) promises.push(sendActivity({
|
|
6510
|
+
allowPrivateAddress: ctx.federation.allowPrivateAddress,
|
|
6435
6511
|
keys,
|
|
6436
6512
|
activity: ctx.activity,
|
|
6437
6513
|
activityId: ctx.activityId,
|
|
@@ -2,17 +2,17 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
3
|
import { t as __exportAll } from "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { r as getDefaultActivityTransformers } from "./transformers-BGMIq1cs.js";
|
|
5
|
-
import { A as
|
|
6
|
-
import {
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
5
|
+
import { A as recordWebFingerHandle, C as recordCollectionRequest, D as recordInboxActivity, E as recordFanoutRecipients, I as name, L as version, M as formatAcceptSignature, O as recordOutboxActivity, S as recordCollectionPageItems, _ as instrumentDocumentLoader, a as verifyRequestDetailed, b as recordCircuitBreakerStateChange, d as importJwk, f as validateCryptoKey, g as getRemoteHost, h as getFederationMetrics, i as verifyRequest, j as registerQueueDepthGauge, k as recordOutboxEnqueue, m as getDurationMs, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as isAbortError, w as recordCollectionTotalItems, x as recordCollectionDispatchDuration } from "./http-BPPCh0xN.js";
|
|
6
|
+
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-sXITXcWa.js";
|
|
7
|
+
import { _ as hasSignatureLike, b as signJsonLd, c as getKeyOwner, f as compactJsonLd, g as hasSignature, h as getNormalizationContextLoader, i as verifyObject, l as InvalidContextReferenceError, m as detachSignature, n as hasProofLike, o as normalizeOutgoingActivityJsonLd, r as signObject, s as doesActorOwnKey, u as assertSafeJsonLd, v as isClearlyMalformedContextReference, w as wrapContextLoaderForJsonLd, x as verifyCompactJsonLd, y as isInvalidUrlTypeError } from "./proof-Dz9ObvUq.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Cl1q1aA9.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Router, RouterError, assertPath } from "@fedify/uri-template";
|
|
11
11
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
12
12
|
import { SpanKind, SpanStatusCode, context, metrics, propagation, trace } from "@opentelemetry/api";
|
|
13
13
|
import { encodeHex } from "byte-encodings/hex";
|
|
14
|
+
import { FetchError, UrlError, getDocumentLoader, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
14
15
|
import { uniq } from "es-toolkit";
|
|
15
|
-
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
16
16
|
import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_RESPONSE_HEADER, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
|
|
17
17
|
import jsonld from "@fedify/vocab-runtime/jsonld";
|
|
18
18
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
@@ -1413,6 +1413,7 @@ async function routeActivity({ context: ctx, json, originalJson, normalizedActiv
|
|
|
1413
1413
|
}
|
|
1414
1414
|
//#endregion
|
|
1415
1415
|
//#region src/federation/keycache.ts
|
|
1416
|
+
const KEY_CACHE_GENERATION = "2";
|
|
1416
1417
|
var KvKeyCache = class {
|
|
1417
1418
|
kv;
|
|
1418
1419
|
prefix;
|
|
@@ -1433,13 +1434,20 @@ var KvKeyCache = class {
|
|
|
1433
1434
|
keyId.href
|
|
1434
1435
|
];
|
|
1435
1436
|
}
|
|
1437
|
+
#entryKey(keyId) {
|
|
1438
|
+
return [
|
|
1439
|
+
...this.prefix,
|
|
1440
|
+
KEY_CACHE_GENERATION,
|
|
1441
|
+
keyId.href
|
|
1442
|
+
];
|
|
1443
|
+
}
|
|
1436
1444
|
async get(keyId) {
|
|
1437
1445
|
const negativeExpiration = this.nullKeys.get(keyId.href);
|
|
1438
1446
|
if (negativeExpiration != null) {
|
|
1439
1447
|
if (Temporal.Now.instant().until(negativeExpiration).sign >= 0) return null;
|
|
1440
1448
|
this.nullKeys.delete(keyId.href);
|
|
1441
1449
|
}
|
|
1442
|
-
const serialized = await this.kv.get(
|
|
1450
|
+
const serialized = await this.kv.get(this.#entryKey(keyId));
|
|
1443
1451
|
if (serialized === void 0) return void 0;
|
|
1444
1452
|
if (serialized === null) {
|
|
1445
1453
|
this.nullKeys.set(keyId.href, Temporal.Now.instant().add(this.unavailableKeyTtl));
|
|
@@ -1451,7 +1459,7 @@ var KvKeyCache = class {
|
|
|
1451
1459
|
try {
|
|
1452
1460
|
return await Multikey.fromJsonLd(serialized, this.options);
|
|
1453
1461
|
} catch {
|
|
1454
|
-
await this.kv.delete(
|
|
1462
|
+
await this.kv.delete(this.#entryKey(keyId));
|
|
1455
1463
|
return;
|
|
1456
1464
|
}
|
|
1457
1465
|
}
|
|
@@ -1459,12 +1467,12 @@ var KvKeyCache = class {
|
|
|
1459
1467
|
async set(keyId, key) {
|
|
1460
1468
|
if (key == null) {
|
|
1461
1469
|
this.nullKeys.set(keyId.href, Temporal.Now.instant().add(this.unavailableKeyTtl));
|
|
1462
|
-
await this.kv.set(
|
|
1470
|
+
await this.kv.set(this.#entryKey(keyId), null, { ttl: this.unavailableKeyTtl });
|
|
1463
1471
|
return;
|
|
1464
1472
|
}
|
|
1465
1473
|
this.nullKeys.delete(keyId.href);
|
|
1466
1474
|
const serialized = await key.toJsonLd(this.options);
|
|
1467
|
-
await this.kv.set(
|
|
1475
|
+
await this.kv.set(this.#entryKey(keyId), serialized);
|
|
1468
1476
|
}
|
|
1469
1477
|
async getFetchError(keyId) {
|
|
1470
1478
|
const cached = await this.kv.get(this.#getFetchErrorKey(keyId));
|
|
@@ -1811,13 +1819,13 @@ function recordCollectionMetrics(meterProvider, base, result, options = {}) {
|
|
|
1811
1819
|
* @param parameters The parameters for handling the collection.
|
|
1812
1820
|
* @returns A promise that resolves to an HTTP response.
|
|
1813
1821
|
*/
|
|
1814
|
-
async function handleCollection(request, { name: name$
|
|
1815
|
-
const spanName = name$
|
|
1822
|
+
async function handleCollection(request, { name: name$2, identifier, uriGetter, filter, filterPredicate, context, collectionCallbacks, tracerProvider, meterProvider, onUnauthorized, onNotFound }) {
|
|
1823
|
+
const spanName = name$2.trim().replace(/\s+/g, "_");
|
|
1816
1824
|
tracerProvider = tracerProvider ?? trace.getTracerProvider();
|
|
1817
1825
|
const tracer = tracerProvider.getTracer(name, version);
|
|
1818
1826
|
const cursor = new URL(request.url).searchParams.get("cursor");
|
|
1819
1827
|
const metricBase = {
|
|
1820
|
-
kind: getCollectionMetricKind(name$
|
|
1828
|
+
kind: getCollectionMetricKind(name$2),
|
|
1821
1829
|
page: cursor != null,
|
|
1822
1830
|
dispatcher: "built_in"
|
|
1823
1831
|
};
|
|
@@ -1858,7 +1866,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1858
1866
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1859
1867
|
return await onNotFound(request);
|
|
1860
1868
|
}
|
|
1861
|
-
const items = filterCollectionItems(page.items, name$
|
|
1869
|
+
const items = filterCollectionItems(page.items, name$2, filterPredicate);
|
|
1862
1870
|
itemCount = items.length;
|
|
1863
1871
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
1864
1872
|
return items;
|
|
@@ -1898,7 +1906,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1898
1906
|
} else {
|
|
1899
1907
|
const uri = new URL(baseUri);
|
|
1900
1908
|
uri.searchParams.set("cursor", cursor);
|
|
1901
|
-
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$
|
|
1909
|
+
const pageOrResponse = await tracer.startActiveSpan(`activitypub.dispatch_collection_page ${name$2}`, {
|
|
1902
1910
|
kind: SpanKind.SERVER,
|
|
1903
1911
|
attributes: {
|
|
1904
1912
|
"activitypub.collection.id": uri.href,
|
|
@@ -1914,7 +1922,7 @@ async function handleCollection(request, { name: name$1, identifier, uriGetter,
|
|
|
1914
1922
|
span.setStatus({ code: SpanStatusCode.ERROR });
|
|
1915
1923
|
return await onNotFound(request);
|
|
1916
1924
|
}
|
|
1917
|
-
const items = filterCollectionItems(page.items, name$
|
|
1925
|
+
const items = filterCollectionItems(page.items, name$2, filterPredicate);
|
|
1918
1926
|
itemCount = items.length;
|
|
1919
1927
|
span.setAttribute("fedify.collection.items", itemCount);
|
|
1920
1928
|
return {
|
|
@@ -2280,8 +2288,16 @@ async function handleInboxInternal(request, parameters, span) {
|
|
|
2280
2288
|
}
|
|
2281
2289
|
let json;
|
|
2282
2290
|
try {
|
|
2283
|
-
json = await request.clone().
|
|
2291
|
+
json = JSON.parse(await readBoundedText(request.clone(), MAX_BODY_SIZE, request.url));
|
|
2284
2292
|
} catch (error) {
|
|
2293
|
+
if (error instanceof BodyTooLargeError) {
|
|
2294
|
+
request.body?.cancel(error).catch(() => {});
|
|
2295
|
+
span.setStatus({
|
|
2296
|
+
code: SpanStatusCode.ERROR,
|
|
2297
|
+
message: String(error)
|
|
2298
|
+
});
|
|
2299
|
+
return new Response("Inbox body too large.", { status: 413 });
|
|
2300
|
+
}
|
|
2285
2301
|
logger.error("Failed to parse JSON:\n{error}", {
|
|
2286
2302
|
recipient,
|
|
2287
2303
|
error
|
|
@@ -2782,8 +2798,8 @@ var CustomCollectionHandler = class {
|
|
|
2782
2798
|
* @param CollectionPage The CollectionPage constructor.
|
|
2783
2799
|
* @param filterPredicate Optional filter predicate for items.
|
|
2784
2800
|
*/
|
|
2785
|
-
constructor(name$
|
|
2786
|
-
this.name = name$
|
|
2801
|
+
constructor(name$1, values, context, callbacks, tracerProvider = trace.getTracerProvider(), meterProvider, Collection, CollectionPage, filterPredicate) {
|
|
2802
|
+
this.name = name$1;
|
|
2787
2803
|
this.values = values;
|
|
2788
2804
|
this.context = context;
|
|
2789
2805
|
this.callbacks = callbacks;
|
|
@@ -3408,7 +3424,7 @@ async function readLimitedResponseBody(response, maxBytes) {
|
|
|
3408
3424
|
if (truncated) result += "… (truncated)";
|
|
3409
3425
|
return result;
|
|
3410
3426
|
}
|
|
3411
|
-
async function sendActivityInternal({ activity, activityId, activityType, keys, inbox, headers, specDeterminer, meterProvider, tracerProvider }, span) {
|
|
3427
|
+
async function sendActivityInternal({ activity, activityId, activityType, keys, inbox, allowPrivateAddress, headers, specDeterminer, meterProvider, tracerProvider }, span) {
|
|
3412
3428
|
const logger = getLogger([
|
|
3413
3429
|
"fedify",
|
|
3414
3430
|
"federation",
|
|
@@ -3417,12 +3433,25 @@ async function sendActivityInternal({ activity, activityId, activityType, keys,
|
|
|
3417
3433
|
const federationMetrics = getFederationMetrics(meterProvider);
|
|
3418
3434
|
const started = performance.now();
|
|
3419
3435
|
let deliverySuccess = false;
|
|
3436
|
+
async function validateUrl(url) {
|
|
3437
|
+
if (!allowPrivateAddress) try {
|
|
3438
|
+
await validatePublicUrl(url);
|
|
3439
|
+
} catch (error) {
|
|
3440
|
+
if (error instanceof UrlError) logger.error("Disallowed private URL: {url}", {
|
|
3441
|
+
url,
|
|
3442
|
+
error
|
|
3443
|
+
});
|
|
3444
|
+
throw error;
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
await validateUrl(inbox.href);
|
|
3420
3448
|
headers = new Headers(headers);
|
|
3421
3449
|
headers.set("Content-Type", "application/activity+json");
|
|
3422
3450
|
const request = new Request(inbox, {
|
|
3423
3451
|
method: "POST",
|
|
3424
3452
|
headers,
|
|
3425
|
-
body: JSON.stringify(activity)
|
|
3453
|
+
body: JSON.stringify(activity),
|
|
3454
|
+
redirect: "manual"
|
|
3426
3455
|
});
|
|
3427
3456
|
let rsaKey = null;
|
|
3428
3457
|
for (const key of keys) if (key.privateKey.algorithm.name === "RSASSA-PKCS1-v1_5") {
|
|
@@ -3438,19 +3467,20 @@ async function sendActivityInternal({ activity, activityId, activityType, keys,
|
|
|
3438
3467
|
});
|
|
3439
3468
|
let response;
|
|
3440
3469
|
try {
|
|
3441
|
-
response = rsaKey == null ? await
|
|
3470
|
+
response = rsaKey == null ? await fetchWithValidatedRedirects(request, validateUrl) : await doubleKnock(request, rsaKey, {
|
|
3442
3471
|
tracerProvider,
|
|
3443
|
-
specDeterminer
|
|
3472
|
+
specDeterminer,
|
|
3473
|
+
validateRedirect: validateUrl
|
|
3444
3474
|
});
|
|
3445
3475
|
} catch (error) {
|
|
3446
|
-
const
|
|
3476
|
+
const failure = error instanceof FetchError || error instanceof UrlError ? error : createFetchError(inbox.href, error);
|
|
3447
3477
|
logger.error("Failed to send activity {activityId} to {inbox}:\n{error}", {
|
|
3448
3478
|
activityId,
|
|
3449
3479
|
inbox: inbox.href,
|
|
3450
|
-
error:
|
|
3480
|
+
error: failure
|
|
3451
3481
|
});
|
|
3452
3482
|
federationMetrics.recordDelivery(inbox, getDurationMs(started), false, activityType);
|
|
3453
|
-
throw
|
|
3483
|
+
throw failure;
|
|
3454
3484
|
}
|
|
3455
3485
|
try {
|
|
3456
3486
|
if (!response.ok) {
|
|
@@ -3487,6 +3517,49 @@ function createFetchError(url, cause) {
|
|
|
3487
3517
|
error.cause = cause;
|
|
3488
3518
|
return error;
|
|
3489
3519
|
}
|
|
3520
|
+
async function fetchWithValidatedRedirects(request, validateUrl) {
|
|
3521
|
+
let body = await request.clone().text();
|
|
3522
|
+
for (let redirects = 0;; redirects++) {
|
|
3523
|
+
const response = await fetch(request, { redirect: "manual" });
|
|
3524
|
+
const location = response.headers.get("Location");
|
|
3525
|
+
if (![
|
|
3526
|
+
301,
|
|
3527
|
+
302,
|
|
3528
|
+
303,
|
|
3529
|
+
307,
|
|
3530
|
+
308
|
|
3531
|
+
].includes(response.status) || location == null) return response;
|
|
3532
|
+
await response.body?.cancel();
|
|
3533
|
+
if (redirects >= 20) throw new TypeError("Too many redirects");
|
|
3534
|
+
const url = new URL(location, request.url);
|
|
3535
|
+
await validateUrl(url.href);
|
|
3536
|
+
const headers = new Headers(request.headers);
|
|
3537
|
+
if (url.origin !== new URL(request.url).origin) {
|
|
3538
|
+
headers.delete("Authorization");
|
|
3539
|
+
headers.delete("Proxy-Authorization");
|
|
3540
|
+
headers.delete("Cookie");
|
|
3541
|
+
headers.delete("Host");
|
|
3542
|
+
}
|
|
3543
|
+
let method = request.method;
|
|
3544
|
+
if ((response.status === 301 || response.status === 302) && method === "POST" || response.status === 303 && method !== "GET" && method !== "HEAD") {
|
|
3545
|
+
method = "GET";
|
|
3546
|
+
body = void 0;
|
|
3547
|
+
for (const name of [
|
|
3548
|
+
"Content-Encoding",
|
|
3549
|
+
"Content-Language",
|
|
3550
|
+
"Content-Length",
|
|
3551
|
+
"Content-Location",
|
|
3552
|
+
"Content-Type"
|
|
3553
|
+
]) headers.delete(name);
|
|
3554
|
+
}
|
|
3555
|
+
request = new Request(url, {
|
|
3556
|
+
method,
|
|
3557
|
+
headers,
|
|
3558
|
+
body,
|
|
3559
|
+
redirect: "manual"
|
|
3560
|
+
});
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3490
3563
|
/**
|
|
3491
3564
|
* An error that is thrown when an activity fails to send to a remote inbox.
|
|
3492
3565
|
* It contains structured information about the failure, including the HTTP
|
|
@@ -4632,6 +4705,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
4632
4705
|
if (decision.stateChange != null) recordCircuitBreakerSpanEvent(span, remoteHost, decision.stateChange);
|
|
4633
4706
|
}
|
|
4634
4707
|
await sendActivity({
|
|
4708
|
+
allowPrivateAddress: this.allowPrivateAddress,
|
|
4635
4709
|
keys,
|
|
4636
4710
|
activity: message.activity,
|
|
4637
4711
|
activityId: message.activityId,
|
|
@@ -5154,6 +5228,7 @@ var FederationImpl = class extends FederationBuilderImpl {
|
|
|
5154
5228
|
});
|
|
5155
5229
|
const promises = [];
|
|
5156
5230
|
for (const inbox in inboxes) promises.push(sendActivity({
|
|
5231
|
+
allowPrivateAddress: this.allowPrivateAddress,
|
|
5157
5232
|
keys,
|
|
5158
5233
|
activity: jsonLd,
|
|
5159
5234
|
activityId: activity.id?.href,
|
|
@@ -6431,6 +6506,7 @@ async function forwardActivityInternal(ctx, loggerCategory, forwarder, recipient
|
|
|
6431
6506
|
else logger.debug("Forwarding activity immediately without queue since queue is not set.");
|
|
6432
6507
|
const promises = [];
|
|
6433
6508
|
for (const inbox in inboxes) promises.push(sendActivity({
|
|
6509
|
+
allowPrivateAddress: ctx.federation.allowPrivateAddress,
|
|
6434
6510
|
keys,
|
|
6435
6511
|
activity: ctx.activity,
|
|
6436
6512
|
activityId: ctx.activityId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DiWQB8Mr.cjs";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-gJ8LYbxX.cjs";
|
|
4
4
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { S as KeyCache } from "./http-
|
|
2
|
+
import { S as KeyCache } from "./http-DiWQB8Mr.cjs";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
|
5
5
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-
|
|
2
|
+
import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-CAKnQy1x.js";
|
|
3
3
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
4
4
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-
|
|
2
|
+
import { n as HttpMessageSignaturesSpecDeterminer } from "./http-DQmNpfym.js";
|
|
3
3
|
import { n as KvStore, t as KvKey } from "./kv-D6hNiMTK.js";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { DocumentLoader, DocumentLoaderFactoryOptions } from "@fedify/vocab-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-
|
|
2
|
+
import { G as ActorDispatcher, K as ActorHandleMapper, W as ActorAliasMapper, l as RequestContext, pt as WebFingerLinksDispatcher } from "./context-CSIggG9_.cjs";
|
|
3
3
|
import { MeterProvider, Span, Tracer } from "@opentelemetry/api";
|
|
4
4
|
import { RouterError, RouterOptions, RouterRouteResult } from "@fedify/uri-template";
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference lib="esnext.temporal" />
|
|
2
|
-
import { S as KeyCache } from "./http-
|
|
2
|
+
import { S as KeyCache } from "./http-DQmNpfym.js";
|
|
3
3
|
import { CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1 } from "@fedify/vocab";
|
|
4
4
|
import { MeterProvider, TracerProvider } from "@opentelemetry/api";
|
|
5
5
|
import { DocumentLoader } from "@fedify/vocab-runtime";
|
package/dist/mod.cjs
CHANGED
|
@@ -4,11 +4,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
4
4
|
require("./chunk-DDcVe30Y.cjs");
|
|
5
5
|
const require_transformers = require("./transformers-NeAONrAq.cjs");
|
|
6
6
|
require("./compat/mod.cjs");
|
|
7
|
-
const require_http = require("./http-
|
|
8
|
-
const require_middleware = require("./middleware-
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
7
|
+
const require_http = require("./http-BGP2QCbe.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-BZojifnF.cjs");
|
|
9
|
+
const require_types = require("./types-DWs-qZaY.cjs");
|
|
10
|
+
const require_proof = require("./proof-I6YcKRRq.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-C1TC_e9y.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|