@fedify/fedify 2.1.17 → 2.1.19

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.
Files changed (54) hide show
  1. package/README.md +5 -4
  2. package/dist/{builder-DUQXHENg.mjs → builder-DCXx9nNs.mjs} +5 -3
  3. package/dist/{client-DEpOVgY1.mjs → client-CZWLyLmp.mjs} +63 -5
  4. package/dist/compat/transformers.test.mjs +1 -1
  5. package/dist/{deno-SeF9Kbof.mjs → deno-Duj5q741.mjs} +1 -1
  6. package/dist/{docloader-20Uxx-BW.mjs → docloader-CARF375t.mjs} +2 -2
  7. package/dist/federation/builder.test.mjs +13 -1
  8. package/dist/federation/handler.test.mjs +4 -4
  9. package/dist/federation/idempotency.test.mjs +2 -2
  10. package/dist/federation/inbox.test.mjs +1 -1
  11. package/dist/federation/middleware.test.mjs +6 -6
  12. package/dist/federation/mod.cjs +1 -1
  13. package/dist/federation/mod.js +1 -1
  14. package/dist/federation/send.test.mjs +3 -3
  15. package/dist/federation/temporal.test.mjs +1 -1
  16. package/dist/federation/webfinger.test.mjs +69 -7
  17. package/dist/{http-vr3aQ7jg.mjs → http-BpDVph0H.mjs} +2 -2
  18. package/dist/{http-D11iWbgC.js → http-DJVliVm5.js} +1 -1
  19. package/dist/{http-BVFDfPaf.cjs → http-DV9BSPH6.cjs} +1 -1
  20. package/dist/{inbox-Bgd66bvQ.mjs → inbox-B6MZcCLE.mjs} +1 -1
  21. package/dist/{key-DELVYrDs.mjs → key-D-UlhG0h.mjs} +1 -1
  22. package/dist/{kv-cache-BPr4KawB.js → kv-cache-Byc1cbqT.js} +1 -1
  23. package/dist/{kv-cache-BsvJXj0K.cjs → kv-cache-CktLjvI-.cjs} +1 -1
  24. package/dist/{ld-C30fjlVq.mjs → ld-DI-vkRtz.mjs} +2 -2
  25. package/dist/{middleware-X3Wj8cQj.mjs → middleware-6xCmJ0Cg.mjs} +47 -29
  26. package/dist/{middleware-DTBJWxr0.cjs → middleware-CfV7L21b.cjs} +1 -1
  27. package/dist/{middleware-CLHlFIpA.js → middleware-DlLhm6b5.js} +41 -21
  28. package/dist/{middleware-CfvlmuBy.cjs → middleware-FKcaUo12.cjs} +42 -22
  29. package/dist/{middleware-BsZCAdN-.mjs → middleware-OARqMTLy.mjs} +1 -1
  30. package/dist/mod.cjs +5 -5
  31. package/dist/mod.js +5 -5
  32. package/dist/nodeinfo/client.test.mjs +61 -1
  33. package/dist/nodeinfo/handler.test.mjs +1 -1
  34. package/dist/nodeinfo/mod.cjs +1 -1
  35. package/dist/nodeinfo/mod.js +1 -1
  36. package/dist/{owner-Vcjlj9bu.mjs → owner-L-WR8x4T.mjs} +2 -2
  37. package/dist/{proof-ZrhGR6j9.cjs → proof-BxcoCp99.cjs} +1 -1
  38. package/dist/{proof-BjCuYLSJ.js → proof-C6AzSnQ-.js} +1 -1
  39. package/dist/{proof-BGKiZBbr.mjs → proof-D8CQqyYl.mjs} +2 -2
  40. package/dist/{send-D8h5fYFB.mjs → send-D4OpM7t7.mjs} +2 -2
  41. package/dist/sig/http.test.mjs +2 -2
  42. package/dist/sig/key.test.mjs +1 -1
  43. package/dist/sig/ld.test.mjs +2 -2
  44. package/dist/sig/mod.cjs +2 -2
  45. package/dist/sig/mod.js +2 -2
  46. package/dist/sig/owner.test.mjs +1 -1
  47. package/dist/sig/proof.test.mjs +1 -1
  48. package/dist/{temporal-CGP_GCdL.mjs → temporal-CduMXjXl.mjs} +1 -1
  49. package/dist/{types-CAY3OdLq.js → types-DTONwNqL.js} +63 -5
  50. package/dist/{types-KC4QAoxe.cjs → types-m8u9L86X.cjs} +62 -4
  51. package/dist/utils/docloader.test.mjs +2 -2
  52. package/dist/utils/mod.cjs +1 -1
  53. package/dist/utils/mod.js +1 -1
  54. package/package.json +5 -5
@@ -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-SeF9Kbof.mjs";
5
+ import { n as version, t as name } from "./deno-Duj5q741.mjs";
6
6
  import { t as formatAcceptSignature } from "./accept-Dd__NiUL.mjs";
7
- import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-DELVYrDs.mjs";
8
- import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-vr3aQ7jg.mjs";
9
- import { t as getAuthenticatedDocumentLoader } from "./docloader-20Uxx-BW.mjs";
7
+ import { a as importJwk, o as validateCryptoKey, t as exportJwk } from "./key-D-UlhG0h.mjs";
8
+ import { l as verifyRequest, o as parseRfc9421SignatureInput, u as verifyRequestDetailed } from "./http-BpDVph0H.mjs";
9
+ import { t as getAuthenticatedDocumentLoader } from "./docloader-CARF375t.mjs";
10
10
  import { n as kvCache } from "./kv-cache-FsT1ljhs.mjs";
11
- import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-C30fjlVq.mjs";
12
- import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-Vcjlj9bu.mjs";
13
- import { n as signObject, r as verifyObject } from "./proof-BGKiZBbr.mjs";
14
- import { t as getNodeInfo } from "./client-DEpOVgY1.mjs";
11
+ import { a as compactJsonLd, c as getNormalizationContextLoader, d as isInvalidUrlTypeError, f as signJsonLd, g as wrapContextLoaderForJsonLd, l as hasSignature, p as verifyCompactJsonLd, r as assertSafeJsonLd, s as detachSignature, t as InvalidContextReferenceError, u as isClearlyMalformedContextReference } from "./ld-DI-vkRtz.mjs";
12
+ import { n as getKeyOwner, t as doesActorOwnKey } from "./owner-L-WR8x4T.mjs";
13
+ import { n as signObject, r as verifyObject } from "./proof-D8CQqyYl.mjs";
14
+ import { t as getNodeInfo } from "./client-CZWLyLmp.mjs";
15
15
  import { t as nodeInfoToJson } from "./types-DCP0WLdt.mjs";
16
- import { n as routeActivity } from "./inbox-Bgd66bvQ.mjs";
17
- import { t as FederationBuilderImpl } from "./builder-DUQXHENg.mjs";
16
+ import { n as routeActivity } from "./inbox-B6MZcCLE.mjs";
17
+ import { t as FederationBuilderImpl } from "./builder-DCXx9nNs.mjs";
18
18
  import { t as buildCollectionSynchronizationHeader } from "./collection-BD6-SZ6O.mjs";
19
19
  import { t as KvKeyCache } from "./keycache-CCSwkQcY.mjs";
20
20
  import { t as acceptsJsonLd } from "./negotiation-DnsfFF8I.mjs";
21
- import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CGP_GCdL.mjs";
21
+ import { t as hasMalformedKnownTemporalLiteral } from "./temporal-CduMXjXl.mjs";
22
22
  import { t as createExponentialBackoffPolicy } from "./retry-CJL0poaU.mjs";
23
- import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-D8h5fYFB.mjs";
23
+ import { n as extractInboxes, r as sendActivity, t as SendActivityError } from "./send-D4OpM7t7.mjs";
24
24
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
25
25
  import { lookupWebFinger } from "@fedify/webfinger";
26
26
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -1349,6 +1349,24 @@ const logger = getLogger([
1349
1349
  "webfinger",
1350
1350
  "server"
1351
1351
  ]);
1352
+ function getWebFingerSubjectAndAliases({ resourceUrl, actorUri, preferredUsername, acctUsername, host, contextHost }) {
1353
+ const aliases = [];
1354
+ let subject = resourceUrl.href;
1355
+ if (resourceUrl.protocol != "acct:" && preferredUsername != null) {
1356
+ aliases.push(`acct:${preferredUsername}@${host ?? contextHost}`);
1357
+ if (host != null && host !== contextHost) aliases.push(`acct:${preferredUsername}@${contextHost}`);
1358
+ }
1359
+ if (resourceUrl.href !== actorUri.href) aliases.push(actorUri.href);
1360
+ if (resourceUrl.protocol === "acct:" && host != null && host !== contextHost && !resourceUrl.href.endsWith(`@${host}`)) {
1361
+ subject = `acct:${preferredUsername ?? acctUsername}@${host}`;
1362
+ aliases.push(resourceUrl.href);
1363
+ if (preferredUsername != null && preferredUsername !== "" && preferredUsername !== acctUsername) aliases.push(`acct:${preferredUsername}@${contextHost}`);
1364
+ }
1365
+ return {
1366
+ subject,
1367
+ aliases
1368
+ };
1369
+ }
1352
1370
  /**
1353
1371
  * Handles a WebFinger request. You would not typically call this function
1354
1372
  * directly, but instead use {@link Federation.fetch} method.
@@ -1403,6 +1421,7 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
1403
1421
  return identifier;
1404
1422
  }
1405
1423
  let identifier = null;
1424
+ let acctUsername = null;
1406
1425
  const uriParsed = context.parseUri(resourceUrl);
1407
1426
  if (uriParsed?.type != "actor") {
1408
1427
  const match = /^acct:([^@]+)@([^@]+)$/.exec(resource);
@@ -1416,8 +1435,9 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
1416
1435
  const normalizedHost = portMatch == null ? domainToASCII(match[2].toLowerCase()) : domainToASCII(match[2].substring(0, portMatch.index).toLowerCase()) + portMatch[0];
1417
1436
  if (normalizedHost != context.url.host && normalizedHost != host) return await onNotFound(request);
1418
1437
  else {
1419
- identifier = await mapUsernameToIdentifier(match[1]);
1420
- resourceUrl = new URL(`acct:${match[1]}@${normalizedHost}`);
1438
+ acctUsername = match[1];
1439
+ identifier = await mapUsernameToIdentifier(acctUsername);
1440
+ resourceUrl = new URL(`acct:${acctUsername}@${normalizedHost}`);
1421
1441
  }
1422
1442
  }
1423
1443
  } else identifier = uriParsed.identifier;
@@ -1427,9 +1447,10 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
1427
1447
  logger.error("Actor {identifier} not found.", { identifier });
1428
1448
  return await onNotFound(request);
1429
1449
  }
1450
+ const actorUri = context.getActorUri(identifier);
1430
1451
  const links = [{
1431
1452
  rel: "self",
1432
- href: context.getActorUri(identifier).href,
1453
+ href: actorUri.href,
1433
1454
  type: "application/activity+json"
1434
1455
  }];
1435
1456
  for (const url of actor.urls) if (url instanceof Link && url.href != null) links.push({
@@ -1453,22 +1474,19 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
1453
1474
  const customLinks = await webFingerLinksDispatcher(context, resourceUrl);
1454
1475
  if (customLinks != null) for (const link of customLinks) links.push(link);
1455
1476
  }
1456
- const aliases = [];
1457
- if (resourceUrl.protocol != "acct:" && actor.preferredUsername != null) {
1458
- aliases.push(`acct:${actor.preferredUsername}@${host ?? context.url.host}`);
1459
- if (host != null && host !== context.url.host) aliases.push(`acct:${actor.preferredUsername}@${context.url.host}`);
1460
- }
1461
- if (resourceUrl.href !== context.getActorUri(identifier).href) aliases.push(context.getActorUri(identifier).href);
1462
- if (resourceUrl.protocol === "acct:" && host != null && host !== context.url.host && !resourceUrl.href.endsWith(`@${host}`)) {
1463
- const username = resourceUrl.href.replace(/^acct:/, "").replace(/@.*$/, "");
1464
- aliases.push(`acct:${username}@${host}`);
1465
- }
1466
- const jrd = {
1467
- subject: resourceUrl.href,
1477
+ const { subject, aliases } = getWebFingerSubjectAndAliases({
1478
+ resourceUrl,
1479
+ actorUri,
1480
+ preferredUsername: actor.preferredUsername,
1481
+ acctUsername,
1482
+ host,
1483
+ contextHost: context.url.host
1484
+ });
1485
+ return new Response(JSON.stringify({
1486
+ subject,
1468
1487
  aliases,
1469
1488
  links
1470
- };
1471
- return new Response(JSON.stringify(jrd), { headers: {
1489
+ }), { headers: {
1472
1490
  "Content-Type": "application/jrd+json",
1473
1491
  "Access-Control-Allow-Origin": "*"
1474
1492
  } });
@@ -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-CfvlmuBy.cjs");
3
+ const require_middleware = require("./middleware-FKcaUo12.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 { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-D11iWbgC.js";
6
- import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-BjCuYLSJ.js";
7
- import { n as getNodeInfo, t as nodeInfoToJson } from "./types-CAY3OdLq.js";
8
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BPr4KawB.js";
5
+ import { _ as version, a as verifyRequestDetailed, d as validateCryptoKey, f as formatAcceptSignature, g as name, i as verifyRequest, n as parseRfc9421SignatureInput, o as exportJwk, t as doubleKnock, u as importJwk } from "./http-DJVliVm5.js";
6
+ import { _ as signJsonLd, a as doesActorOwnKey, c as assertSafeJsonLd, f as detachSignature, g as isInvalidUrlTypeError, h as isClearlyMalformedContextReference, m as hasSignature, n as signObject, o as getKeyOwner, p as getNormalizationContextLoader, r as verifyObject, s as InvalidContextReferenceError, u as compactJsonLd, v as verifyCompactJsonLd, x as wrapContextLoaderForJsonLd } from "./proof-C6AzSnQ-.js";
7
+ import { n as getNodeInfo, t as nodeInfoToJson } from "./types-DTONwNqL.js";
8
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Byc1cbqT.js";
9
9
  import { getLogger, withContext } from "@logtape/logtape";
10
10
  import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId, lookupObject, traverseCollection } from "@fedify/vocab";
11
11
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -346,6 +346,8 @@ var FederationBuilderImpl = class {
346
346
  f.webFingerLinksDispatcher = this.webFingerLinksDispatcher;
347
347
  f.objectCallbacks = { ...this.objectCallbacks };
348
348
  f.objectTypeIds = { ...this.objectTypeIds };
349
+ f.collectionCallbacks = { ...this.collectionCallbacks };
350
+ f.collectionTypeIds = { ...this.collectionTypeIds };
349
351
  f.inboxPath = this.inboxPath;
350
352
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
351
353
  f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
@@ -2547,6 +2549,24 @@ const logger = getLogger([
2547
2549
  "webfinger",
2548
2550
  "server"
2549
2551
  ]);
2552
+ function getWebFingerSubjectAndAliases({ resourceUrl, actorUri, preferredUsername, acctUsername, host, contextHost }) {
2553
+ const aliases = [];
2554
+ let subject = resourceUrl.href;
2555
+ if (resourceUrl.protocol != "acct:" && preferredUsername != null) {
2556
+ aliases.push(`acct:${preferredUsername}@${host ?? contextHost}`);
2557
+ if (host != null && host !== contextHost) aliases.push(`acct:${preferredUsername}@${contextHost}`);
2558
+ }
2559
+ if (resourceUrl.href !== actorUri.href) aliases.push(actorUri.href);
2560
+ if (resourceUrl.protocol === "acct:" && host != null && host !== contextHost && !resourceUrl.href.endsWith(`@${host}`)) {
2561
+ subject = `acct:${preferredUsername ?? acctUsername}@${host}`;
2562
+ aliases.push(resourceUrl.href);
2563
+ if (preferredUsername != null && preferredUsername !== "" && preferredUsername !== acctUsername) aliases.push(`acct:${preferredUsername}@${contextHost}`);
2564
+ }
2565
+ return {
2566
+ subject,
2567
+ aliases
2568
+ };
2569
+ }
2550
2570
  /**
2551
2571
  * Handles a WebFinger request. You would not typically call this function
2552
2572
  * directly, but instead use {@link Federation.fetch} method.
@@ -2601,6 +2621,7 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2601
2621
  return identifier;
2602
2622
  }
2603
2623
  let identifier = null;
2624
+ let acctUsername = null;
2604
2625
  const uriParsed = context.parseUri(resourceUrl);
2605
2626
  if (uriParsed?.type != "actor") {
2606
2627
  const match = /^acct:([^@]+)@([^@]+)$/.exec(resource);
@@ -2614,8 +2635,9 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2614
2635
  const normalizedHost = portMatch == null ? domainToASCII(match[2].toLowerCase()) : domainToASCII(match[2].substring(0, portMatch.index).toLowerCase()) + portMatch[0];
2615
2636
  if (normalizedHost != context.url.host && normalizedHost != host) return await onNotFound(request);
2616
2637
  else {
2617
- identifier = await mapUsernameToIdentifier(match[1]);
2618
- resourceUrl = new URL(`acct:${match[1]}@${normalizedHost}`);
2638
+ acctUsername = match[1];
2639
+ identifier = await mapUsernameToIdentifier(acctUsername);
2640
+ resourceUrl = new URL(`acct:${acctUsername}@${normalizedHost}`);
2619
2641
  }
2620
2642
  }
2621
2643
  } else identifier = uriParsed.identifier;
@@ -2625,9 +2647,10 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2625
2647
  logger.error("Actor {identifier} not found.", { identifier });
2626
2648
  return await onNotFound(request);
2627
2649
  }
2650
+ const actorUri = context.getActorUri(identifier);
2628
2651
  const links = [{
2629
2652
  rel: "self",
2630
- href: context.getActorUri(identifier).href,
2653
+ href: actorUri.href,
2631
2654
  type: "application/activity+json"
2632
2655
  }];
2633
2656
  for (const url of actor.urls) if (url instanceof Link && url.href != null) links.push({
@@ -2651,22 +2674,19 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2651
2674
  const customLinks = await webFingerLinksDispatcher(context, resourceUrl);
2652
2675
  if (customLinks != null) for (const link of customLinks) links.push(link);
2653
2676
  }
2654
- const aliases = [];
2655
- if (resourceUrl.protocol != "acct:" && actor.preferredUsername != null) {
2656
- aliases.push(`acct:${actor.preferredUsername}@${host ?? context.url.host}`);
2657
- if (host != null && host !== context.url.host) aliases.push(`acct:${actor.preferredUsername}@${context.url.host}`);
2658
- }
2659
- if (resourceUrl.href !== context.getActorUri(identifier).href) aliases.push(context.getActorUri(identifier).href);
2660
- if (resourceUrl.protocol === "acct:" && host != null && host !== context.url.host && !resourceUrl.href.endsWith(`@${host}`)) {
2661
- const username = resourceUrl.href.replace(/^acct:/, "").replace(/@.*$/, "");
2662
- aliases.push(`acct:${username}@${host}`);
2663
- }
2664
- const jrd = {
2665
- subject: resourceUrl.href,
2677
+ const { subject, aliases } = getWebFingerSubjectAndAliases({
2678
+ resourceUrl,
2679
+ actorUri,
2680
+ preferredUsername: actor.preferredUsername,
2681
+ acctUsername,
2682
+ host,
2683
+ contextHost: context.url.host
2684
+ });
2685
+ return new Response(JSON.stringify({
2686
+ subject,
2666
2687
  aliases,
2667
2688
  links
2668
- };
2669
- return new Response(JSON.stringify(jrd), { headers: {
2689
+ }), { headers: {
2670
2690
  "Content-Type": "application/jrd+json",
2671
2691
  "Access-Control-Allow-Origin": "*"
2672
2692
  } });
@@ -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-BVFDfPaf.cjs");
6
- const require_proof = require("./proof-ZrhGR6j9.cjs");
7
- const require_types = require("./types-KC4QAoxe.cjs");
8
- const require_kv_cache = require("./kv-cache-BsvJXj0K.cjs");
5
+ const require_http = require("./http-DV9BSPH6.cjs");
6
+ const require_proof = require("./proof-BxcoCp99.cjs");
7
+ const require_types = require("./types-m8u9L86X.cjs");
8
+ const require_kv_cache = require("./kv-cache-CktLjvI-.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");
@@ -336,7 +336,7 @@ var FederationBuilderImpl = class {
336
336
  this.collectionTypeIds = {};
337
337
  }
338
338
  async build(options) {
339
- const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-DTBJWxr0.cjs"));
339
+ const { FederationImpl } = await Promise.resolve().then(() => require("./middleware-CfV7L21b.cjs"));
340
340
  const f = new FederationImpl(options);
341
341
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
342
342
  f.router = this.router.clone();
@@ -347,6 +347,8 @@ var FederationBuilderImpl = class {
347
347
  f.webFingerLinksDispatcher = this.webFingerLinksDispatcher;
348
348
  f.objectCallbacks = { ...this.objectCallbacks };
349
349
  f.objectTypeIds = { ...this.objectTypeIds };
350
+ f.collectionCallbacks = { ...this.collectionCallbacks };
351
+ f.collectionTypeIds = { ...this.collectionTypeIds };
350
352
  f.inboxPath = this.inboxPath;
351
353
  f.inboxCallbacks = this.inboxCallbacks == null ? void 0 : { ...this.inboxCallbacks };
352
354
  f.outboxCallbacks = this.outboxCallbacks == null ? void 0 : { ...this.outboxCallbacks };
@@ -2548,6 +2550,24 @@ const logger = (0, _logtape_logtape.getLogger)([
2548
2550
  "webfinger",
2549
2551
  "server"
2550
2552
  ]);
2553
+ function getWebFingerSubjectAndAliases({ resourceUrl, actorUri, preferredUsername, acctUsername, host, contextHost }) {
2554
+ const aliases = [];
2555
+ let subject = resourceUrl.href;
2556
+ if (resourceUrl.protocol != "acct:" && preferredUsername != null) {
2557
+ aliases.push(`acct:${preferredUsername}@${host ?? contextHost}`);
2558
+ if (host != null && host !== contextHost) aliases.push(`acct:${preferredUsername}@${contextHost}`);
2559
+ }
2560
+ if (resourceUrl.href !== actorUri.href) aliases.push(actorUri.href);
2561
+ if (resourceUrl.protocol === "acct:" && host != null && host !== contextHost && !resourceUrl.href.endsWith(`@${host}`)) {
2562
+ subject = `acct:${preferredUsername ?? acctUsername}@${host}`;
2563
+ aliases.push(resourceUrl.href);
2564
+ if (preferredUsername != null && preferredUsername !== "" && preferredUsername !== acctUsername) aliases.push(`acct:${preferredUsername}@${contextHost}`);
2565
+ }
2566
+ return {
2567
+ subject,
2568
+ aliases
2569
+ };
2570
+ }
2551
2571
  /**
2552
2572
  * Handles a WebFinger request. You would not typically call this function
2553
2573
  * directly, but instead use {@link Federation.fetch} method.
@@ -2602,6 +2622,7 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2602
2622
  return identifier;
2603
2623
  }
2604
2624
  let identifier = null;
2625
+ let acctUsername = null;
2605
2626
  const uriParsed = context.parseUri(resourceUrl);
2606
2627
  if (uriParsed?.type != "actor") {
2607
2628
  const match = /^acct:([^@]+)@([^@]+)$/.exec(resource);
@@ -2615,8 +2636,9 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2615
2636
  const normalizedHost = portMatch == null ? (0, node_url.domainToASCII)(match[2].toLowerCase()) : (0, node_url.domainToASCII)(match[2].substring(0, portMatch.index).toLowerCase()) + portMatch[0];
2616
2637
  if (normalizedHost != context.url.host && normalizedHost != host) return await onNotFound(request);
2617
2638
  else {
2618
- identifier = await mapUsernameToIdentifier(match[1]);
2619
- resourceUrl = new URL(`acct:${match[1]}@${normalizedHost}`);
2639
+ acctUsername = match[1];
2640
+ identifier = await mapUsernameToIdentifier(acctUsername);
2641
+ resourceUrl = new URL(`acct:${acctUsername}@${normalizedHost}`);
2620
2642
  }
2621
2643
  }
2622
2644
  } else identifier = uriParsed.identifier;
@@ -2626,9 +2648,10 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2626
2648
  logger.error("Actor {identifier} not found.", { identifier });
2627
2649
  return await onNotFound(request);
2628
2650
  }
2651
+ const actorUri = context.getActorUri(identifier);
2629
2652
  const links = [{
2630
2653
  rel: "self",
2631
- href: context.getActorUri(identifier).href,
2654
+ href: actorUri.href,
2632
2655
  type: "application/activity+json"
2633
2656
  }];
2634
2657
  for (const url of actor.urls) if (url instanceof _fedify_vocab.Link && url.href != null) links.push({
@@ -2652,22 +2675,19 @@ async function handleWebFingerInternal(request, { context, host, actorDispatcher
2652
2675
  const customLinks = await webFingerLinksDispatcher(context, resourceUrl);
2653
2676
  if (customLinks != null) for (const link of customLinks) links.push(link);
2654
2677
  }
2655
- const aliases = [];
2656
- if (resourceUrl.protocol != "acct:" && actor.preferredUsername != null) {
2657
- aliases.push(`acct:${actor.preferredUsername}@${host ?? context.url.host}`);
2658
- if (host != null && host !== context.url.host) aliases.push(`acct:${actor.preferredUsername}@${context.url.host}`);
2659
- }
2660
- if (resourceUrl.href !== context.getActorUri(identifier).href) aliases.push(context.getActorUri(identifier).href);
2661
- if (resourceUrl.protocol === "acct:" && host != null && host !== context.url.host && !resourceUrl.href.endsWith(`@${host}`)) {
2662
- const username = resourceUrl.href.replace(/^acct:/, "").replace(/@.*$/, "");
2663
- aliases.push(`acct:${username}@${host}`);
2664
- }
2665
- const jrd = {
2666
- subject: resourceUrl.href,
2678
+ const { subject, aliases } = getWebFingerSubjectAndAliases({
2679
+ resourceUrl,
2680
+ actorUri,
2681
+ preferredUsername: actor.preferredUsername,
2682
+ acctUsername,
2683
+ host,
2684
+ contextHost: context.url.host
2685
+ });
2686
+ return new Response(JSON.stringify({
2687
+ subject,
2667
2688
  aliases,
2668
2689
  links
2669
- };
2670
- return new Response(JSON.stringify(jrd), { headers: {
2690
+ }), { headers: {
2671
2691
  "Content-Type": "application/jrd+json",
2672
2692
  "Access-Control-Allow-Origin": "*"
2673
2693
  } });
@@ -1,5 +1,5 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as FederationImpl } from "./middleware-X3Wj8cQj.mjs";
4
+ import { n as FederationImpl } from "./middleware-6xCmJ0Cg.mjs";
5
5
  export { FederationImpl };
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-BVFDfPaf.cjs");
8
- const require_middleware = require("./middleware-CfvlmuBy.cjs");
9
- const require_proof = require("./proof-ZrhGR6j9.cjs");
10
- const require_types = require("./types-KC4QAoxe.cjs");
11
- const require_kv_cache = require("./kv-cache-BsvJXj0K.cjs");
7
+ const require_http = require("./http-DV9BSPH6.cjs");
8
+ const require_middleware = require("./middleware-FKcaUo12.cjs");
9
+ const require_proof = require("./proof-BxcoCp99.cjs");
10
+ const require_types = require("./types-m8u9L86X.cjs");
11
+ const require_kv_cache = require("./kv-cache-CktLjvI-.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 { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-D11iWbgC.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-CLHlFIpA.js";
8
- import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-BjCuYLSJ.js";
9
- import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-CAY3OdLq.js";
10
- import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-BPr4KawB.js";
6
+ import { a as verifyRequestDetailed, c as fetchKeyDetailed, f as formatAcceptSignature, h as validateAcceptSignature, i as verifyRequest, l as generateCryptoKeyPair, m as parseAcceptSignature, o as exportJwk, p as fulfillAcceptSignature, r as signRequest, s as fetchKey, u as importJwk } from "./http-DJVliVm5.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-DlLhm6b5.js";
8
+ import { _ as signJsonLd, a as doesActorOwnKey, b as verifySignature, d as createSignature, f as detachSignature, i as verifyProof, l as attachSignature, n as signObject, o as getKeyOwner, r as verifyObject, t as createProof, y as verifyJsonLd } from "./proof-C6AzSnQ-.js";
9
+ import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "./types-DTONwNqL.js";
10
+ import { n as getAuthenticatedDocumentLoader, t as kvCache } from "./kv-cache-Byc1cbqT.js";
11
11
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation/mod.js";
12
12
  import "./nodeinfo/mod.js";
13
13
  import "./runtime/mod.js";
@@ -4,7 +4,7 @@ globalThis.addEventListener = () => {};
4
4
  import { t as esm_default } from "../esm-DVILvP5e.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-Duiq_YC9.mjs";
7
- import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-DEpOVgY1.mjs";
7
+ import { a as parseProtocol, c as parseUsage, i as parseOutboundService, n as parseInboundService, o as parseServices, r as parseNodeInfo, s as parseSoftware, t as getNodeInfo } from "../client-CZWLyLmp.mjs";
8
8
  import { test } from "@fedify/fixture";
9
9
  //#region src/nodeinfo/client.test.ts
10
10
  test("getNodeInfo()", async (t) => {
@@ -62,6 +62,66 @@ test("getNodeInfo()", async (t) => {
62
62
  });
63
63
  esm_default.hardReset();
64
64
  });
65
+ test("getNodeInfo() blocks SSRF", async (t) => {
66
+ esm_default.spyGlobal();
67
+ await t.step("link href pointing to a loopback address", async () => {
68
+ esm_default.removeRoutes();
69
+ esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
70
+ rel: "http://nodeinfo.diaspora.software/ns/schema/2.1",
71
+ href: "http://127.0.0.1:8080/internal"
72
+ }] } });
73
+ let internalFetched = false;
74
+ esm_default.get("http://127.0.0.1:8080/internal", () => {
75
+ internalFetched = true;
76
+ return { body: { secret: "INTERNAL_DATA_LEAKED" } };
77
+ });
78
+ assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
79
+ assertEquals(internalFetched, false);
80
+ });
81
+ await t.step("link href using a data: URL", async () => {
82
+ esm_default.removeRoutes();
83
+ esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
84
+ rel: "http://nodeinfo.diaspora.software/ns/schema/2.0",
85
+ href: "data:application/json,{\"software\":{\"name\":\"x\"}}"
86
+ }] } });
87
+ assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
88
+ });
89
+ await t.step("redirect to a private address", async () => {
90
+ esm_default.removeRoutes();
91
+ esm_default.get("https://example.com/.well-known/nodeinfo", { body: { links: [{
92
+ rel: "http://nodeinfo.diaspora.software/ns/schema/2.1",
93
+ href: "https://example.com/nodeinfo/2.1"
94
+ }] } });
95
+ esm_default.get("https://example.com/nodeinfo/2.1", {
96
+ status: 302,
97
+ headers: { Location: "https://127.0.0.1:8080/internal" }
98
+ });
99
+ let internalFetched = false;
100
+ esm_default.get("https://127.0.0.1:8080/internal", () => {
101
+ internalFetched = true;
102
+ return { body: { secret: "INTERNAL_DATA_LEAKED" } };
103
+ });
104
+ assertEquals(await getNodeInfo("https://example.com/", { parse: "none" }), void 0);
105
+ assertEquals(internalFetched, false);
106
+ });
107
+ await t.step("direct fetch of a private address", async () => {
108
+ esm_default.removeRoutes();
109
+ let internalFetched = false;
110
+ esm_default.get("http://127.0.0.1:8080/nodeinfo", () => {
111
+ internalFetched = true;
112
+ return { body: { software: {
113
+ name: "x",
114
+ version: "1.0.0"
115
+ } } };
116
+ });
117
+ assertEquals(await getNodeInfo("http://127.0.0.1:8080/nodeinfo", {
118
+ direct: true,
119
+ parse: "none"
120
+ }), void 0);
121
+ assertEquals(internalFetched, false);
122
+ });
123
+ esm_default.hardReset();
124
+ });
65
125
  test("parseNodeInfo()", () => {
66
126
  const input = {
67
127
  software: {
@@ -5,7 +5,7 @@ import { n as createRequestContext } from "../context-Juj6bdHC.mjs";
5
5
  import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
6
6
  import "../std__assert-Duiq_YC9.mjs";
7
7
  import { t as MemoryKvStore } from "../kv-tL2TOE9X.mjs";
8
- import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-X3Wj8cQj.mjs";
8
+ import { a as createFederation, h as handleNodeInfoJrd, m as handleNodeInfo } from "../middleware-6xCmJ0Cg.mjs";
9
9
  import { test } from "@fedify/fixture";
10
10
  //#region src/nodeinfo/handler.test.ts
11
11
  test("handleNodeInfo()", async () => {
@@ -1,7 +1,7 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_types = require("../types-KC4QAoxe.cjs");
4
+ const require_types = require("../types-m8u9L86X.cjs");
5
5
  exports.getNodeInfo = require_types.getNodeInfo;
6
6
  exports.nodeInfoToJson = require_types.nodeInfoToJson;
7
7
  exports.parseNodeInfo = require_types.parseNodeInfo;
@@ -1,4 +1,4 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "../types-CAY3OdLq.js";
3
+ import { n as getNodeInfo, r as parseNodeInfo, t as nodeInfoToJson } from "../types-DTONwNqL.js";
4
4
  export { getNodeInfo, nodeInfoToJson, parseNodeInfo };
@@ -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-SeF9Kbof.mjs";
5
- import "./key-DELVYrDs.mjs";
4
+ import { n as version, t as name } from "./deno-Duj5q741.mjs";
5
+ import "./key-D-UlhG0h.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,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-BVFDfPaf.cjs");
4
+ const require_http = require("./http-DV9BSPH6.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,6 +1,6 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
- import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-D11iWbgC.js";
3
+ import { _ as version, d as validateCryptoKey, g as name, s as fetchKey } from "./http-DJVliVm5.js";
4
4
  import { getLogger } from "@logtape/logtape";
5
5
  import { Activity, CryptographicKey, DataIntegrityProof, Multikey, Object as Object$1, getTypeId, isActor } from "@fedify/vocab";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@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-SeF9Kbof.mjs";
5
- import { n as fetchKey, o as validateCryptoKey } from "./key-DELVYrDs.mjs";
4
+ import { n as version, t as name } from "./deno-Duj5q741.mjs";
5
+ import { n as fetchKey, o as validateCryptoKey } from "./key-D-UlhG0h.mjs";
6
6
  import { Activity, DataIntegrityProof, Multikey, getTypeId } from "@fedify/vocab";
7
7
  import { SpanStatusCode, trace } from "@opentelemetry/api";
8
8
  import { getLogger } from "@logtape/logtape";
@@ -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-SeF9Kbof.mjs";
5
- import { n as doubleKnock } from "./http-vr3aQ7jg.mjs";
4
+ import { n as version, t as name } from "./deno-Duj5q741.mjs";
5
+ import { n as doubleKnock } from "./http-BpDVph0H.mjs";
6
6
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  //#region src/federation/send.ts
@@ -7,8 +7,8 @@ import { a as assertExists, t as assertStringIncludes } from "../std__assert-Dui
7
7
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
8
8
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
9
9
  import { t as assert } from "../assert-ddO5KLpe.mjs";
10
- import { t as exportJwk } from "../key-DELVYrDs.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-vr3aQ7jg.mjs";
10
+ import { t as exportJwk } from "../key-D-UlhG0h.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-BpDVph0H.mjs";
12
12
  import { i as rsaPrivateKey2, l as rsaPublicKey5, o as rsaPublicKey1, s as rsaPublicKey2 } from "../keys-BAK-tUlf.mjs";
13
13
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
14
14
  import { FetchError, exportSpki } from "@fedify/vocab-runtime";
@@ -5,7 +5,7 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import "../std__assert-Duiq_YC9.mjs";
6
6
  import { t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
7
7
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
8
- import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-DELVYrDs.mjs";
8
+ import { a as importJwk, i as generateCryptoKeyPair, n as fetchKey, o as validateCryptoKey, r as fetchKeyDetailed, t as exportJwk } from "../key-D-UlhG0h.mjs";
9
9
  import { c as rsaPublicKey3, i as rsaPrivateKey2, o as rsaPublicKey1, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
10
10
  import { createTestTracerProvider, mockDocumentLoader, test } from "@fedify/fixture";
11
11
  import { CryptographicKey, Multikey } from "@fedify/vocab";
@@ -5,9 +5,9 @@ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
5
  import { n as assertFalse, t as assertRejects } from "../assert_rejects-B-qJtC9Z.mjs";
6
6
  import { t as assertThrows } from "../assert_throws-4NwKEy2q.mjs";
7
7
  import { t as assert } from "../assert-ddO5KLpe.mjs";
8
- import { i as generateCryptoKeyPair } from "../key-DELVYrDs.mjs";
8
+ import { i as generateCryptoKeyPair } from "../key-D-UlhG0h.mjs";
9
9
  import { a as rsaPrivateKey3, c as rsaPublicKey3, i as rsaPrivateKey2, n as ed25519PrivateKey, s as rsaPublicKey2, t as ed25519Multikey } from "../keys-BAK-tUlf.mjs";
10
- import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-C30fjlVq.mjs";
10
+ import { a as compactJsonLd, d as isInvalidUrlTypeError, f as signJsonLd, h as verifySignature, i as attachSignature, m as verifyJsonLd, n as UnsafeJsonLdError, o as createSignature, s as detachSignature } from "../ld-DI-vkRtz.mjs";
11
11
  import { mockDocumentLoader, test } from "@fedify/fixture";
12
12
  import { CryptographicKey } from "@fedify/vocab";
13
13
  import { encodeBase64 } from "byte-encodings/base64";
package/dist/sig/mod.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  const { Temporal } = require("@js-temporal/polyfill");
2
2
  const { URLPattern } = require("urlpattern-polyfill");
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
- const require_http = require("../http-BVFDfPaf.cjs");
5
- const require_proof = require("../proof-ZrhGR6j9.cjs");
4
+ const require_http = require("../http-DV9BSPH6.cjs");
5
+ const require_proof = require("../proof-BxcoCp99.cjs");
6
6
  exports.attachSignature = require_proof.attachSignature;
7
7
  exports.createProof = require_proof.createProof;
8
8
  exports.createSignature = require_proof.createSignature;