@fedify/fedify 2.2.16 → 2.2.18-dev.2386
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/{builder-2WicIXl5.mjs → builder-CiKYvR0I.mjs} +2 -2
- package/dist/compat/transformers.test.mjs +1 -1
- package/dist/{deno-BCQztXLl.mjs → deno-CkabM5bf.mjs} +1 -1
- package/dist/{docloader-NG6Mmr-J.mjs → docloader-B4Hk3LSj.mjs} +2 -2
- package/dist/federation/builder.test.mjs +1 -1
- package/dist/federation/handler.test.mjs +5 -5
- package/dist/federation/idempotency.test.mjs +2 -2
- package/dist/federation/middleware.test.mjs +6 -6
- package/dist/federation/mod.cjs +1 -1
- package/dist/federation/mod.js +1 -1
- package/dist/federation/send.test.mjs +3 -3
- package/dist/federation/temporal.test.mjs +1 -1
- package/dist/federation/webfinger.test.mjs +1 -1
- package/dist/{http-B7mxZjxT.cjs → http-C_Qq0cNx.cjs} +103 -9
- package/dist/{http-DK5sOqk3.js → http-DP-vbG4o.js} +104 -10
- package/dist/{http-B72sZOJB.mjs → http-DovhI1VM.mjs} +2 -2
- package/dist/{key-DCQAjTMo.mjs → key-BtVvc9pe.mjs} +104 -10
- package/dist/{kv-cache-BatvhvQ8.js → kv-cache-D8yJIXRo.js} +1 -1
- package/dist/{kv-cache-DCIQW7aM.cjs → kv-cache-Ds_adaor.cjs} +1 -1
- package/dist/{ld-37J55dno.mjs → ld-1J9cdTp0.mjs} +2 -2
- package/dist/{middleware-O_yyvaOf.cjs → middleware-BWXhlsuq.cjs} +4 -4
- package/dist/{middleware-BZO3vnP1.cjs → middleware-B_M6lcay.cjs} +1 -1
- package/dist/{middleware-Cqza2chY.js → middleware-BrFMyQSp.js} +3 -3
- package/dist/{middleware-CPmKbXgW.mjs → middleware-DMkt5ShX.mjs} +1 -1
- package/dist/{middleware-DOTXcNS-.mjs → middleware-ruFPV2xR.mjs} +10 -10
- package/dist/mod.cjs +4 -4
- package/dist/mod.js +4 -4
- package/dist/nodeinfo/handler.test.mjs +1 -1
- package/dist/{owner-Bou1yabn.mjs → owner-CgurOfJ9.mjs} +2 -2
- package/dist/{proof-BdrKA26Y.js → proof-BJ332wO_.js} +1 -1
- package/dist/{proof-ZUtbM4a6.cjs → proof-C6uAR-Hj.cjs} +1 -1
- package/dist/{proof-BFSV3hJj.mjs → proof-Dn4nm7pr.mjs} +2 -2
- package/dist/{send-DwQAYND-.mjs → send-iVwnK504.mjs} +2 -2
- package/dist/sig/http.test.mjs +2 -2
- package/dist/sig/key.test.mjs +198 -3
- package/dist/sig/ld.test.mjs +2 -2
- package/dist/sig/mod.cjs +2 -2
- package/dist/sig/mod.js +2 -2
- package/dist/sig/owner.test.mjs +1 -1
- package/dist/sig/proof.test.mjs +1 -1
- package/dist/{temporal-BWuGBFaX.mjs → temporal-BZrzDMq2.mjs} +1 -1
- package/dist/utils/docloader.test.mjs +2 -2
- package/dist/utils/mod.cjs +1 -1
- package/dist/utils/mod.js +1 -1
- package/package.json +5 -5
|
@@ -1,12 +1,70 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
4
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
5
5
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
|
-
import { FetchError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
7
|
+
import { FetchError, UrlError, getDocumentLoader } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
|
9
9
|
//#region src/sig/key.ts
|
|
10
|
+
/** Classifies decoding failures without hiding unexpected loader errors. */
|
|
11
|
+
function classifyKeyJsonLdError(error, seen = /* @__PURE__ */ new Set()) {
|
|
12
|
+
if (!(error instanceof Error) || !error.name.startsWith("jsonld.")) return null;
|
|
13
|
+
if (seen.has(error)) throw error;
|
|
14
|
+
seen.add(error);
|
|
15
|
+
const details = error.details;
|
|
16
|
+
if (typeof details?.code !== "string") return null;
|
|
17
|
+
if (details.code !== "loading remote context failed" || !("cause" in details) && !("cause" in error)) return "invalid";
|
|
18
|
+
const cause = "cause" in details ? details.cause : error.cause;
|
|
19
|
+
const nestedFailure = classifyKeyJsonLdError(cause, seen);
|
|
20
|
+
if (nestedFailure != null) return nestedFailure;
|
|
21
|
+
if (cause instanceof SyntaxError) return "invalid";
|
|
22
|
+
if (cause instanceof FetchError || cause instanceof UrlError) return "fetch";
|
|
23
|
+
if (cause instanceof Error && [
|
|
24
|
+
"AbortError",
|
|
25
|
+
"TimeoutError",
|
|
26
|
+
"NetworkError"
|
|
27
|
+
].includes(cause.name)) return "fetch";
|
|
28
|
+
if (cause instanceof TypeError) {
|
|
29
|
+
const urlCode = cause.code;
|
|
30
|
+
if (cause.name === "InvalidContextReferenceError") return "invalid";
|
|
31
|
+
if (urlCode === "ERR_INVALID_URL" || cause.message === "Invalid URL string." || /^Invalid URL(?::|$)/.test(cause.message) || / cannot be parsed as a URL\.?$/.test(cause.message)) return typeof details.url === "string" && /^[A-Za-z][A-Za-z0-9+.-]*:/.test(details.url) && !URL.canParse(details.url) ? "invalid" : "fetch";
|
|
32
|
+
const networkCause = cause.cause;
|
|
33
|
+
const code = cause.code ?? networkCause?.code;
|
|
34
|
+
if (typeof code === "string" && [
|
|
35
|
+
"ECONNREFUSED",
|
|
36
|
+
"ECONNRESET",
|
|
37
|
+
"ECONNABORTED",
|
|
38
|
+
"ETIMEDOUT",
|
|
39
|
+
"EHOSTUNREACH",
|
|
40
|
+
"ENETUNREACH",
|
|
41
|
+
"ENOTFOUND",
|
|
42
|
+
"EAI_AGAIN",
|
|
43
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
44
|
+
"UND_ERR_HEADERS_TIMEOUT",
|
|
45
|
+
"UND_ERR_BODY_TIMEOUT",
|
|
46
|
+
"UND_ERR_SOCKET"
|
|
47
|
+
].includes(code) || /^(fetch failed|Failed to fetch|error sending request|error reading a body from connection|Unable to connect|ConnectionRefused|Network connection lost|The socket connection was closed unexpectedly)/.test(cause.message)) return "fetch";
|
|
48
|
+
}
|
|
49
|
+
throw cause;
|
|
50
|
+
}
|
|
51
|
+
/** Carries a context transport failure through the key decoding boundary. */
|
|
52
|
+
var KeyContextFetchError = class extends Error {
|
|
53
|
+
constructor(error) {
|
|
54
|
+
super("Failed to fetch a key's JSON-LD context.", { cause: error });
|
|
55
|
+
this.error = error;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function contextFetchError(error) {
|
|
59
|
+
const seen = /* @__PURE__ */ new Set();
|
|
60
|
+
while (error instanceof Error && !seen.has(error)) {
|
|
61
|
+
seen.add(error);
|
|
62
|
+
const details = error.details;
|
|
63
|
+
if (!error.name.startsWith("jsonld.") || details?.code !== "loading remote context failed") break;
|
|
64
|
+
error = "cause" in details ? details.cause : error.cause;
|
|
65
|
+
}
|
|
66
|
+
return new KeyContextFetchError(error);
|
|
67
|
+
}
|
|
10
68
|
/**
|
|
11
69
|
* Checks if the given key is valid and supported. No-op if the key is valid,
|
|
12
70
|
* otherwise throws an error.
|
|
@@ -101,6 +159,9 @@ async function importJwk(jwk, type) {
|
|
|
101
159
|
* @internal
|
|
102
160
|
*/
|
|
103
161
|
async function fetchActorDocument(actorId, options = {}) {
|
|
162
|
+
return await fetchActorDocumentInternal(actorId, options, false);
|
|
163
|
+
}
|
|
164
|
+
async function fetchActorDocumentInternal(actorId, options, propagateContextFetchErrors) {
|
|
104
165
|
const logger = getLogger([
|
|
105
166
|
"fedify",
|
|
106
167
|
"sig",
|
|
@@ -131,9 +192,12 @@ async function fetchActorDocument(actorId, options = {}) {
|
|
|
131
192
|
baseUrl: documentUrl
|
|
132
193
|
});
|
|
133
194
|
} catch (error) {
|
|
134
|
-
|
|
135
|
-
|
|
195
|
+
const failure = classifyKeyJsonLdError(error);
|
|
196
|
+
if (failure === "fetch" && propagateContextFetchErrors) throw contextFetchError(error);
|
|
197
|
+
if (failure == null && !(error instanceof TypeError)) throw error;
|
|
198
|
+
logger.debug("Failed to decode the actor document at {documentUrl}: {error}", {
|
|
136
199
|
documentUrl: documentUrl.href,
|
|
200
|
+
failure: failure ?? "invalid",
|
|
137
201
|
error
|
|
138
202
|
});
|
|
139
203
|
return null;
|
|
@@ -172,6 +236,9 @@ async function fetchActorDocument(actorId, options = {}) {
|
|
|
172
236
|
* @internal
|
|
173
237
|
*/
|
|
174
238
|
async function verifyKeyOwnership(key, options = {}) {
|
|
239
|
+
return await verifyKeyOwnershipInternal(key, options, false);
|
|
240
|
+
}
|
|
241
|
+
async function verifyKeyOwnershipInternal(key, options, propagateContextFetchErrors) {
|
|
175
242
|
const logger = getLogger([
|
|
176
243
|
"fedify",
|
|
177
244
|
"sig",
|
|
@@ -181,7 +248,7 @@ async function verifyKeyOwnership(key, options = {}) {
|
|
|
181
248
|
if (keyId == null) return null;
|
|
182
249
|
const claimedOwnerId = key instanceof CryptographicKey ? key.ownerId : key.controllerId;
|
|
183
250
|
if (claimedOwnerId == null) return null;
|
|
184
|
-
const owner = await
|
|
251
|
+
const owner = await fetchActorDocumentInternal(claimedOwnerId, options, propagateContextFetchErrors);
|
|
185
252
|
if (owner == null) {
|
|
186
253
|
logger.debug("The owner ({claimedOwnerId}) that key {keyId} claims could not be resolved.", {
|
|
187
254
|
keyId: keyId.href,
|
|
@@ -333,6 +400,21 @@ async function resolveFetchedKey(document, cacheKey, documentUrl, keyId, cls, {
|
|
|
333
400
|
tracerProvider
|
|
334
401
|
});
|
|
335
402
|
} catch (e) {
|
|
403
|
+
const failure = classifyKeyJsonLdError(e);
|
|
404
|
+
if (failure === "fetch") throw contextFetchError(e);
|
|
405
|
+
if (failure != null) {
|
|
406
|
+
logger.debug("Failed to decode key {keyId}: {error}", {
|
|
407
|
+
keyId,
|
|
408
|
+
failure,
|
|
409
|
+
error: e
|
|
410
|
+
});
|
|
411
|
+
await keyCache?.set(cacheKey, null);
|
|
412
|
+
await clearFetchErrorMetadata(cacheKey, keyCache);
|
|
413
|
+
return {
|
|
414
|
+
key: null,
|
|
415
|
+
cached: false
|
|
416
|
+
};
|
|
417
|
+
}
|
|
336
418
|
if (!(e instanceof TypeError)) throw e;
|
|
337
419
|
try {
|
|
338
420
|
object = await cls.fromJsonLd(document, {
|
|
@@ -341,8 +423,14 @@ async function resolveFetchedKey(document, cacheKey, documentUrl, keyId, cls, {
|
|
|
341
423
|
tracerProvider
|
|
342
424
|
});
|
|
343
425
|
} catch (e) {
|
|
344
|
-
|
|
345
|
-
|
|
426
|
+
const failure = classifyKeyJsonLdError(e);
|
|
427
|
+
if (failure === "fetch") throw contextFetchError(e);
|
|
428
|
+
if (failure != null || e instanceof TypeError) {
|
|
429
|
+
logger.debug("Failed to decode key {keyId}: {error}", {
|
|
430
|
+
keyId,
|
|
431
|
+
failure: failure ?? "invalid",
|
|
432
|
+
error: e
|
|
433
|
+
});
|
|
346
434
|
await keyCache?.set(cacheKey, null);
|
|
347
435
|
await clearFetchErrorMetadata(cacheKey, keyCache);
|
|
348
436
|
return {
|
|
@@ -434,16 +522,17 @@ async function resolveFetchedKey(document, cacheKey, documentUrl, keyId, cls, {
|
|
|
434
522
|
const claimedOwnerId = key instanceof CryptographicKey ? key.ownerId : key.controllerId;
|
|
435
523
|
if (ownerDocument != null && claimedOwnerId == null) key = key instanceof CryptographicKey ? key.clone({ owner: ownerDocument.id }) : key.clone({ controller: ownerDocument.id });
|
|
436
524
|
else if (claimedOwnerId != null && claimedOwnerId.href !== ownerDocument?.id?.href) {
|
|
437
|
-
if (await
|
|
525
|
+
if (await verifyKeyOwnershipInternal(key, {
|
|
438
526
|
documentLoader,
|
|
439
527
|
contextLoader,
|
|
440
528
|
tracerProvider
|
|
441
|
-
}) == null) {
|
|
529
|
+
}, true) == null) {
|
|
442
530
|
logger.debug("Failed to verify; the owner {claimedOwnerId} that key {keyId} claims does not list the key as its own.", {
|
|
443
531
|
keyId,
|
|
444
532
|
claimedOwnerId: claimedOwnerId.href
|
|
445
533
|
});
|
|
446
534
|
await keyCache?.set(cacheKey, null);
|
|
535
|
+
await clearFetchErrorMetadata(cacheKey, keyCache);
|
|
447
536
|
return {
|
|
448
537
|
key: null,
|
|
449
538
|
cached: false
|
|
@@ -481,7 +570,12 @@ async function fetchKeyWithResult(cacheKey, cls, options, onCachedUnavailable, o
|
|
|
481
570
|
} catch (error) {
|
|
482
571
|
return await onFetchError(error, cacheKey, keyId, keyCache, logger);
|
|
483
572
|
}
|
|
484
|
-
|
|
573
|
+
try {
|
|
574
|
+
return await resolveFetchedKey(document, cacheKey, documentUrl, keyId, cls, options, logger);
|
|
575
|
+
} catch (error) {
|
|
576
|
+
if (!(error instanceof KeyContextFetchError)) throw error;
|
|
577
|
+
return await onFetchError(error.error, cacheKey, keyId, keyCache, logger);
|
|
578
|
+
}
|
|
485
579
|
}
|
|
486
580
|
async function fetchKeyInternal(keyId, cls, options = {}) {
|
|
487
581
|
return await fetchKeyWithResult(typeof keyId === "string" ? new URL(keyId) : keyId, cls, options, (_cacheKey, _keyId, _keyCache, _logger) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { f as validateCryptoKey, t as doubleKnock } from "./http-
|
|
3
|
+
import { f as validateCryptoKey, t as doubleKnock } from "./http-DP-vbG4o.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { curry } from "es-toolkit";
|
|
6
6
|
import { FetchError, UrlError, createActivityPubRequest, getRemoteDocument, logRequest, preloadedContexts, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-C_Qq0cNx.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let es_toolkit = require("es-toolkit");
|
|
7
7
|
let _fedify_vocab_runtime = require("@fedify/vocab-runtime");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-BtVvc9pe.mjs";
|
|
6
6
|
import { Activity, CryptographicKey, Object as Object$1, getTypeId } from "@fedify/vocab";
|
|
7
7
|
import { SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -2,10 +2,10 @@ 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-
|
|
5
|
+
const require_http = require("./http-C_Qq0cNx.cjs");
|
|
6
6
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
7
|
-
const require_proof = require("./proof-
|
|
8
|
-
const require_kv_cache = require("./kv-cache-
|
|
7
|
+
const require_proof = require("./proof-C6uAR-Hj.cjs");
|
|
8
|
+
const require_kv_cache = require("./kv-cache-Ds_adaor.cjs");
|
|
9
9
|
let _logtape_logtape = require("@logtape/logtape");
|
|
10
10
|
let _fedify_vocab = require("@fedify/vocab");
|
|
11
11
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -213,7 +213,7 @@ var FederationBuilderImpl = class {
|
|
|
213
213
|
this.collectionTypeIds = {};
|
|
214
214
|
}
|
|
215
215
|
async build(options) {
|
|
216
|
-
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-
|
|
216
|
+
const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-B_M6lcay.cjs"));
|
|
217
217
|
const f = new FederationImpl(options);
|
|
218
218
|
const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
|
|
219
219
|
f.router = this.router.clone();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
|
-
const require_middleware = require("./middleware-
|
|
3
|
+
const require_middleware = require("./middleware-BWXhlsuq.cjs");
|
|
4
4
|
exports.FederationImpl = require_middleware.FederationImpl;
|
|
@@ -2,10 +2,10 @@ 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 verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-
|
|
5
|
+
import { a as verifyRequestDetailed, d as importJwk, f as validateCryptoKey, i as verifyRequest, m as formatAcceptSignature, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, v as name, y as version } from "./http-DP-vbG4o.js";
|
|
6
6
|
import { a as MAX_BODY_SIZE, i as BodyTooLargeError, n as getNodeInfo, o as readBoundedText, t as nodeInfoToJson } from "./types-miAYfiGO.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-
|
|
8
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
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-BJ332wO_.js";
|
|
8
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-D8yJIXRo.js";
|
|
9
9
|
import { getLogger, withContext } from "@logtape/logtape";
|
|
10
10
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
11
11
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
|
@@ -2,25 +2,25 @@ import { Temporal } from "@js-temporal/polyfill";
|
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
4
|
import { n as RouterError } from "./router-CrMLXoOr.mjs";
|
|
5
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
6
6
|
import { t as formatAcceptSignature } from "./accept-Dd__NiUL.mjs";
|
|
7
|
-
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-
|
|
8
|
-
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-
|
|
9
|
-
import { t as getAuthenticatedDocumentLoader } from "./docloader-
|
|
7
|
+
import { o as importJwk, s as validateCryptoKey, t as exportJwk } from "./key-BtVvc9pe.mjs";
|
|
8
|
+
import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-DovhI1VM.mjs";
|
|
9
|
+
import { t as getAuthenticatedDocumentLoader } from "./docloader-B4Hk3LSj.mjs";
|
|
10
10
|
import { n as kvCache } from "./kv-cache-FsT1ljhs.mjs";
|
|
11
11
|
import { t as KvKeyCache } from "./keycache-Dkc_sflV.mjs";
|
|
12
|
-
import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-
|
|
13
|
-
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-
|
|
12
|
+
import { _ as wrapContextLoaderForJsonLd, a as compactJsonLd, c as getNormalizationContextLoader, d as isClearlyMalformedContextReference, f as isInvalidUrlTypeError, l as hasSignature, m as verifyCompactJsonLd, p as signJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as hasSignatureLike } from "./ld-1J9cdTp0.mjs";
|
|
13
|
+
import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-CgurOfJ9.mjs";
|
|
14
14
|
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-amccRMrV.mjs";
|
|
15
|
-
import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-
|
|
15
|
+
import { i as verifyObject, n as hasProofLike, r as signObject } from "./proof-Dn4nm7pr.mjs";
|
|
16
16
|
import { d as readBoundedText, l as BodyTooLargeError, t as getNodeInfo, u as MAX_BODY_SIZE } from "./client-9F_u23dc.mjs";
|
|
17
17
|
import { t as nodeInfoToJson } from "./types-J53Kw7so.mjs";
|
|
18
|
-
import { t as FederationBuilderImpl } from "./builder-
|
|
18
|
+
import { t as FederationBuilderImpl } from "./builder-CiKYvR0I.mjs";
|
|
19
19
|
import { t as buildCollectionSynchronizationHeader } from "./collection-D-HqUuA2.mjs";
|
|
20
20
|
import { t as acceptsJsonLd } from "./negotiation-BHtZN6Y1.mjs";
|
|
21
|
-
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-
|
|
21
|
+
import { t as hasMalformedKnownTemporalLiteral } from "./temporal-BZrzDMq2.mjs";
|
|
22
22
|
import { t as createExponentialBackoffPolicy } from "./retry-bMXBL97A.mjs";
|
|
23
|
-
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-
|
|
23
|
+
import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-iVwnK504.mjs";
|
|
24
24
|
import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, Tombstone, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
|
|
25
25
|
import { lookupWebFinger } from "@fedify/webfinger";
|
|
26
26
|
import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
|
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-
|
|
7
|
+
const require_http = require("./http-C_Qq0cNx.cjs");
|
|
8
|
+
const require_middleware = require("./middleware-BWXhlsuq.cjs");
|
|
9
9
|
const require_types = require("./types-DRPjmHVV.cjs");
|
|
10
|
-
const require_proof = require("./proof-
|
|
11
|
-
const require_kv_cache = require("./kv-cache-
|
|
10
|
+
const require_proof = require("./proof-C6uAR-Hj.cjs");
|
|
11
|
+
const require_kv_cache = require("./kv-cache-Ds_adaor.cjs");
|
|
12
12
|
const require_federation_mod = require("./federation/mod.cjs");
|
|
13
13
|
require("./nodeinfo/mod.cjs");
|
|
14
14
|
require("./runtime/mod.cjs");
|
package/dist/mod.js
CHANGED
|
@@ -3,11 +3,11 @@ import { URLPattern } from "urlpattern-polyfill";
|
|
|
3
3
|
import "./chunk-CRNNMoPX.js";
|
|
4
4
|
import { n as autoIdAssigner, r as getDefaultActivityTransformers, t as actorDehydrator } from "./transformers-BGMIq1cs.js";
|
|
5
5
|
import "./compat/mod.js";
|
|
6
|
-
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-
|
|
7
|
-
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-
|
|
6
|
+
import { _ as validateAcceptSignature, a as verifyRequestDetailed, c as fetchKey, d as importJwk, g as parseAcceptSignature, h as fulfillAcceptSignature, i as verifyRequest, l as fetchKeyDetailed, m as formatAcceptSignature, o as exportJwk, r as signRequest, u as generateCryptoKeyPair } from "./http-DP-vbG4o.js";
|
|
7
|
+
import { a as createExponentialBackoffPolicy, c as buildCollectionSynchronizationHeader, d as Router, f as RouterError, i as SendActivityError, l as digest, o as respondWithObject, r as handleWebFinger, s as respondWithObjectIfAcceptable, t as createFederation, u as createFederationBuilder } from "./middleware-BrFMyQSp.js";
|
|
8
8
|
import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-miAYfiGO.js";
|
|
9
|
-
import { C as verifySignature, S as verifyJsonLd, _ as hasSignatureLike, a as verifyProof, b as signJsonLd, c as getKeyOwner, d as attachSignature, i as verifyObject, m as detachSignature, n as hasProofLike, p as createSignature, r as signObject, s as doesActorOwnKey, t as createProof } from "./proof-
|
|
10
|
-
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-
|
|
9
|
+
import { C as verifySignature, S as verifyJsonLd, _ as hasSignatureLike, a as verifyProof, b as signJsonLd, c as getKeyOwner, d as attachSignature, i as verifyObject, m as detachSignature, n as hasProofLike, p as createSignature, r as signObject, s as doesActorOwnKey, t as createProof } from "./proof-BJ332wO_.js";
|
|
10
|
+
import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-D8yJIXRo.js";
|
|
11
11
|
import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
|
|
12
12
|
import "./nodeinfo/mod.js";
|
|
13
13
|
import "./runtime/mod.js";
|
|
@@ -5,7 +5,7 @@ import { r as createRequestContext } from "../context-Dk_tacqz.mjs";
|
|
|
5
5
|
import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
|
|
6
6
|
import "../std__assert-BVFj8-_V.mjs";
|
|
7
7
|
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|
|
8
|
-
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-
|
|
8
|
+
import { _ as handleNodeInfoJrd, g as handleNodeInfo, o as createFederation } from "../middleware-ruFPV2xR.mjs";
|
|
9
9
|
import { test } from "@fedify/fixture";
|
|
10
10
|
//#region src/nodeinfo/handler.test.ts
|
|
11
11
|
test("handleNodeInfo()", async () => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
5
|
+
import { c as verifyKeyOwnership, n as fetchActorDocument, t as exportJwk } from "./key-BtVvc9pe.mjs";
|
|
6
6
|
import { CryptographicKey, Object as Object$1, isActor } from "@fedify/vocab";
|
|
7
7
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
8
8
|
import { getDocumentLoader } from "@fedify/vocab-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import { URLPattern } from "urlpattern-polyfill";
|
|
3
|
-
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-
|
|
3
|
+
import { c as fetchKey, f as validateCryptoKey, o as exportJwk, p as verifyKeyOwnership, s as fetchActorDocument, v as name, y as version } from "./http-DP-vbG4o.js";
|
|
4
4
|
import { getLogger } from "@logtape/logtape";
|
|
5
5
|
import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, PUBLIC_COLLECTION, getTypeId, isActor } from "@fedify/vocab";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { Temporal } = require("@js-temporal/polyfill");
|
|
2
2
|
const { URLPattern } = require("urlpattern-polyfill");
|
|
3
3
|
const require_chunk = require("./chunk-DDcVe30Y.cjs");
|
|
4
|
-
const require_http = require("./http-
|
|
4
|
+
const require_http = require("./http-C_Qq0cNx.cjs");
|
|
5
5
|
let _logtape_logtape = require("@logtape/logtape");
|
|
6
6
|
let _fedify_vocab = require("@fedify/vocab");
|
|
7
7
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Temporal } from "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { r as fetchKey, s as validateCryptoKey } from "./key-
|
|
4
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
5
|
+
import { r as fetchKey, s as validateCryptoKey } from "./key-BtVvc9pe.mjs";
|
|
6
6
|
import { n as preloadedOnlyDocumentLoader } from "./public-audience-DpJqzPuh.mjs";
|
|
7
7
|
import { r as normalizeOutgoingActivityJsonLd } from "./outgoing-jsonld-amccRMrV.mjs";
|
|
8
8
|
import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "@js-temporal/polyfill";
|
|
2
2
|
import "urlpattern-polyfill";
|
|
3
3
|
globalThis.addEventListener = () => {};
|
|
4
|
-
import { n as version, t as name } from "./deno-
|
|
5
|
-
import { n as doubleKnock } from "./http-
|
|
4
|
+
import { n as version, t as name } from "./deno-CkabM5bf.mjs";
|
|
5
|
+
import { n as doubleKnock } from "./http-DovhI1VM.mjs";
|
|
6
6
|
import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
|
|
7
7
|
import { FetchError, UrlError, validatePublicUrl } from "@fedify/vocab-runtime";
|
|
8
8
|
import { getLogger } from "@logtape/logtape";
|
package/dist/sig/http.test.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { r as assertExists, t as assertStringIncludes } from "../std__assert-BVF
|
|
|
7
7
|
import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
|
|
8
8
|
import { t as assert } from "../assert-BhQd8QHP.mjs";
|
|
9
9
|
import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
|
|
10
|
-
import { t as exportJwk } from "../key-
|
|
11
|
-
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-
|
|
10
|
+
import { t as exportJwk } from "../key-BtVvc9pe.mjs";
|
|
11
|
+
import { a as parseRfc9421Signature, c as timingSafeEqual, i as formatRfc9421SignatureParameters, l as verifyRequest, n as doubleKnock, o as parseRfc9421SignatureInput, r as formatRfc9421Signature, s as signRequest, t as createRfc9421SignatureBase, u as verifyRequestDetailed } from "../http-DovhI1VM.mjs";
|
|
12
12
|
import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-BAK-tUlf.mjs";
|
|
13
13
|
import { t as KvKeyCache } from "../keycache-Dkc_sflV.mjs";
|
|
14
14
|
import { t as MemoryKvStore } from "../kv-mI4Ix2EU.mjs";
|