@fedify/fedify 1.8.1-pr.328.1165 → 1.8.1-pr.329.1205

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 (102) hide show
  1. package/README.md +1 -4
  2. package/dist/{actor-BvUN9QgD.js → actor-BR3M3Bg3.js} +179 -179
  3. package/dist/{actor-6WfgEEM7.js → actor-CMQ_Gxax.js} +4 -1
  4. package/dist/{assert_rejects-AjlKk-Vo.js → assert_rejects-DceVjUlD.js} +1 -1
  5. package/dist/{assert_throws-CqMKbTh_.js → assert_throws-DTDC_gwN.js} +1 -1
  6. package/dist/{authdocloader-BxpW2l0x.js → authdocloader-AvrLkCka.js} +3 -3
  7. package/dist/{authdocloader-DlQKiAuj.js → authdocloader-CNt1UkcL.js} +4 -3
  8. package/dist/{builder-Bql0U6IX.js → builder-ZewotViE.js} +5 -4
  9. package/dist/chunk-HsBuZ-b2.js +41 -0
  10. package/dist/{client-CI4TcEtW.js → client-C2F5RZOv.js} +2 -2
  11. package/dist/compat/transformers.test.js +27 -20
  12. package/dist/context-Cc5Prh-p.js +108 -0
  13. package/dist/docloader-09nVWLAZ.js +68 -0
  14. package/dist/{docloader-B6dtEu0e.js → docloader-DaZu_7K2.js} +1 -2
  15. package/dist/docloader-Dj3ESYni.js +4526 -0
  16. package/dist/{esm-80CEOYyg.js → esm-d-9EVGaP.js} +1 -1
  17. package/dist/federation/builder.test.js +16 -11
  18. package/dist/federation/collection.test.js +7 -9
  19. package/dist/federation/handler.test.js +35 -26
  20. package/dist/federation/inbox.test.js +10 -6
  21. package/dist/federation/keycache.test.js +7 -4
  22. package/dist/federation/kv.test.js +6 -8
  23. package/dist/federation/middleware.test.js +35 -27
  24. package/dist/federation/mod.js +10 -10
  25. package/dist/federation/mq.test.js +8 -10
  26. package/dist/federation/retry.test.js +3 -5
  27. package/dist/federation/router.test.js +7 -8
  28. package/dist/federation/send.test.js +21 -15
  29. package/dist/{http-Cdm4poZb.js → http-3Bbxlpky.js} +3 -2
  30. package/dist/{http-epXQkoos.js → http-D3F6HGUu.js} +3 -3
  31. package/dist/{inbox-ClBcgVPg.js → inbox-DKd5F3DT.js} +3 -1
  32. package/dist/{key-Cl_Xlkrv.js → key-BcO5OTYc.js} +2 -2
  33. package/dist/{key-B2Vg4tVB.js → key-BduQHf38.js} +4 -4
  34. package/dist/key-DwQrog_Y.js +16 -0
  35. package/dist/{key-D2T-GDYd.js → key-wb9EWpSb.js} +3 -2
  36. package/dist/{keycache-M-zWLLCU.js → keycache-DnA7Ub23.js} +1 -1
  37. package/dist/{keys-qx88le-G.js → keys-BRV40NP0.js} +1 -1
  38. package/dist/langstr-DbWheeIS.js +33 -0
  39. package/dist/{ld-ZkyR7ab4.js → ld-viIK1KF8.js} +4 -2
  40. package/dist/{lookup-BlMMBOS2.js → lookup-B21lQ9pb.js} +1 -1
  41. package/dist/{lookup-BH2SgpoS.js → lookup-B9AWrAUf.js} +6 -113
  42. package/dist/lookup-sc6ms_6o.js +132 -0
  43. package/dist/{middleware-0TQ_tx1T.js → middleware-BSmfCdQG.js} +21 -17
  44. package/dist/middleware-C6bO8pt_.js +17 -0
  45. package/dist/middleware-CavVW6ka.js +33 -0
  46. package/dist/{middleware-Cye6GERQ.js → middleware-y21POb8Y.js} +11 -11
  47. package/dist/mod.js +10 -10
  48. package/dist/multibase-DeCHcK8L.js +316 -0
  49. package/dist/nodeinfo/client.test.js +11 -11
  50. package/dist/nodeinfo/handler.test.js +34 -25
  51. package/dist/nodeinfo/mod.js +2 -2
  52. package/dist/nodeinfo/semver.test.js +7 -9
  53. package/dist/nodeinfo/types.test.js +8 -10
  54. package/dist/{owner-C_vL0hRG.js → owner-DGNtApEB.js} +3 -2
  55. package/dist/{proof-CiYpiavN.js → proof-Be4Tmi-k.js} +3 -3
  56. package/dist/{proof-Dz3Yq7kI.js → proof-X397Edu9.js} +4 -2
  57. package/dist/router-D3UybECj.js +118 -0
  58. package/dist/runtime/authdocloader.test.js +20 -14
  59. package/dist/runtime/docloader.test.js +10 -9
  60. package/dist/runtime/key.test.js +15 -10
  61. package/dist/runtime/langstr.test.js +7 -8
  62. package/dist/runtime/mod.js +6 -6
  63. package/dist/runtime/multibase/multibase.test.js +7 -8
  64. package/dist/runtime/url.test.js +4 -5
  65. package/dist/{send-CDQXxlmm.js → send-MctFltyI.js} +2 -2
  66. package/dist/sig/http.test.js +19 -13
  67. package/dist/sig/key.test.js +17 -11
  68. package/dist/sig/ld.test.js +16 -10
  69. package/dist/sig/mod.js +6 -6
  70. package/dist/sig/owner.test.js +19 -12
  71. package/dist/sig/proof.test.js +18 -12
  72. package/dist/testing/docloader.test.js +7 -8
  73. package/dist/testing/mod.d.ts +1 -8387
  74. package/dist/testing/mod.js +2 -4
  75. package/dist/testing-BZ0dJ4qn.js +143 -0
  76. package/dist/type-D2s5lmbZ.js +14 -0
  77. package/dist/{types-E0EOd3en.js → types-BlaDGaMP.js} +1 -1
  78. package/dist/{types-n7HI7VFr.js → types-C7C_l-jz.js} +1 -1
  79. package/dist/url-kTAI6_KP.js +68 -0
  80. package/dist/vocab/actor.test.js +16 -10
  81. package/dist/vocab/lookup.test.js +16 -9
  82. package/dist/vocab/mod.js +4 -4
  83. package/dist/vocab/type.test.js +7 -3
  84. package/dist/vocab/vocab.test.js +13 -9
  85. package/dist/{vocab-fVvi4e5m.js → vocab-CMem4Z8B.js} +3 -3
  86. package/dist/{type-BvQGw6hv.js → vocab-CpXP4iIV.js} +183 -5255
  87. package/dist/webfinger/handler.test.js +34 -25
  88. package/dist/webfinger/lookup.test.js +10 -9
  89. package/dist/webfinger/mod.js +2 -2
  90. package/dist/x/cfworkers.test.js +6 -8
  91. package/package.json +1 -1
  92. package/dist/key-CE5RdobB.js +0 -10
  93. package/dist/middleware-DPQqiqLu.js +0 -26
  94. package/dist/middleware-Dh8xaPyd.js +0 -17
  95. package/dist/testing-COl4JbdC.js +0 -301
  96. /package/dist/{assert_is_error-CeVBLPsZ.js → assert_is_error-DQdKoRgb.js} +0 -0
  97. /package/dist/{assert_not_equals-D2R2nl5h.js → assert_not_equals-7pyUM3Ib.js} +0 -0
  98. /package/dist/{collection-D5V3UzU3.js → collection-Dfb0TPno.js} +0 -0
  99. /package/dist/{denokv-DK9P5Jq7.js → denokv-QWKsIqML.js} +0 -0
  100. /package/dist/{retry-BnpVRGFC.js → retry-BiIhZWgD.js} +0 -0
  101. /package/dist/{semver-DCqorrj5.js → semver-DWClQt_5.js} +0 -0
  102. /package/dist/{std__assert-BQdmxyzF.js → std__assert-B3iAixc-.js} +0 -0
@@ -3,8 +3,10 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, CryptographicKey, Object as Object$1, deno_default, getDocumentLoader, getTypeId } from "./type-BvQGw6hv.js";
7
- import { fetchKey, validateCryptoKey } from "./key-D2T-GDYd.js";
6
+ import { deno_default, getDocumentLoader } from "./docloader-Dj3ESYni.js";
7
+ import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-CpXP4iIV.js";
8
+ import { getTypeId } from "./type-D2s5lmbZ.js";
9
+ import { fetchKey, validateCryptoKey } from "./key-wb9EWpSb.js";
8
10
  import { getLogger } from "@logtape/logtape";
9
11
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
12
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -2,7 +2,7 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-B6dtEu0e.js";
5
+ import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-DaZu_7K2.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
 
@@ -3,121 +3,14 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-BvQGw6hv.js";
7
- import { cloneDeep, delay } from "es-toolkit";
6
+ import { deno_default, getDocumentLoader } from "./docloader-Dj3ESYni.js";
7
+ import { Object as Object$1 } from "./vocab-CpXP4iIV.js";
8
+ import { lookupWebFinger } from "./lookup-sc6ms_6o.js";
9
+ import { getTypeId } from "./type-D2s5lmbZ.js";
10
+ import { delay } from "es-toolkit";
8
11
  import { getLogger } from "@logtape/logtape";
9
12
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
- import { Router } from "uri-template-router";
11
- import { parseTemplate } from "url-template";
12
13
 
13
- //#region federation/router.ts
14
- function cloneInnerRouter(router) {
15
- const clone = new Router();
16
- clone.nid = router.nid;
17
- clone.fsm = cloneDeep(router.fsm);
18
- clone.routeSet = new Set(router.routeSet);
19
- clone.templateRouteMap = new Map(router.templateRouteMap);
20
- clone.valueRouteMap = new Map(router.valueRouteMap);
21
- clone.hierarchy = cloneDeep(router.hierarchy);
22
- return clone;
23
- }
24
- /**
25
- * URL router and constructor based on URI Template
26
- * ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
27
- */
28
- var Router$1 = class Router$1 {
29
- #router;
30
- #templates;
31
- #templateStrings;
32
- /**
33
- * Whether to ignore trailing slashes when matching paths.
34
- * @since 1.6.0
35
- */
36
- trailingSlashInsensitive;
37
- /**
38
- * Create a new {@link Router}.
39
- * @param options Options for the router.
40
- */
41
- constructor(options = {}) {
42
- this.#router = new Router();
43
- this.#templates = {};
44
- this.#templateStrings = {};
45
- this.trailingSlashInsensitive = options.trailingSlashInsensitive ?? false;
46
- }
47
- clone() {
48
- const clone = new Router$1({ trailingSlashInsensitive: this.trailingSlashInsensitive });
49
- clone.#router = cloneInnerRouter(this.#router);
50
- clone.#templates = { ...this.#templates };
51
- clone.#templateStrings = { ...this.#templateStrings };
52
- return clone;
53
- }
54
- /**
55
- * Checks if a path name exists in the router.
56
- * @param name The name of the path.
57
- * @returns `true` if the path name exists, otherwise `false`.
58
- */
59
- has(name) {
60
- return name in this.#templates;
61
- }
62
- /**
63
- * Adds a new path rule to the router.
64
- * @param template The path pattern.
65
- * @param name The name of the path.
66
- * @returns The names of the variables in the path pattern.
67
- */
68
- add(template, name) {
69
- if (!template.startsWith("/")) throw new RouterError("Path must start with a slash.");
70
- const rule = this.#router.addTemplate(template, {}, name);
71
- this.#templates[name] = parseTemplate(template);
72
- this.#templateStrings[name] = template;
73
- return new Set(rule.variables.map((v) => v.varname));
74
- }
75
- /**
76
- * Resolves a path name and values from a URL, if any match.
77
- * @param url The URL to resolve.
78
- * @returns The name of the path and its values, if any match. Otherwise,
79
- * `null`.
80
- */
81
- route(url) {
82
- let match = this.#router.resolveURI(url);
83
- if (match == null) {
84
- if (!this.trailingSlashInsensitive) return null;
85
- url = url.endsWith("/") ? url.replace(/\/+$/, "") : `${url}/`;
86
- match = this.#router.resolveURI(url);
87
- if (match == null) return null;
88
- }
89
- return {
90
- name: match.matchValue,
91
- template: this.#templateStrings[match.matchValue],
92
- values: match.params
93
- };
94
- }
95
- /**
96
- * Constructs a URL/path from a path name and values.
97
- * @param name The name of the path.
98
- * @param values The values to expand the path with.
99
- * @returns The URL/path, if the name exists. Otherwise, `null`.
100
- */
101
- build(name, values) {
102
- if (name in this.#templates) return this.#templates[name].expand(values);
103
- return null;
104
- }
105
- };
106
- /**
107
- * An error thrown by the {@link Router}.
108
- */
109
- var RouterError = class extends Error {
110
- /**
111
- * Create a new {@link RouterError}.
112
- * @param message The error message.
113
- */
114
- constructor(message) {
115
- super(message);
116
- this.name = "RouterError";
117
- }
118
- };
119
-
120
- //#endregion
121
14
  //#region vocab/handle.ts
122
15
  /**
123
16
  * Regular expression to match a fediverse handle in the format `@user@server`
@@ -318,4 +211,4 @@ async function* traverseCollection(collection, options = {}) {
318
211
  }
319
212
 
320
213
  //#endregion
321
- export { Router$1 as Router, RouterError, lookupObject, traverseCollection };
214
+ export { lookupObject, traverseCollection };
@@ -0,0 +1,132 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import { deno_default, getUserAgent } from "./docloader-Dj3ESYni.js";
7
+ import { UrlError, validatePublicUrl } from "./url-kTAI6_KP.js";
8
+ import { getLogger } from "@logtape/logtape";
9
+ import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
10
+
11
+ //#region webfinger/lookup.ts
12
+ const logger = getLogger([
13
+ "fedify",
14
+ "webfinger",
15
+ "lookup"
16
+ ]);
17
+ const DEFAULT_MAX_REDIRECTION = 5;
18
+ /**
19
+ * Looks up a WebFinger resource.
20
+ * @param resource The resource URL to look up.
21
+ * @param options Extra options for looking up the resource.
22
+ * @returns The resource descriptor, or `null` if not found.
23
+ * @since 0.2.0
24
+ */
25
+ async function lookupWebFinger(resource, options = {}) {
26
+ const tracerProvider = options.tracerProvider ?? trace.getTracerProvider();
27
+ const tracer = tracerProvider.getTracer(deno_default.name, deno_default.version);
28
+ return await tracer.startActiveSpan("webfinger.lookup", {
29
+ kind: SpanKind.CLIENT,
30
+ attributes: {
31
+ "webfinger.resource": resource.toString(),
32
+ "webfinger.resource.scheme": typeof resource === "string" ? resource.replace(/:.*$/, "") : resource.protocol.replace(/:$/, "")
33
+ }
34
+ }, async (span) => {
35
+ try {
36
+ const result = await lookupWebFingerInternal(resource, options);
37
+ span.setStatus({ code: result === null ? SpanStatusCode.ERROR : SpanStatusCode.OK });
38
+ return result;
39
+ } catch (error) {
40
+ span.setStatus({
41
+ code: SpanStatusCode.ERROR,
42
+ message: String(error)
43
+ });
44
+ throw error;
45
+ } finally {
46
+ span.end();
47
+ }
48
+ });
49
+ }
50
+ async function lookupWebFingerInternal(resource, options = {}) {
51
+ if (typeof resource === "string") resource = new URL(resource);
52
+ let protocol = "https:";
53
+ let server;
54
+ if (resource.protocol === "acct:") {
55
+ const atPos = resource.pathname.lastIndexOf("@");
56
+ if (atPos < 0) return null;
57
+ server = resource.pathname.substring(atPos + 1);
58
+ if (server === "") return null;
59
+ } else {
60
+ protocol = resource.protocol;
61
+ server = resource.host;
62
+ }
63
+ let url = new URL(`${protocol}//${server}/.well-known/webfinger`);
64
+ url.searchParams.set("resource", resource.href);
65
+ let redirected = 0;
66
+ while (true) {
67
+ logger.debug("Fetching WebFinger resource descriptor from {url}...", { url: url.href });
68
+ let response;
69
+ if (options.allowPrivateAddress !== true) try {
70
+ await validatePublicUrl(url.href);
71
+ } catch (e) {
72
+ if (e instanceof UrlError) {
73
+ logger.error("Invalid URL for WebFinger resource descriptor: {error}", { error: e });
74
+ return null;
75
+ }
76
+ throw e;
77
+ }
78
+ try {
79
+ response = await fetch(url, {
80
+ headers: {
81
+ Accept: "application/jrd+json",
82
+ "User-Agent": typeof options.userAgent === "string" ? options.userAgent : getUserAgent(options.userAgent)
83
+ },
84
+ redirect: "manual"
85
+ });
86
+ } catch (error) {
87
+ logger.debug("Failed to fetch WebFinger resource descriptor: {error}", {
88
+ url: url.href,
89
+ error
90
+ });
91
+ return null;
92
+ }
93
+ if (response.status >= 300 && response.status < 400 && response.headers.has("Location")) {
94
+ redirected++;
95
+ const maxRedirection = options.maxRedirection ?? DEFAULT_MAX_REDIRECTION;
96
+ if (redirected >= maxRedirection) {
97
+ logger.error("Too many redirections ({redirections}) while fetching WebFinger resource descriptor.", { redirections: redirected });
98
+ return null;
99
+ }
100
+ const redirectedUrl = new URL(response.headers.get("Location"), response.url == null || response.url === "" ? url : response.url);
101
+ if (redirectedUrl.protocol !== url.protocol) {
102
+ logger.error("Redirected to a different protocol ({protocol} to {redirectedProtocol}) while fetching WebFinger resource descriptor.", {
103
+ protocol: url.protocol,
104
+ redirectedProtocol: redirectedUrl.protocol
105
+ });
106
+ return null;
107
+ }
108
+ url = redirectedUrl;
109
+ continue;
110
+ }
111
+ if (!response.ok) {
112
+ logger.debug("Failed to fetch WebFinger resource descriptor: {status} {statusText}.", {
113
+ url: url.href,
114
+ status: response.status,
115
+ statusText: response.statusText
116
+ });
117
+ return null;
118
+ }
119
+ try {
120
+ return await response.json();
121
+ } catch (e) {
122
+ if (e instanceof SyntaxError) {
123
+ logger.debug("Failed to parse WebFinger resource descriptor as JSON: {error}", { error: e });
124
+ return null;
125
+ }
126
+ throw e;
127
+ }
128
+ }
129
+ }
130
+
131
+ //#endregion
132
+ export { lookupWebFinger };
@@ -3,22 +3,26 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, deno_default, getDocumentLoader, getTypeId, kvCache, lookupWebFinger } from "./type-BvQGw6hv.js";
7
- import { getNodeInfo } from "./client-CI4TcEtW.js";
8
- import { RouterError, lookupObject, traverseCollection } from "./lookup-BH2SgpoS.js";
9
- import { nodeInfoToJson } from "./types-n7HI7VFr.js";
10
- import { exportJwk, importJwk, validateCryptoKey } from "./key-D2T-GDYd.js";
11
- import { verifyRequest } from "./http-Cdm4poZb.js";
12
- import { getAuthenticatedDocumentLoader } from "./authdocloader-DlQKiAuj.js";
13
- import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-ZkyR7ab4.js";
14
- import { doesActorOwnKey, getKeyOwner } from "./owner-C_vL0hRG.js";
15
- import { signObject, verifyObject } from "./proof-Dz3Yq7kI.js";
16
- import { routeActivity } from "./inbox-ClBcgVPg.js";
17
- import { FederationBuilderImpl } from "./builder-Bql0U6IX.js";
18
- import { buildCollectionSynchronizationHeader } from "./collection-D5V3UzU3.js";
19
- import { KvKeyCache } from "./keycache-M-zWLLCU.js";
20
- import { createExponentialBackoffPolicy } from "./retry-BnpVRGFC.js";
21
- import { extractInboxes, sendActivity } from "./send-CDQXxlmm.js";
6
+ import { deno_default, getDocumentLoader, kvCache } from "./docloader-Dj3ESYni.js";
7
+ import { getNodeInfo } from "./client-C2F5RZOv.js";
8
+ import { RouterError } from "./router-D3UybECj.js";
9
+ import { nodeInfoToJson } from "./types-C7C_l-jz.js";
10
+ import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage } from "./vocab-CpXP4iIV.js";
11
+ import { lookupWebFinger } from "./lookup-sc6ms_6o.js";
12
+ import { getTypeId } from "./type-D2s5lmbZ.js";
13
+ import { exportJwk, importJwk, validateCryptoKey } from "./key-wb9EWpSb.js";
14
+ import { verifyRequest } from "./http-3Bbxlpky.js";
15
+ import { getAuthenticatedDocumentLoader } from "./authdocloader-CNt1UkcL.js";
16
+ import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-viIK1KF8.js";
17
+ import { doesActorOwnKey, getKeyOwner } from "./owner-DGNtApEB.js";
18
+ import { signObject, verifyObject } from "./proof-X397Edu9.js";
19
+ import { lookupObject, traverseCollection } from "./lookup-B9AWrAUf.js";
20
+ import { routeActivity } from "./inbox-DKd5F3DT.js";
21
+ import { FederationBuilderImpl } from "./builder-ZewotViE.js";
22
+ import { buildCollectionSynchronizationHeader } from "./collection-Dfb0TPno.js";
23
+ import { KvKeyCache } from "./keycache-DnA7Ub23.js";
24
+ import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
25
+ import { extractInboxes, sendActivity } from "./send-MctFltyI.js";
22
26
  import { getLogger, withContext } from "@logtape/logtape";
23
27
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
24
28
  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";
@@ -2371,7 +2375,7 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
2371
2375
  #invokedFromActorDispatcher;
2372
2376
  #invokedFromObjectDispatcher;
2373
2377
  request;
2374
- url = void 0;
2378
+ url;
2375
2379
  constructor(options) {
2376
2380
  super(options);
2377
2381
  this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
@@ -0,0 +1,17 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+
5
+ import "./transformers-ghwJuzGY.js";
6
+ import "./docloader-DaZu_7K2.js";
7
+ import "./actor-BR3M3Bg3.js";
8
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-y21POb8Y.js";
9
+ import "./lookup-B21lQ9pb.js";
10
+ import "./key-BcO5OTYc.js";
11
+ import "./http-D3F6HGUu.js";
12
+ import "./proof-Be4Tmi-k.js";
13
+ import "./types-BlaDGaMP.js";
14
+ import "./authdocloader-AvrLkCka.js";
15
+ import "./vocab-CMem4Z8B.js";
16
+
17
+ export { FederationImpl };
@@ -0,0 +1,33 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-BSmfCdQG.js";
7
+ import "./docloader-Dj3ESYni.js";
8
+ import "./url-kTAI6_KP.js";
9
+ import "./semver-DWClQt_5.js";
10
+ import "./client-C2F5RZOv.js";
11
+ import "./router-D3UybECj.js";
12
+ import "./types-C7C_l-jz.js";
13
+ import "./multibase-DeCHcK8L.js";
14
+ import "./vocab-CpXP4iIV.js";
15
+ import "./langstr-DbWheeIS.js";
16
+ import "./lookup-sc6ms_6o.js";
17
+ import "./type-D2s5lmbZ.js";
18
+ import "./actor-CMQ_Gxax.js";
19
+ import "./key-wb9EWpSb.js";
20
+ import "./http-3Bbxlpky.js";
21
+ import "./authdocloader-CNt1UkcL.js";
22
+ import "./ld-viIK1KF8.js";
23
+ import "./owner-DGNtApEB.js";
24
+ import "./proof-X397Edu9.js";
25
+ import "./lookup-B9AWrAUf.js";
26
+ import "./inbox-DKd5F3DT.js";
27
+ import "./builder-ZewotViE.js";
28
+ import "./collection-Dfb0TPno.js";
29
+ import "./keycache-DnA7Ub23.js";
30
+ import "./retry-BiIhZWgD.js";
31
+ import "./send-MctFltyI.js";
32
+
33
+ export { FederationImpl };
@@ -3,15 +3,15 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
5
  import { getDefaultActivityTransformers } from "./transformers-ghwJuzGY.js";
6
- import { deno_default, getDocumentLoader, kvCache } from "./docloader-B6dtEu0e.js";
7
- import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-BvUN9QgD.js";
8
- import { lookupWebFinger } from "./lookup-BlMMBOS2.js";
9
- import { exportJwk, importJwk, validateCryptoKey } from "./key-Cl_Xlkrv.js";
10
- import { doubleKnock, verifyRequest } from "./http-epXQkoos.js";
11
- import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-CiYpiavN.js";
12
- import { getNodeInfo, nodeInfoToJson } from "./types-E0EOd3en.js";
13
- import { getAuthenticatedDocumentLoader } from "./authdocloader-BxpW2l0x.js";
14
- import { lookupObject, traverseCollection } from "./vocab-fVvi4e5m.js";
6
+ import { deno_default, getDocumentLoader, kvCache } from "./docloader-DaZu_7K2.js";
7
+ import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-BR3M3Bg3.js";
8
+ import { lookupWebFinger } from "./lookup-B21lQ9pb.js";
9
+ import { exportJwk, importJwk, validateCryptoKey } from "./key-BcO5OTYc.js";
10
+ import { doubleKnock, verifyRequest } from "./http-D3F6HGUu.js";
11
+ import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-Be4Tmi-k.js";
12
+ import { getNodeInfo, nodeInfoToJson } from "./types-BlaDGaMP.js";
13
+ import { getAuthenticatedDocumentLoader } from "./authdocloader-AvrLkCka.js";
14
+ import { lookupObject, traverseCollection } from "./vocab-CMem4Z8B.js";
15
15
  import { getLogger, withContext } from "@logtape/logtape";
16
16
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
17
17
  import { encodeHex } from "byte-encodings/hex";
@@ -312,7 +312,7 @@ var FederationBuilderImpl = class {
312
312
  this.objectTypeIds = {};
313
313
  }
314
314
  async build(options) {
315
- const { FederationImpl: FederationImpl$1 } = await import("./middleware-Dh8xaPyd.js");
315
+ const { FederationImpl: FederationImpl$1 } = await import("./middleware-C6bO8pt_.js");
316
316
  const f = new FederationImpl$1(options);
317
317
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
318
318
  f.router = this.router.clone();
@@ -3240,7 +3240,7 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
3240
3240
  #invokedFromActorDispatcher;
3241
3241
  #invokedFromObjectDispatcher;
3242
3242
  request;
3243
- url = void 0;
3243
+ url;
3244
3244
  constructor(options) {
3245
3245
  super(options);
3246
3246
  this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
package/dist/mod.js CHANGED
@@ -4,17 +4,17 @@
4
4
 
5
5
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-ghwJuzGY.js";
6
6
  import "./compat-Bb5myD13.js";
7
- import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-B6dtEu0e.js";
8
- import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-BvUN9QgD.js";
9
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-Cye6GERQ.js";
10
- import { lookupWebFinger } from "./lookup-BlMMBOS2.js";
11
- import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-Cl_Xlkrv.js";
12
- import { signRequest, verifyRequest } from "./http-epXQkoos.js";
13
- import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-CiYpiavN.js";
7
+ import { FetchError, fetchDocumentLoader, getDocumentLoader, getUserAgent, kvCache } from "./docloader-DaZu_7K2.js";
8
+ import { Accept, Activity, Add, Announce, Application, Arrive, Article, Audio, Block, ChatMessage, Collection, CollectionPage, Create, CryptographicKey, DataIntegrityProof, Delete, DidService, Dislike, Document, Emoji, EmojiReact, Endpoints, Event, Export, Flag, Follow, Group, Hashtag, Ignore, Image, IntransitiveActivity, Invite, Join, LanguageString, Leave, Like, Link, Listen, Mention, Move, Multikey, Note, Object as Object$1, Offer, OrderedCollection, OrderedCollectionPage, Organization, Page, Person, Place, Profile, PropertyValue, Question, Read, Reject, Relationship, Remove, Service, Source, TentativeAccept, TentativeReject, Tombstone, Travel, Undo, Update, Video, View, exportMultibaseKey, exportSpki, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, importMultibaseKey, importPem, importPkcs1, importSpki, isActor, normalizeActorHandle } from "./actor-BR3M3Bg3.js";
9
+ import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-y21POb8Y.js";
10
+ import { lookupWebFinger } from "./lookup-B21lQ9pb.js";
11
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-BcO5OTYc.js";
12
+ import { signRequest, verifyRequest } from "./http-D3F6HGUu.js";
13
+ import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-Be4Tmi-k.js";
14
14
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-C44ekWNP.js";
15
- import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-E0EOd3en.js";
16
- import { getAuthenticatedDocumentLoader } from "./authdocloader-BxpW2l0x.js";
17
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-fVvi4e5m.js";
15
+ import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-BlaDGaMP.js";
16
+ import { getAuthenticatedDocumentLoader } from "./authdocloader-AvrLkCka.js";
17
+ import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-CMem4Z8B.js";
18
18
  import "./nodeinfo-CyEbLjHs.js";
19
19
  import "./runtime-BSkOVUWM.js";
20
20
  import "./sig-BXJO--F9.js";