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

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 +4 -1
  2. package/dist/{actor-BI_2abz3.js → actor-6WfgEEM7.js} +1 -4
  3. package/dist/{actor-LkF6aqGd.js → actor-BvUN9QgD.js} +179 -179
  4. package/dist/{assert_rejects-DceVjUlD.js → assert_rejects-AjlKk-Vo.js} +1 -1
  5. package/dist/{assert_throws-DTDC_gwN.js → assert_throws-CqMKbTh_.js} +1 -1
  6. package/dist/{authdocloader-DeF41lCp.js → authdocloader-BxpW2l0x.js} +3 -3
  7. package/dist/{authdocloader-Bn1wpyy1.js → authdocloader-DlQKiAuj.js} +3 -4
  8. package/dist/{builder-ypgCZZ9b.js → builder-Bql0U6IX.js} +4 -5
  9. package/dist/{client-D_GpybaE.js → client-CI4TcEtW.js} +2 -2
  10. package/dist/compat/transformers.test.js +20 -27
  11. package/dist/{docloader-ZcdrjMf8.js → docloader-B6dtEu0e.js} +2 -1
  12. package/dist/{esm-d-9EVGaP.js → esm-80CEOYyg.js} +1 -1
  13. package/dist/federation/builder.test.js +11 -16
  14. package/dist/federation/collection.test.js +9 -7
  15. package/dist/federation/handler.test.js +26 -35
  16. package/dist/federation/inbox.test.js +6 -10
  17. package/dist/federation/keycache.test.js +4 -7
  18. package/dist/federation/kv.test.js +8 -6
  19. package/dist/federation/middleware.test.js +27 -35
  20. package/dist/federation/mod.js +10 -10
  21. package/dist/federation/mq.test.js +10 -8
  22. package/dist/federation/retry.test.js +5 -3
  23. package/dist/federation/router.test.js +8 -7
  24. package/dist/federation/send.test.js +15 -21
  25. package/dist/{http-CzYP-q4a.js → http-Cdm4poZb.js} +2 -3
  26. package/dist/{http-BzbQEWKu.js → http-epXQkoos.js} +3 -3
  27. package/dist/{inbox-C3u7wpp-.js → inbox-ClBcgVPg.js} +1 -3
  28. package/dist/{key-DpPVsVBo.js → key-B2Vg4tVB.js} +4 -4
  29. package/dist/key-CE5RdobB.js +10 -0
  30. package/dist/{key-DuMiqGNl.js → key-Cl_Xlkrv.js} +2 -2
  31. package/dist/{key-ctbEcqup.js → key-D2T-GDYd.js} +2 -3
  32. package/dist/{keycache-B4MVJOqX.js → keycache-M-zWLLCU.js} +1 -1
  33. package/dist/{keys-8BtWAvD6.js → keys-qx88le-G.js} +1 -1
  34. package/dist/{ld-DpsRY9hw.js → ld-ZkyR7ab4.js} +2 -4
  35. package/dist/{lookup-DrKu09YQ.js → lookup-BH2SgpoS.js} +113 -6
  36. package/dist/{lookup-Cl-flyHw.js → lookup-BlMMBOS2.js} +1 -1
  37. package/dist/{middleware-_FILA5XM.js → middleware-0TQ_tx1T.js} +17 -21
  38. package/dist/{middleware-Bel3idhw.js → middleware-Cye6GERQ.js} +11 -11
  39. package/dist/middleware-DPQqiqLu.js +26 -0
  40. package/dist/middleware-Dh8xaPyd.js +17 -0
  41. package/dist/mod.js +10 -10
  42. package/dist/nodeinfo/client.test.js +11 -11
  43. package/dist/nodeinfo/handler.test.js +25 -34
  44. package/dist/nodeinfo/mod.js +2 -2
  45. package/dist/nodeinfo/semver.test.js +9 -7
  46. package/dist/nodeinfo/types.test.js +10 -8
  47. package/dist/{owner-MQpfmrEp.js → owner-C_vL0hRG.js} +2 -3
  48. package/dist/{proof-BmJlaEuD.js → proof-CiYpiavN.js} +3 -3
  49. package/dist/{proof-C3Gb_y9R.js → proof-Dz3Yq7kI.js} +2 -4
  50. package/dist/runtime/authdocloader.test.js +14 -20
  51. package/dist/runtime/docloader.test.js +9 -10
  52. package/dist/runtime/key.test.js +10 -15
  53. package/dist/runtime/langstr.test.js +8 -7
  54. package/dist/runtime/mod.js +6 -6
  55. package/dist/runtime/multibase/multibase.test.js +8 -7
  56. package/dist/runtime/url.test.js +5 -4
  57. package/dist/{send-B95nXWtF.js → send-CDQXxlmm.js} +2 -2
  58. package/dist/sig/http.test.js +13 -19
  59. package/dist/sig/key.test.js +11 -17
  60. package/dist/sig/ld.test.js +10 -16
  61. package/dist/sig/mod.js +6 -6
  62. package/dist/sig/owner.test.js +12 -19
  63. package/dist/sig/proof.test.js +12 -18
  64. package/dist/testing/docloader.test.js +8 -7
  65. package/dist/testing/mod.d.ts +8387 -1
  66. package/dist/testing/mod.js +4 -2
  67. package/dist/testing-COl4JbdC.js +301 -0
  68. package/dist/{vocab-BczrO3jQ.js → type-BvQGw6hv.js} +5255 -183
  69. package/dist/{types-BACpZoAu.js → types-E0EOd3en.js} +1 -1
  70. package/dist/{types-C7C_l-jz.js → types-n7HI7VFr.js} +1 -1
  71. package/dist/vocab/actor.test.js +10 -16
  72. package/dist/vocab/lookup.test.js +9 -16
  73. package/dist/vocab/mod.js +4 -4
  74. package/dist/vocab/type.test.js +3 -7
  75. package/dist/vocab/vocab.test.js +9 -13
  76. package/dist/{vocab-BFQwOXsO.js → vocab-fVvi4e5m.js} +3 -3
  77. package/dist/webfinger/handler.test.js +25 -34
  78. package/dist/webfinger/lookup.test.js +9 -10
  79. package/dist/webfinger/mod.js +2 -2
  80. package/dist/x/cfworkers.test.js +8 -6
  81. package/package.json +1 -1
  82. package/dist/chunk-HsBuZ-b2.js +0 -41
  83. package/dist/context-wTS6NVpw.js +0 -108
  84. package/dist/docloader-09nVWLAZ.js +0 -68
  85. package/dist/docloader-4n0wKCuD.js +0 -4526
  86. package/dist/key-BDYWJlpE.js +0 -16
  87. package/dist/langstr-DbWheeIS.js +0 -33
  88. package/dist/lookup-CIZBWILo.js +0 -132
  89. package/dist/middleware-BoSxCdkz.js +0 -17
  90. package/dist/middleware-Db3gnzbt.js +0 -33
  91. package/dist/multibase-DeCHcK8L.js +0 -316
  92. package/dist/router-D3UybECj.js +0 -118
  93. package/dist/testing-BZ0dJ4qn.js +0 -143
  94. package/dist/type-D2s5lmbZ.js +0 -14
  95. package/dist/url-kTAI6_KP.js +0 -68
  96. /package/dist/{assert_is_error-DQdKoRgb.js → assert_is_error-CeVBLPsZ.js} +0 -0
  97. /package/dist/{assert_not_equals-7pyUM3Ib.js → assert_not_equals-D2R2nl5h.js} +0 -0
  98. /package/dist/{collection-Dfb0TPno.js → collection-D5V3UzU3.js} +0 -0
  99. /package/dist/{denokv-QWKsIqML.js → denokv-DK9P5Jq7.js} +0 -0
  100. /package/dist/{retry-BiIhZWgD.js → retry-BnpVRGFC.js} +0 -0
  101. /package/dist/{semver-DWClQt_5.js → semver-DCqorrj5.js} +0 -0
  102. /package/dist/{std__assert-B3iAixc-.js → std__assert-BQdmxyzF.js} +0 -0
@@ -3,30 +3,24 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import { Activity, Application, Endpoints, Group, Person, Service } from "../type-BvQGw6hv.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import { assert } from "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-4n0wKCuD.js";
10
- import "../url-kTAI6_KP.js";
11
- import "../multibase-DeCHcK8L.js";
12
- import { Activity, Application, Endpoints, Group, Person, Service } from "../vocab-BczrO3jQ.js";
13
- import "../langstr-DbWheeIS.js";
14
- import "../lookup-CIZBWILo.js";
15
- import "../type-D2s5lmbZ.js";
16
- import "../actor-BI_2abz3.js";
17
- import "../key-ctbEcqup.js";
18
- import { verifyRequest } from "../http-CzYP-q4a.js";
19
- import { doesActorOwnKey } from "../owner-MQpfmrEp.js";
20
- import { extractInboxes, sendActivity } from "../send-B95nXWtF.js";
21
- import { test } from "../testing-BZ0dJ4qn.js";
22
- import "../std__assert-B3iAixc-.js";
23
- import { assertFalse, assertRejects } from "../assert_rejects-DceVjUlD.js";
24
- import "../assert_is_error-DQdKoRgb.js";
25
- import { assertNotEquals } from "../assert_not_equals-7pyUM3Ib.js";
26
- import "../assert_throws-DTDC_gwN.js";
27
- import { mockDocumentLoader } from "../docloader-09nVWLAZ.js";
28
- import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-8BtWAvD6.js";
29
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../lookup-BH2SgpoS.js";
11
+ import "../actor-6WfgEEM7.js";
12
+ import "../key-D2T-GDYd.js";
13
+ import { verifyRequest } from "../http-Cdm4poZb.js";
14
+ import { doesActorOwnKey } from "../owner-C_vL0hRG.js";
15
+ import { extractInboxes, sendActivity } from "../send-CDQXxlmm.js";
16
+ import { mockDocumentLoader, test } from "../testing-COl4JbdC.js";
17
+ import "../std__assert-BQdmxyzF.js";
18
+ import { assertFalse, assertRejects } from "../assert_rejects-AjlKk-Vo.js";
19
+ import "../assert_is_error-CeVBLPsZ.js";
20
+ import { assertNotEquals } from "../assert_not_equals-D2R2nl5h.js";
21
+ import "../assert_throws-CqMKbTh_.js";
22
+ import { ed25519Multikey, ed25519PrivateKey, rsaPrivateKey2, rsaPublicKey2 } from "../keys-qx88le-G.js";
23
+ import { esm_default } from "../esm-80CEOYyg.js";
30
24
 
31
25
  //#region federation/send.test.ts
32
26
  test("extractInboxes()", () => {
@@ -3,9 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-4n0wKCuD.js";
7
- import { CryptographicKey } from "./vocab-BczrO3jQ.js";
8
- import { fetchKey, validateCryptoKey } from "./key-ctbEcqup.js";
6
+ import { CryptographicKey, deno_default } from "./type-BvQGw6hv.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-D2T-GDYd.js";
9
8
  import { getLogger } from "@logtape/logtape";
10
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
11
10
  import { ATTR_HTTP_REQUEST_HEADER, ATTR_HTTP_REQUEST_METHOD, ATTR_URL_FULL } from "@opentelemetry/semantic-conventions";
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { deno_default } from "./docloader-ZcdrjMf8.js";
6
- import { CryptographicKey } from "./actor-LkF6aqGd.js";
7
- import { fetchKey, validateCryptoKey } from "./key-DuMiqGNl.js";
5
+ import { deno_default } from "./docloader-B6dtEu0e.js";
6
+ import { CryptographicKey } from "./actor-BvUN9QgD.js";
7
+ import { fetchKey, validateCryptoKey } from "./key-Cl_Xlkrv.js";
8
8
  import { getLogger } from "@logtape/logtape";
9
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -3,9 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default } from "./docloader-4n0wKCuD.js";
7
- import { Activity } from "./vocab-BczrO3jQ.js";
8
- import { getTypeId } from "./type-D2s5lmbZ.js";
6
+ import { Activity, deno_default, getTypeId } from "./type-BvQGw6hv.js";
9
7
  import { getLogger } from "@logtape/logtape";
10
8
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
11
9
 
@@ -2,9 +2,9 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "./docloader-ZcdrjMf8.js";
6
- import "./actor-LkF6aqGd.js";
7
- import "./lookup-Cl-flyHw.js";
8
- import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-DuMiqGNl.js";
5
+ import "./docloader-B6dtEu0e.js";
6
+ import "./actor-BvUN9QgD.js";
7
+ import "./lookup-BlMMBOS2.js";
8
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-Cl_Xlkrv.js";
9
9
 
10
10
  export { validateCryptoKey };
@@ -0,0 +1,10 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import "./type-BvQGw6hv.js";
7
+ import "./actor-6WfgEEM7.js";
8
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, validateCryptoKey } from "./key-D2T-GDYd.js";
9
+
10
+ export { validateCryptoKey };
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import { deno_default, getDocumentLoader } from "./docloader-ZcdrjMf8.js";
6
- import { CryptographicKey, Object as Object$1, isActor } from "./actor-LkF6aqGd.js";
5
+ import { deno_default, getDocumentLoader } from "./docloader-B6dtEu0e.js";
6
+ import { CryptographicKey, Object as Object$1, isActor } from "./actor-BvUN9QgD.js";
7
7
  import { getLogger } from "@logtape/logtape";
8
8
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
9
9
 
@@ -3,9 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader } from "./docloader-4n0wKCuD.js";
7
- import { CryptographicKey, Object as Object$1 } from "./vocab-BczrO3jQ.js";
8
- import { isActor } from "./actor-BI_2abz3.js";
6
+ import { CryptographicKey, Object as Object$1, deno_default, getDocumentLoader } from "./type-BvQGw6hv.js";
7
+ import { isActor } from "./actor-6WfgEEM7.js";
9
8
  import { getLogger } from "@logtape/logtape";
10
9
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
11
10
 
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Multikey } from "./vocab-BczrO3jQ.js";
6
+ import { CryptographicKey, Multikey } from "./type-BvQGw6hv.js";
7
7
 
8
8
  //#region federation/keycache.ts
9
9
  var KvKeyCache = class {
@@ -3,7 +3,7 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { CryptographicKey, Multikey, importSpki } from "./vocab-BczrO3jQ.js";
6
+ import { CryptographicKey, Multikey, importSpki } from "./type-BvQGw6hv.js";
7
7
 
8
8
  //#region testing/keys.ts
9
9
  const rsaPublicKey1 = new CryptographicKey({
@@ -3,10 +3,8 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader } from "./docloader-4n0wKCuD.js";
7
- import { Activity, CryptographicKey, Object as Object$1 } from "./vocab-BczrO3jQ.js";
8
- import { getTypeId } from "./type-D2s5lmbZ.js";
9
- import { fetchKey, validateCryptoKey } from "./key-ctbEcqup.js";
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";
10
8
  import { getLogger } from "@logtape/logtape";
11
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
12
10
  import { decodeBase64, encodeBase64 } from "byte-encodings/base64";
@@ -3,14 +3,121 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader } from "./docloader-4n0wKCuD.js";
7
- import { Object as Object$1 } from "./vocab-BczrO3jQ.js";
8
- import { lookupWebFinger } from "./lookup-CIZBWILo.js";
9
- import { getTypeId } from "./type-D2s5lmbZ.js";
10
- import { delay } from "es-toolkit";
6
+ import { Object as Object$1, deno_default, getDocumentLoader, getTypeId, lookupWebFinger } from "./type-BvQGw6hv.js";
7
+ import { cloneDeep, delay } from "es-toolkit";
11
8
  import { getLogger } from "@logtape/logtape";
12
9
  import { SpanStatusCode, trace } from "@opentelemetry/api";
10
+ import { Router } from "uri-template-router";
11
+ import { parseTemplate } from "url-template";
13
12
 
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
14
121
  //#region vocab/handle.ts
15
122
  /**
16
123
  * Regular expression to match a fediverse handle in the format `@user@server`
@@ -211,4 +318,4 @@ async function* traverseCollection(collection, options = {}) {
211
318
  }
212
319
 
213
320
  //#endregion
214
- export { lookupObject, traverseCollection };
321
+ export { Router$1 as Router, RouterError, lookupObject, traverseCollection };
@@ -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-ZcdrjMf8.js";
5
+ import { UrlError, deno_default, getUserAgent, validatePublicUrl } from "./docloader-B6dtEu0e.js";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { SpanKind, SpanStatusCode, trace } from "@opentelemetry/api";
8
8
 
@@ -3,26 +3,22 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { deno_default, getDocumentLoader, kvCache } from "./docloader-4n0wKCuD.js";
7
- import { getNodeInfo } from "./client-D_GpybaE.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-BczrO3jQ.js";
11
- import { lookupWebFinger } from "./lookup-CIZBWILo.js";
12
- import { getTypeId } from "./type-D2s5lmbZ.js";
13
- import { exportJwk, importJwk, validateCryptoKey } from "./key-ctbEcqup.js";
14
- import { verifyRequest } from "./http-CzYP-q4a.js";
15
- import { getAuthenticatedDocumentLoader } from "./authdocloader-Bn1wpyy1.js";
16
- import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-DpsRY9hw.js";
17
- import { doesActorOwnKey, getKeyOwner } from "./owner-MQpfmrEp.js";
18
- import { signObject, verifyObject } from "./proof-C3Gb_y9R.js";
19
- import { lookupObject, traverseCollection } from "./lookup-DrKu09YQ.js";
20
- import { routeActivity } from "./inbox-C3u7wpp-.js";
21
- import { FederationBuilderImpl } from "./builder-ypgCZZ9b.js";
22
- import { buildCollectionSynchronizationHeader } from "./collection-Dfb0TPno.js";
23
- import { KvKeyCache } from "./keycache-B4MVJOqX.js";
24
- import { createExponentialBackoffPolicy } from "./retry-BiIhZWgD.js";
25
- import { extractInboxes, sendActivity } from "./send-B95nXWtF.js";
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";
26
22
  import { getLogger, withContext } from "@logtape/logtape";
27
23
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
28
24
  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";
@@ -2375,7 +2371,7 @@ var RequestContextImpl = class RequestContextImpl extends ContextImpl {
2375
2371
  #invokedFromActorDispatcher;
2376
2372
  #invokedFromObjectDispatcher;
2377
2373
  request;
2378
- url;
2374
+ url = void 0;
2379
2375
  constructor(options) {
2380
2376
  super(options);
2381
2377
  this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
@@ -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-ZcdrjMf8.js";
7
- import { Activity, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-LkF6aqGd.js";
8
- import { lookupWebFinger } from "./lookup-Cl-flyHw.js";
9
- import { exportJwk, importJwk, validateCryptoKey } from "./key-DuMiqGNl.js";
10
- import { doubleKnock, verifyRequest } from "./http-BzbQEWKu.js";
11
- import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-BmJlaEuD.js";
12
- import { getNodeInfo, nodeInfoToJson } from "./types-BACpZoAu.js";
13
- import { getAuthenticatedDocumentLoader } from "./authdocloader-DeF41lCp.js";
14
- import { lookupObject, traverseCollection } from "./vocab-BFQwOXsO.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";
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-BoSxCdkz.js");
315
+ const { FederationImpl: FederationImpl$1 } = await import("./middleware-Dh8xaPyd.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;
3243
+ url = void 0;
3244
3244
  constructor(options) {
3245
3245
  super(options);
3246
3246
  this.#invokedFromActorDispatcher = options.invokedFromActorDispatcher;
@@ -0,0 +1,26 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import "./type-BvQGw6hv.js";
7
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-0TQ_tx1T.js";
8
+ import "./semver-DCqorrj5.js";
9
+ import "./client-CI4TcEtW.js";
10
+ import "./lookup-BH2SgpoS.js";
11
+ import "./types-n7HI7VFr.js";
12
+ import "./actor-6WfgEEM7.js";
13
+ import "./key-D2T-GDYd.js";
14
+ import "./http-Cdm4poZb.js";
15
+ import "./authdocloader-DlQKiAuj.js";
16
+ import "./ld-ZkyR7ab4.js";
17
+ import "./owner-C_vL0hRG.js";
18
+ import "./proof-Dz3Yq7kI.js";
19
+ import "./inbox-ClBcgVPg.js";
20
+ import "./builder-Bql0U6IX.js";
21
+ import "./collection-D5V3UzU3.js";
22
+ import "./keycache-M-zWLLCU.js";
23
+ import "./retry-BnpVRGFC.js";
24
+ import "./send-CDQXxlmm.js";
25
+
26
+ export { FederationImpl };
@@ -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-B6dtEu0e.js";
7
+ import "./actor-BvUN9QgD.js";
8
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-Cye6GERQ.js";
9
+ import "./lookup-BlMMBOS2.js";
10
+ import "./key-Cl_Xlkrv.js";
11
+ import "./http-epXQkoos.js";
12
+ import "./proof-CiYpiavN.js";
13
+ import "./types-E0EOd3en.js";
14
+ import "./authdocloader-BxpW2l0x.js";
15
+ import "./vocab-fVvi4e5m.js";
16
+
17
+ export { FederationImpl };
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-ZcdrjMf8.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-LkF6aqGd.js";
9
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-Bel3idhw.js";
10
- import { lookupWebFinger } from "./lookup-Cl-flyHw.js";
11
- import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk } from "./key-DuMiqGNl.js";
12
- import { signRequest, verifyRequest } from "./http-BzbQEWKu.js";
13
- import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-BmJlaEuD.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";
14
14
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-C44ekWNP.js";
15
- import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "./types-BACpZoAu.js";
16
- import { getAuthenticatedDocumentLoader } from "./authdocloader-DeF41lCp.js";
17
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-BFQwOXsO.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";
18
18
  import "./nodeinfo-CyEbLjHs.js";
19
19
  import "./runtime-BSkOVUWM.js";
20
20
  import "./sig-BXJO--F9.js";
@@ -3,20 +3,20 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-BvQGw6hv.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
- import "../docloader-4n0wKCuD.js";
10
- import "../url-kTAI6_KP.js";
11
- import "../semver-DWClQt_5.js";
12
- import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-D_GpybaE.js";
13
- import { test } from "../testing-BZ0dJ4qn.js";
14
- import "../std__assert-B3iAixc-.js";
15
- import "../assert_rejects-DceVjUlD.js";
16
- import "../assert_is_error-DQdKoRgb.js";
17
- import "../assert_not_equals-7pyUM3Ib.js";
18
- import "../assert_throws-DTDC_gwN.js";
19
- import { esm_default } from "../esm-d-9EVGaP.js";
10
+ import "../semver-DCqorrj5.js";
11
+ import { getNodeInfo, parseInboundService, parseNodeInfo, parseOutboundService, parseProtocol, parseServices, parseSoftware, parseUsage } from "../client-CI4TcEtW.js";
12
+ import "../lookup-BH2SgpoS.js";
13
+ import { test } from "../testing-COl4JbdC.js";
14
+ import "../std__assert-BQdmxyzF.js";
15
+ import "../assert_rejects-AjlKk-Vo.js";
16
+ import "../assert_is_error-CeVBLPsZ.js";
17
+ import "../assert_not_equals-D2R2nl5h.js";
18
+ import "../assert_throws-CqMKbTh_.js";
19
+ import { esm_default } from "../esm-80CEOYyg.js";
20
20
 
21
21
  //#region nodeinfo/client.test.ts
22
22
  test("getNodeInfo()", async (t) => {
@@ -3,44 +3,35 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
+ import "../type-BvQGw6hv.js";
6
7
  import { assertEquals } from "../assert_equals-C5gKCm6A.js";
7
8
  import "../assert-DwEa6glZ.js";
8
9
  import "../assert_instance_of-C9QtN-X9.js";
9
10
  import { MemoryKvStore } from "../kv-D7Yt6pnB.js";
10
- import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-_FILA5XM.js";
11
- import "../docloader-4n0wKCuD.js";
12
- import "../url-kTAI6_KP.js";
13
- import { parseSemVer } from "../semver-DWClQt_5.js";
14
- import "../client-D_GpybaE.js";
15
- import "../router-D3UybECj.js";
16
- import "../types-C7C_l-jz.js";
17
- import "../multibase-DeCHcK8L.js";
18
- import "../vocab-BczrO3jQ.js";
19
- import "../langstr-DbWheeIS.js";
20
- import "../lookup-CIZBWILo.js";
21
- import "../type-D2s5lmbZ.js";
22
- import "../actor-BI_2abz3.js";
23
- import "../key-ctbEcqup.js";
24
- import "../http-CzYP-q4a.js";
25
- import "../authdocloader-Bn1wpyy1.js";
26
- import "../ld-DpsRY9hw.js";
27
- import "../owner-MQpfmrEp.js";
28
- import "../proof-C3Gb_y9R.js";
29
- import "../lookup-DrKu09YQ.js";
30
- import "../inbox-C3u7wpp-.js";
31
- import "../builder-ypgCZZ9b.js";
32
- import "../collection-Dfb0TPno.js";
33
- import "../keycache-B4MVJOqX.js";
34
- import "../retry-BiIhZWgD.js";
35
- import "../send-B95nXWtF.js";
36
- import { test } from "../testing-BZ0dJ4qn.js";
37
- import "../std__assert-B3iAixc-.js";
38
- import "../assert_rejects-DceVjUlD.js";
39
- import "../assert_is_error-DQdKoRgb.js";
40
- import "../assert_not_equals-7pyUM3Ib.js";
41
- import "../assert_throws-DTDC_gwN.js";
42
- import "../docloader-09nVWLAZ.js";
43
- import { createRequestContext } from "../context-wTS6NVpw.js";
11
+ import { createFederation, handleNodeInfo, handleNodeInfoJrd } from "../middleware-0TQ_tx1T.js";
12
+ import { parseSemVer } from "../semver-DCqorrj5.js";
13
+ import "../client-CI4TcEtW.js";
14
+ import "../lookup-BH2SgpoS.js";
15
+ import "../types-n7HI7VFr.js";
16
+ import "../actor-6WfgEEM7.js";
17
+ import "../key-D2T-GDYd.js";
18
+ import "../http-Cdm4poZb.js";
19
+ import "../authdocloader-DlQKiAuj.js";
20
+ import "../ld-ZkyR7ab4.js";
21
+ import "../owner-C_vL0hRG.js";
22
+ import "../proof-Dz3Yq7kI.js";
23
+ import "../inbox-ClBcgVPg.js";
24
+ import "../builder-Bql0U6IX.js";
25
+ import "../collection-D5V3UzU3.js";
26
+ import "../keycache-M-zWLLCU.js";
27
+ import "../retry-BnpVRGFC.js";
28
+ import "../send-CDQXxlmm.js";
29
+ import { createRequestContext, test } from "../testing-COl4JbdC.js";
30
+ import "../std__assert-BQdmxyzF.js";
31
+ import "../assert_rejects-AjlKk-Vo.js";
32
+ import "../assert_is_error-CeVBLPsZ.js";
33
+ import "../assert_not_equals-D2R2nl5h.js";
34
+ import "../assert_throws-CqMKbTh_.js";
44
35
 
45
36
  //#region nodeinfo/handler.test.ts
46
37
  test("handleNodeInfo()", async () => {
@@ -2,8 +2,8 @@
2
2
  import { Temporal } from "@js-temporal/polyfill";
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
- import "../docloader-ZcdrjMf8.js";
6
- import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-BACpZoAu.js";
5
+ import "../docloader-B6dtEu0e.js";
6
+ import { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer } from "../types-E0EOd3en.js";
7
7
  import "../nodeinfo-CyEbLjHs.js";
8
8
 
9
9
  export { formatSemVer, getNodeInfo, nodeInfoToJson, parseNodeInfo, parseSemVer };