@fedify/fedify 2.0.0-pr.467.1876 → 2.0.0-pr.469.1873

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 (120) hide show
  1. package/dist/{actor-CsH6QBYT.js → actor-Bo3uuvwH.js} +185 -185
  2. package/dist/{actor-D1LkZWVU.js → actor-DhFfLv7K.js} +1 -1
  3. package/dist/{actor-9gjVpXgd.cjs → actor-DoaVs0vL.cjs} +185 -185
  4. package/dist/{builder-DCBCGtfN.js → builder-DFaO3_4-.js} +3 -3
  5. package/dist/compat/mod.d.cts +3 -2
  6. package/dist/compat/mod.d.ts +3 -2
  7. package/dist/compat/transformers.test.js +14 -14
  8. package/dist/{context-V-XS2_6O.d.ts → context-DG0huGW-.d.ts} +3 -140
  9. package/dist/{context-PxGADCsD.d.cts → context-DJ8aSy2Q.d.cts} +3 -140
  10. package/dist/denokv-CCssOzMJ.js +57 -0
  11. package/dist/{docloader-BaWIuRb2.js → docloader-B1AZ1LMA.js} +2 -2
  12. package/dist/{esm-uX3RtJS9.js → esm-CbckHird.js} +1 -1
  13. package/dist/federation/builder.test.js +4 -4
  14. package/dist/federation/collection.test.js +2 -2
  15. package/dist/federation/handler.test.js +15 -15
  16. package/dist/federation/idempotency.test.js +15 -15
  17. package/dist/federation/inbox.test.js +3 -3
  18. package/dist/federation/keycache.test.js +3 -3
  19. package/dist/federation/kv.test.js +2 -2
  20. package/dist/federation/middleware.test.js +16 -16
  21. package/dist/federation/mod.cjs +7 -7
  22. package/dist/federation/mod.d.cts +3 -2
  23. package/dist/federation/mod.d.ts +3 -2
  24. package/dist/federation/mod.js +7 -7
  25. package/dist/federation/mq.test.js +4 -6
  26. package/dist/federation/negotiation.test.js +2 -2
  27. package/dist/federation/retry.test.js +2 -2
  28. package/dist/federation/router.test.js +2 -2
  29. package/dist/federation/send.test.js +9 -9
  30. package/dist/{http-zanXjqHu.cjs → http-D27ZccIJ.cjs} +2 -2
  31. package/dist/{http-C5NpY8dE.js → http-D8SvAGVC.js} +2 -2
  32. package/dist/{http-Cw6Nfbii.js → http-nnaaa9xj.js} +2 -2
  33. package/dist/{inbox-Bu3THMpw.js → inbox-C5M1_a0k.js} +1 -1
  34. package/dist/{key-KT2Sua_C.js → key-bc3A8THw.js} +2 -2
  35. package/dist/{keycache-CH77mwdO.js → keycache-CpTjHRpy.js} +1 -1
  36. package/dist/{keys-DM8I6W_Z.js → keys-D6W2Pnoh.js} +1 -1
  37. package/dist/{kv-cache-DspkH6f2.js → kv-cache-B_RVzls5.js} +1 -1
  38. package/dist/{kv-cache-DxziE8JZ.cjs → kv-cache-CZcZLaEo.cjs} +1 -1
  39. package/dist/{ld-RF_UxhNp.js → ld-D5Vg307g.js} +2 -2
  40. package/dist/{lookup-D029Hgmr.js → lookup-BBrk-_5k.js} +191 -186
  41. package/dist/{lookup-EXeITSkB.js → lookup-BXY5QJif.js} +7 -2
  42. package/dist/{lookup-ZMUieFn0.cjs → lookup-DO7ZeFb2.cjs} +7 -2
  43. package/dist/middleware-BU2XnCCI.js +15 -0
  44. package/dist/{middleware-CI-4cLU9.js → middleware-CU0RJROn.js} +11 -11
  45. package/dist/middleware-D4qQ6MLq.cjs +15 -0
  46. package/dist/middleware-DEu9Xuza.js +26 -0
  47. package/dist/{middleware-CMT8W2oG.cjs → middleware-Dy7xPuu-.cjs} +7 -7
  48. package/dist/{middleware-C32-qFyf.js → middleware-RgDZByG7.js} +7 -7
  49. package/dist/{mod-Cdo6SYlJ.d.ts → mod-BoHnwOCs.d.ts} +1 -1
  50. package/dist/{mod-BoRKfJPE.d.cts → mod-DJcZDvjA.d.cts} +1 -1
  51. package/dist/mod.cjs +7 -7
  52. package/dist/mod.d.cts +6 -5
  53. package/dist/mod.d.ts +6 -5
  54. package/dist/mod.js +7 -7
  55. package/dist/mq-CUKlBw08.d.ts +143 -0
  56. package/dist/mq-DcJPkXD5.d.cts +140 -0
  57. package/dist/nodeinfo/client.test.js +3 -3
  58. package/dist/nodeinfo/handler.test.js +14 -14
  59. package/dist/nodeinfo/mod.d.cts +1 -1
  60. package/dist/nodeinfo/mod.d.ts +1 -1
  61. package/dist/nodeinfo/types.test.js +2 -2
  62. package/dist/{owner-6JbsaBQB.js → owner-DSDpCSms.js} +2 -2
  63. package/dist/{proof-D8SPvADT.js → proof-4L3D-iT4.js} +3 -3
  64. package/dist/{proof-gHlNO1tx.js → proof-Bvu8zaM1.js} +2 -2
  65. package/dist/{proof-CB7YKfl6.cjs → proof-C1-VSUNW.cjs} +3 -3
  66. package/dist/{send-CmpkYTnR.js → send-Cr3PSs0N.js} +2 -2
  67. package/dist/sig/http.test.js +7 -7
  68. package/dist/sig/key.test.js +5 -5
  69. package/dist/sig/ld.test.js +6 -6
  70. package/dist/sig/mod.cjs +4 -4
  71. package/dist/sig/mod.d.cts +1 -1
  72. package/dist/sig/mod.d.ts +1 -1
  73. package/dist/sig/mod.js +4 -4
  74. package/dist/sig/owner.test.js +6 -6
  75. package/dist/sig/proof.test.js +6 -6
  76. package/dist/testing/docloader.test.js +2 -2
  77. package/dist/testing/mod.js +2 -2
  78. package/dist/{testing-BJ493d9l.js → testing-Bw9AfLxQ.js} +1 -1
  79. package/dist/utils/docloader.test.js +8 -8
  80. package/dist/utils/kv-cache.test.js +2 -2
  81. package/dist/utils/mod.cjs +4 -4
  82. package/dist/utils/mod.d.cts +1 -1
  83. package/dist/utils/mod.d.ts +1 -1
  84. package/dist/utils/mod.js +4 -4
  85. package/dist/vocab/actor.test.js +4 -4
  86. package/dist/vocab/lookup.test.js +3 -3
  87. package/dist/vocab/mod.cjs +3 -3
  88. package/dist/vocab/mod.js +3 -3
  89. package/dist/vocab/type.test.js +2 -2
  90. package/dist/vocab/vocab.test.js +3 -3
  91. package/dist/{vocab-BY_op-IW.js → vocab-B74bq08l.js} +2 -2
  92. package/dist/{vocab-I0FskT0s.cjs → vocab-HJLl6-1F.cjs} +2 -2
  93. package/dist/webfinger/handler.test.js +14 -14
  94. package/dist/webfinger/lookup.test.js +3 -3
  95. package/dist/webfinger/mod.cjs +1 -1
  96. package/dist/webfinger/mod.js +1 -1
  97. package/dist/x/cfworkers.cjs +100 -0
  98. package/dist/x/cfworkers.d.cts +59 -0
  99. package/dist/x/cfworkers.d.ts +61 -0
  100. package/dist/x/cfworkers.js +98 -0
  101. package/dist/x/cfworkers.test.d.ts +3 -0
  102. package/dist/x/cfworkers.test.js +177 -0
  103. package/dist/x/hono.cjs +61 -0
  104. package/dist/x/hono.d.cts +53 -0
  105. package/dist/x/hono.d.ts +55 -0
  106. package/dist/x/hono.js +60 -0
  107. package/dist/x/sveltekit.cjs +69 -0
  108. package/dist/x/sveltekit.d.cts +45 -0
  109. package/dist/x/sveltekit.d.ts +47 -0
  110. package/dist/x/sveltekit.js +68 -0
  111. package/package.json +34 -3
  112. package/dist/middleware-BuhoXDtM.js +0 -15
  113. package/dist/middleware-C2X56NUR.cjs +0 -15
  114. package/dist/middleware-DWijkoj4.js +0 -26
  115. /package/dist/{mod-DMpuiKXi.d.cts → mod-0noXw66R.d.cts} +0 -0
  116. /package/dist/{mod-D5Z2tISD.d.ts → mod-B2iOw50L.d.ts} +0 -0
  117. /package/dist/{mod-aAE2wOWV.d.ts → mod-B9M-8jm2.d.ts} +0 -0
  118. /package/dist/{mod-CcDPcLJW.d.cts → mod-C2tOeRkN.d.cts} +0 -0
  119. /package/dist/{mod-DgxG-byT.d.cts → mod-DgdBYYa0.d.cts} +0 -0
  120. /package/dist/{mod-bjzj5QIb.d.ts → mod-xIj-IT58.d.ts} +0 -0
@@ -8,7 +8,7 @@ import { UrlError, getUserAgent, validatePublicUrl } from "@fedify/vocab-runtime
8
8
 
9
9
  //#region deno.json
10
10
  var name = "@fedify/fedify";
11
- var version = "2.0.0-pr.467.1876+1fd56163";
11
+ var version = "2.0.0-pr.469.1873+ebbd8642";
12
12
  var license = "MIT";
13
13
  var exports = {
14
14
  ".": "./src/mod.ts",
@@ -19,7 +19,12 @@ var exports = {
19
19
  "./testing": "./src/testing/mod.ts",
20
20
  "./vocab": "./src/vocab/mod.ts",
21
21
  "./utils": "./src/utils/mod.ts",
22
- "./webfinger": "./src/webfinger/mod.ts"
22
+ "./webfinger": "./src/webfinger/mod.ts",
23
+ "./x/cfworkers": "./src/x/cfworkers.ts",
24
+ "./x/denokv": "./src/x/denokv.ts",
25
+ "./x/fresh": "./src/x/fresh.ts",
26
+ "./x/hono": "./src/x/hono.ts",
27
+ "./x/sveltekit": "./src/x/sveltekit.ts"
23
28
  };
24
29
  var imports = {
25
30
  "@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
@@ -9,7 +9,7 @@ const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runt
9
9
 
10
10
  //#region deno.json
11
11
  var name = "@fedify/fedify";
12
- var version = "2.0.0-pr.467.1876+1fd56163";
12
+ var version = "2.0.0-pr.469.1873+ebbd8642";
13
13
  var license = "MIT";
14
14
  var exports$1 = {
15
15
  ".": "./src/mod.ts",
@@ -20,7 +20,12 @@ var exports$1 = {
20
20
  "./testing": "./src/testing/mod.ts",
21
21
  "./vocab": "./src/vocab/mod.ts",
22
22
  "./utils": "./src/utils/mod.ts",
23
- "./webfinger": "./src/webfinger/mod.ts"
23
+ "./webfinger": "./src/webfinger/mod.ts",
24
+ "./x/cfworkers": "./src/x/cfworkers.ts",
25
+ "./x/denokv": "./src/x/denokv.ts",
26
+ "./x/fresh": "./src/x/fresh.ts",
27
+ "./x/hono": "./src/x/hono.ts",
28
+ "./x/sveltekit": "./src/x/sveltekit.ts"
24
29
  };
25
30
  var imports = {
26
31
  "@multiformats/base-x": "npm:@multiformats/base-x@^4.0.1",
@@ -0,0 +1,15 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+
5
+ import "./transformers-BFT6d7J5.js";
6
+ import "./lookup-BXY5QJif.js";
7
+ import "./actor-Bo3uuvwH.js";
8
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-RgDZByG7.js";
9
+ import "./http-nnaaa9xj.js";
10
+ import "./proof-4L3D-iT4.js";
11
+ import "./types-BtUjyi5y.js";
12
+ import "./kv-cache-B_RVzls5.js";
13
+ import "./vocab-B74bq08l.js";
14
+
15
+ export { FederationImpl };
@@ -3,23 +3,23 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
  globalThis.addEventListener = () => {};
5
5
 
6
- import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, RouterError, deno_default, getTypeId, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-D029Hgmr.js";
6
+ import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, RouterError, deno_default, getTypeId, lookupObject, lookupWebFinger, traverseCollection } from "./lookup-BBrk-_5k.js";
7
7
  import { getNodeInfo } from "./client-pY7-3icS.js";
8
8
  import { nodeInfoToJson } from "./types-C2XVl6gj.js";
9
- import { exportJwk, importJwk, validateCryptoKey } from "./key-KT2Sua_C.js";
10
- import { verifyRequest } from "./http-C5NpY8dE.js";
11
- import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-RF_UxhNp.js";
12
- import { doesActorOwnKey, getKeyOwner } from "./owner-6JbsaBQB.js";
13
- import { signObject, verifyObject } from "./proof-gHlNO1tx.js";
14
- import { getAuthenticatedDocumentLoader } from "./docloader-BaWIuRb2.js";
9
+ import { exportJwk, importJwk, validateCryptoKey } from "./key-bc3A8THw.js";
10
+ import { verifyRequest } from "./http-D8SvAGVC.js";
11
+ import { detachSignature, hasSignature, signJsonLd, verifyJsonLd } from "./ld-D5Vg307g.js";
12
+ import { doesActorOwnKey, getKeyOwner } from "./owner-DSDpCSms.js";
13
+ import { signObject, verifyObject } from "./proof-Bvu8zaM1.js";
14
+ import { getAuthenticatedDocumentLoader } from "./docloader-B1AZ1LMA.js";
15
15
  import { kvCache } from "./kv-cache-DN9pfMBe.js";
16
- import { routeActivity } from "./inbox-Bu3THMpw.js";
17
- import { FederationBuilderImpl } from "./builder-DCBCGtfN.js";
16
+ import { routeActivity } from "./inbox-C5M1_a0k.js";
17
+ import { FederationBuilderImpl } from "./builder-DFaO3_4-.js";
18
18
  import { buildCollectionSynchronizationHeader } from "./collection-BzWsN9pB.js";
19
- import { KvKeyCache } from "./keycache-CH77mwdO.js";
19
+ import { KvKeyCache } from "./keycache-CpTjHRpy.js";
20
20
  import { acceptsJsonLd } from "./negotiation-C4nFufNk.js";
21
21
  import { createExponentialBackoffPolicy } from "./retry-CfF8Gn4d.js";
22
- import { extractInboxes, sendActivity } from "./send-CmpkYTnR.js";
22
+ import { extractInboxes, sendActivity } from "./send-Cr3PSs0N.js";
23
23
  import { getDocumentLoader } from "@fedify/vocab-runtime";
24
24
  import { getLogger, withContext } from "@logtape/logtape";
25
25
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
@@ -0,0 +1,15 @@
1
+
2
+ const { Temporal } = require("@js-temporal/polyfill");
3
+ const { URLPattern } = require("urlpattern-polyfill");
4
+
5
+ require('./transformers-CoBS-oFG.cjs');
6
+ require('./lookup-DO7ZeFb2.cjs');
7
+ require('./actor-DoaVs0vL.cjs');
8
+ const require_middleware = require('./middleware-Dy7xPuu-.cjs');
9
+ require('./http-D27ZccIJ.cjs');
10
+ require('./proof-C1-VSUNW.cjs');
11
+ require('./types-CWgzGaqk.cjs');
12
+ require('./kv-cache-CZcZLaEo.cjs');
13
+ require('./vocab-HJLl6-1F.cjs');
14
+
15
+ exports.FederationImpl = require_middleware.FederationImpl;
@@ -0,0 +1,26 @@
1
+
2
+ import { Temporal } from "@js-temporal/polyfill";
3
+ import { URLPattern } from "urlpattern-polyfill";
4
+ globalThis.addEventListener = () => {};
5
+
6
+ import "./lookup-BBrk-_5k.js";
7
+ import { ContextImpl, FederationImpl, InboxContextImpl, KvSpecDeterminer, createFederation } from "./middleware-CU0RJROn.js";
8
+ import "./client-pY7-3icS.js";
9
+ import "./types-C2XVl6gj.js";
10
+ import "./actor-DhFfLv7K.js";
11
+ import "./key-bc3A8THw.js";
12
+ import "./http-D8SvAGVC.js";
13
+ import "./ld-D5Vg307g.js";
14
+ import "./owner-DSDpCSms.js";
15
+ import "./proof-Bvu8zaM1.js";
16
+ import "./docloader-B1AZ1LMA.js";
17
+ import "./kv-cache-DN9pfMBe.js";
18
+ import "./inbox-C5M1_a0k.js";
19
+ import "./builder-DFaO3_4-.js";
20
+ import "./collection-BzWsN9pB.js";
21
+ import "./keycache-CpTjHRpy.js";
22
+ import "./negotiation-C4nFufNk.js";
23
+ import "./retry-CfF8Gn4d.js";
24
+ import "./send-Cr3PSs0N.js";
25
+
26
+ export { FederationImpl };
@@ -4,13 +4,13 @@
4
4
 
5
5
  const require_chunk = require('./chunk-DqRYRqnO.cjs');
6
6
  const require_transformers = require('./transformers-CoBS-oFG.cjs');
7
- const require_lookup = require('./lookup-ZMUieFn0.cjs');
8
- const require_actor = require('./actor-9gjVpXgd.cjs');
9
- const require_http = require('./http-zanXjqHu.cjs');
10
- const require_proof = require('./proof-CB7YKfl6.cjs');
7
+ const require_lookup = require('./lookup-DO7ZeFb2.cjs');
8
+ const require_actor = require('./actor-DoaVs0vL.cjs');
9
+ const require_http = require('./http-D27ZccIJ.cjs');
10
+ const require_proof = require('./proof-C1-VSUNW.cjs');
11
11
  const require_types = require('./types-CWgzGaqk.cjs');
12
- const require_kv_cache = require('./kv-cache-DxziE8JZ.cjs');
13
- const require_vocab = require('./vocab-I0FskT0s.cjs');
12
+ const require_kv_cache = require('./kv-cache-CZcZLaEo.cjs');
13
+ const require_vocab = require('./vocab-HJLl6-1F.cjs');
14
14
  const __logtape_logtape = require_chunk.__toESM(require("@logtape/logtape"));
15
15
  const __opentelemetry_api = require_chunk.__toESM(require("@opentelemetry/api"));
16
16
  const __fedify_vocab_runtime = require_chunk.__toESM(require("@fedify/vocab-runtime"));
@@ -339,7 +339,7 @@ var FederationBuilderImpl = class {
339
339
  this.collectionTypeIds = {};
340
340
  }
341
341
  async build(options) {
342
- const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-C2X56NUR.cjs"));
342
+ const { FederationImpl: FederationImpl$1 } = await Promise.resolve().then(() => require("./middleware-D4qQ6MLq.cjs"));
343
343
  const f = new FederationImpl$1(options);
344
344
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
345
345
  f.router = this.router.clone();
@@ -3,13 +3,13 @@
3
3
  import { URLPattern } from "urlpattern-polyfill";
4
4
 
5
5
  import { getDefaultActivityTransformers } from "./transformers-BFT6d7J5.js";
6
- import { deno_default, lookupWebFinger } from "./lookup-EXeITSkB.js";
7
- import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-CsH6QBYT.js";
8
- import { doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-Cw6Nfbii.js";
9
- import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-D8SPvADT.js";
6
+ import { deno_default, lookupWebFinger } from "./lookup-BXY5QJif.js";
7
+ import { Activity, Collection, CollectionPage, CryptographicKey, Link, Multikey, Object as Object$1, OrderedCollection, OrderedCollectionPage, getTypeId } from "./actor-Bo3uuvwH.js";
8
+ import { doubleKnock, exportJwk, importJwk, validateCryptoKey, verifyRequest } from "./http-nnaaa9xj.js";
9
+ import { detachSignature, doesActorOwnKey, getKeyOwner, hasSignature, signJsonLd, signObject, verifyJsonLd, verifyObject } from "./proof-4L3D-iT4.js";
10
10
  import { getNodeInfo, nodeInfoToJson } from "./types-BtUjyi5y.js";
11
- import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-DspkH6f2.js";
12
- import { lookupObject, traverseCollection } from "./vocab-BY_op-IW.js";
11
+ import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-B_RVzls5.js";
12
+ import { lookupObject, traverseCollection } from "./vocab-B74bq08l.js";
13
13
  import { getLogger, withContext } from "@logtape/logtape";
14
14
  import { SpanKind, SpanStatusCode, context, propagation, trace } from "@opentelemetry/api";
15
15
  import { getDocumentLoader } from "@fedify/vocab-runtime";
@@ -338,7 +338,7 @@ var FederationBuilderImpl = class {
338
338
  this.collectionTypeIds = {};
339
339
  }
340
340
  async build(options) {
341
- const { FederationImpl: FederationImpl$1 } = await import("./middleware-BuhoXDtM.js");
341
+ const { FederationImpl: FederationImpl$1 } = await import("./middleware-BU2XnCCI.js");
342
342
  const f = new FederationImpl$1(options);
343
343
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
344
344
  f.router = this.router.clone();
@@ -1,7 +1,7 @@
1
1
  import { Temporal } from "@js-temporal/polyfill";
2
2
  import { URLPattern } from "urlpattern-polyfill";
3
3
  import { Activity } from "./vocab-BCWe1Ih5.js";
4
- import { ActivityTransformer, Context } from "./context-V-XS2_6O.js";
4
+ import { ActivityTransformer, Context } from "./context-DG0huGW-.js";
5
5
 
6
6
  //#region src/compat/transformers.d.ts
7
7
 
@@ -1,5 +1,5 @@
1
1
  import { Activity } from "./vocab-CeDBzu-f.cjs";
2
- import { ActivityTransformer, Context } from "./context-PxGADCsD.cjs";
2
+ import { ActivityTransformer, Context } from "./context-DJ8aSy2Q.cjs";
3
3
 
4
4
  //#region src/compat/transformers.d.ts
5
5
 
package/dist/mod.cjs CHANGED
@@ -4,15 +4,15 @@
4
4
 
5
5
  const require_transformers = require('./transformers-CoBS-oFG.cjs');
6
6
  require('./compat-DmDDELst.cjs');
7
- const require_lookup = require('./lookup-ZMUieFn0.cjs');
8
- const require_actor = require('./actor-9gjVpXgd.cjs');
9
- const require_middleware = require('./middleware-CMT8W2oG.cjs');
10
- const require_http = require('./http-zanXjqHu.cjs');
11
- const require_proof = require('./proof-CB7YKfl6.cjs');
7
+ const require_lookup = require('./lookup-DO7ZeFb2.cjs');
8
+ const require_actor = require('./actor-DoaVs0vL.cjs');
9
+ const require_middleware = require('./middleware-Dy7xPuu-.cjs');
10
+ const require_http = require('./http-D27ZccIJ.cjs');
11
+ const require_proof = require('./proof-C1-VSUNW.cjs');
12
12
  const require_federation = require('./federation-CRpdnOMS.cjs');
13
13
  const require_types = require('./types-CWgzGaqk.cjs');
14
- const require_kv_cache = require('./kv-cache-DxziE8JZ.cjs');
15
- const require_vocab = require('./vocab-I0FskT0s.cjs');
14
+ const require_kv_cache = require('./kv-cache-CZcZLaEo.cjs');
15
+ const require_vocab = require('./vocab-HJLl6-1F.cjs');
16
16
  require('./nodeinfo-CdN0rEnZ.cjs');
17
17
  require('./sig-YYj5tCnr.cjs');
18
18
  require('./utils-DyRU1gdZ.cjs');
package/dist/mod.d.cts CHANGED
@@ -5,11 +5,12 @@ import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessage
5
5
  import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-B4HbyP8s.cjs";
6
6
  import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-BxRCHTz-.cjs";
7
7
  import { ResourceDescriptor, lookupWebFinger } from "./mod-C58MZ7Wx.cjs";
8
- import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-PxGADCsD.cjs";
8
+ import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-DJ8aSy2Q.cjs";
9
9
  import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-Bxr0Q87_.cjs";
10
- import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-BoRKfJPE.cjs";
11
- import "./mod-CcDPcLJW.cjs";
10
+ import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-DcJPkXD5.cjs";
11
+ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-DJcZDvjA.cjs";
12
12
  import "./mod-B-hUPT2N.cjs";
13
- import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DgxG-byT.cjs";
14
- import { getAuthenticatedDocumentLoader, kvCache } from "./mod-DMpuiKXi.cjs";
13
+ import "./mod-C2tOeRkN.cjs";
14
+ import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-DgdBYYa0.cjs";
15
+ import { getAuthenticatedDocumentLoader, kvCache } from "./mod-0noXw66R.cjs";
15
16
  export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvKey, KvStore, KvStoreSetOptions, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, getTypeId, importJwk, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
package/dist/mod.d.ts CHANGED
@@ -7,11 +7,12 @@ import { FetchKeyOptions, FetchKeyResult, HttpMessageSignaturesSpec, HttpMessage
7
7
  import { DoesActorOwnKeyOptions, GetKeyOwnerOptions, doesActorOwnKey, getKeyOwner } from "./owner-kQRGVXG1.js";
8
8
  import { FediverseHandle, LookupObjectOptions, PUBLIC_COLLECTION, TraverseCollectionOptions, getTypeId, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./mod-BlVovdcy.js";
9
9
  import { ResourceDescriptor, lookupWebFinger } from "./mod-Ds0mpFZU.js";
10
- import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InProcessMessageQueue, InProcessMessageQueueOptions, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParallelMessageQueue, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-V-XS2_6O.js";
10
+ import { ActivityTransformer, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, AuthorizePredicate, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, ConstructorWithTypeId, Context, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, ForwardActivityOptions, GetSignedKeyOptions, IdempotencyKeyCallback, IdempotencyStrategy, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, Message, NodeInfoDispatcher, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, OutboxErrorHandler, PageItems, ParseUriResult, RequestContext, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, SharedInboxKeyDispatcher, WebFingerLinksDispatcher, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./context-DG0huGW-.js";
11
11
  import { KvKey, KvStore, KvStoreSetOptions, MemoryKvStore } from "./kv-BKNZ-Tb-.js";
12
- import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-Cdo6SYlJ.js";
13
- import "./mod-bjzj5QIb.js";
12
+ import { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue } from "./mq-CUKlBw08.js";
13
+ import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./mod-BoHnwOCs.js";
14
14
  import "./mod-CVgZgliM.js";
15
- import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-D5Z2tISD.js";
16
- import { getAuthenticatedDocumentLoader, kvCache } from "./mod-aAE2wOWV.js";
15
+ import "./mod-xIj-IT58.js";
16
+ import { CreateProofOptions, CreateSignatureOptions, SignJsonLdOptions, SignObjectOptions, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifySignatureOptions, attachSignature, createProof, createSignature, detachSignature, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./mod-B2iOw50L.js";
17
+ import { getAuthenticatedDocumentLoader, kvCache } from "./mod-B9M-8jm2.js";
17
18
  export { Accept, Activity, ActivityTransformer, Actor, ActorAliasMapper, ActorCallbackSetters, ActorDispatcher, ActorHandleMapper, ActorKeyPair, ActorKeyPairsDispatcher, ActorTypeName, Add, Announce, Application, Arrive, Article, Audio, AuthorizePredicate, Block, ChatMessage, Collection, CollectionCallbackSetters, CollectionCounter, CollectionCursor, CollectionDispatcher, CollectionPage, ConstructorWithTypeId, Context, Create, CreateExponentialBackoffPolicyOptions, CreateFederationOptions, CreateProofOptions, CreateSignatureOptions, CryptographicKey, CustomCollectionCallbackSetters, CustomCollectionCounter, CustomCollectionCursor, CustomCollectionDispatcher, DataIntegrityProof, Delete, DidService, Dislike, Document, DoesActorOwnKeyOptions, Emoji, EmojiReact, Endpoints, Event, Export, Federatable, Federation, FederationBuilder, FederationFetchOptions, FederationKvPrefixes, FederationOptions, FederationOrigin, FederationQueueOptions, FederationStartQueueOptions, FediverseHandle, FetchKeyOptions, FetchKeyResult, Flag, Follow, ForwardActivityOptions, GetActorHandleOptions, GetKeyOwnerOptions, GetNodeInfoOptions, GetSignedKeyOptions, Group, Hashtag, HttpMessageSignaturesSpec, HttpMessageSignaturesSpecDeterminer, IdempotencyKeyCallback, IdempotencyStrategy, Ignore, Image, InProcessMessageQueue, InProcessMessageQueueOptions, InboundService, InboxContext, InboxErrorHandler, InboxListener, InboxListenerSetters, IntransitiveActivity, Invite, Join, JsonValue, KeyCache, KvKey, KvStore, KvStoreSetOptions, Leave, Like, Link, Listen, LookupObjectOptions, MemoryKvStore, Mention, Message, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, Move, Multikey, NodeInfo, NodeInfoDispatcher, NormalizeActorHandleOptions, Note, Object$1 as Object, ObjectAuthorizePredicate, ObjectCallbackSetters, ObjectDispatcher, Offer, OrderedCollection, OrderedCollectionPage, Organization, OutboundService, OutboxErrorHandler, PUBLIC_COLLECTION, Page, PageItems, ParallelMessageQueue, ParseNodeInfoOptions, ParseUriResult, Person, Place, Profile, PropertyValue, Protocol, Question, Read, Recipient, Reject, Relationship, Remove, RequestContext, ResourceDescriptor, RespondWithObjectOptions, RetryContext, RetryPolicy, Rfc6570Expression, RouteActivityOptions, Router, RouterError, RouterOptions, RouterRouteResult, SendActivityOptions, SendActivityOptionsForCollection, SenderKeyPair, Service, Services, SharedInboxKeyDispatcher, SignJsonLdOptions, SignObjectOptions, SignRequestOptions, Software, Source, TentativeAccept, TentativeReject, Tombstone, Travel, TraverseCollectionOptions, Undo, Update, Usage, VerifyJsonLdOptions, VerifyObjectOptions, VerifyProofOptions, VerifyRequestOptions, VerifySignatureOptions, Video, View, WebFingerLinksDispatcher, actorDehydrator, attachSignature, autoIdAssigner, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, createProof, createSignature, detachSignature, digest, doesActorOwnKey, exportJwk, fetchKey, generateCryptoKeyPair, getActorClassByTypeName, getActorHandle, getActorTypeName, getAuthenticatedDocumentLoader, getDefaultActivityTransformers, getKeyOwner, getNodeInfo, getTypeId, importJwk, isActor, isFediverseHandle, kvCache, lookupObject, lookupWebFinger, nodeInfoToJson, normalizeActorHandle, parseFediverseHandle, parseNodeInfo, respondWithObject, respondWithObjectIfAcceptable, signJsonLd, signObject, signRequest, toAcctUrl, traverseCollection, verifyJsonLd, verifyObject, verifyProof, verifyRequest, verifySignature };
package/dist/mod.js CHANGED
@@ -4,15 +4,15 @@
4
4
 
5
5
  import { actorDehydrator, autoIdAssigner, getDefaultActivityTransformers } from "./transformers-BFT6d7J5.js";
6
6
  import "./compat-nxUqe4Z-.js";
7
- import { lookupWebFinger } from "./lookup-EXeITSkB.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, 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, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "./actor-CsH6QBYT.js";
9
- import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-C32-qFyf.js";
10
- import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-Cw6Nfbii.js";
11
- import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-D8SPvADT.js";
7
+ import { lookupWebFinger } from "./lookup-BXY5QJif.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, 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, getActorClassByTypeName, getActorHandle, getActorTypeName, getTypeId, isActor, normalizeActorHandle } from "./actor-Bo3uuvwH.js";
9
+ import { Router, RouterError, buildCollectionSynchronizationHeader, createExponentialBackoffPolicy, createFederation, createFederationBuilder, digest, respondWithObject, respondWithObjectIfAcceptable } from "./middleware-RgDZByG7.js";
10
+ import { exportJwk, fetchKey, generateCryptoKeyPair, importJwk, signRequest, verifyRequest } from "./http-nnaaa9xj.js";
11
+ import { attachSignature, createProof, createSignature, detachSignature, doesActorOwnKey, getKeyOwner, signJsonLd, signObject, verifyJsonLd, verifyObject, verifyProof, verifySignature } from "./proof-4L3D-iT4.js";
12
12
  import { InProcessMessageQueue, MemoryKvStore, ParallelMessageQueue } from "./federation-jcR8-ZxP.js";
13
13
  import { getNodeInfo, nodeInfoToJson, parseNodeInfo } from "./types-BtUjyi5y.js";
14
- import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-DspkH6f2.js";
15
- import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-BY_op-IW.js";
14
+ import { getAuthenticatedDocumentLoader, kvCache } from "./kv-cache-B_RVzls5.js";
15
+ import { PUBLIC_COLLECTION, isFediverseHandle, lookupObject, parseFediverseHandle, toAcctUrl, traverseCollection } from "./vocab-B74bq08l.js";
16
16
  import "./nodeinfo-BnthBobC.js";
17
17
  import "./sig-C34-oHBl.js";
18
18
  import "./utils-D-Va7aXC.js";
@@ -0,0 +1,143 @@
1
+ import { Temporal } from "@js-temporal/polyfill";
2
+ import { URLPattern } from "urlpattern-polyfill";
3
+
4
+ //#region src/federation/mq.d.ts
5
+ /**
6
+ * Additional options for enqueuing a message in a queue.
7
+ *
8
+ * @since 0.5.0
9
+ */
10
+ interface MessageQueueEnqueueOptions {
11
+ /**
12
+ * The delay before the message is enqueued. No delay by default.
13
+ *
14
+ * It must not be negative.
15
+ */
16
+ delay?: Temporal.Duration;
17
+ }
18
+ /**
19
+ * Additional options for listening to a message queue.
20
+ *
21
+ * @since 1.0.0
22
+ */
23
+ interface MessageQueueListenOptions {
24
+ /**
25
+ * The signal to abort listening to the message queue.
26
+ */
27
+ signal?: AbortSignal;
28
+ }
29
+ /**
30
+ * An abstract interface for a message queue.
31
+ *
32
+ * @since 0.5.0
33
+ */
34
+ interface MessageQueue {
35
+ /**
36
+ * Whether the message queue backend provides native retry mechanisms.
37
+ * When `true`, Fedify will skip its own retry logic and rely on the backend
38
+ * to handle retries. When `false` or omitted, Fedify will handle retries
39
+ * using its own retry policies.
40
+ *
41
+ * @default `false`
42
+ * @since 1.7.0
43
+ */
44
+ readonly nativeRetrial?: boolean;
45
+ /**
46
+ * Enqueues a message in the queue.
47
+ * @param message The message to enqueue.
48
+ * @param options Additional options for enqueuing the message.
49
+ */
50
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
51
+ /**
52
+ * Enqueues multiple messages in the queue. This operation is optional,
53
+ * and may not be supported by all implementations. If not supported,
54
+ * Fedify will invoke {@link enqueue} for each message.
55
+ *
56
+ * @param messages The messages to enqueue.
57
+ * @param options Additional options for enqueuing the messages.
58
+ */
59
+ enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
60
+ /**
61
+ * Listens for messages in the queue.
62
+ * @param handler The handler for messages in the queue.
63
+ * @param options Additional options for listening to the message queue.
64
+ * @returns A promise that resolves when the listening is done. It never
65
+ * rejects, and is resolved when the signal is aborted. If no
66
+ * signal is provided, it never resolves.
67
+ */
68
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
69
+ }
70
+ /**
71
+ * Additional options for {@link InProcessMessageQueue}.
72
+ * @since 1.0.0
73
+ */
74
+ interface InProcessMessageQueueOptions {
75
+ /**
76
+ * The interval to poll for messages in the queue. 5 seconds by default.
77
+ * @default `{ seconds: 5 }`
78
+ */
79
+ pollInterval?: Temporal.Duration | Temporal.DurationLike;
80
+ }
81
+ /**
82
+ * A message queue that processes messages in the same process.
83
+ * Do not use this in production as it does neither persist messages nor
84
+ * distribute them across multiple processes.
85
+ *
86
+ * @since 0.5.0
87
+ */
88
+ declare class InProcessMessageQueue implements MessageQueue {
89
+ #private;
90
+ /**
91
+ * In-process message queue does not provide native retry mechanisms.
92
+ * @since 1.7.0
93
+ */
94
+ readonly nativeRetrial = false;
95
+ /**
96
+ * Constructs a new {@link InProcessMessageQueue} with the given options.
97
+ * @param options Additional options for the in-process message queue.
98
+ */
99
+ constructor(options?: InProcessMessageQueueOptions);
100
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
101
+ enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
102
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
103
+ }
104
+ /**
105
+ * A message queue that processes messages in parallel. It takes another
106
+ * {@link MessageQueue}, and processes messages in parallel up to a certain
107
+ * number of workers.
108
+ *
109
+ * Actually, it's rather a decorator than a queue itself.
110
+ *
111
+ * Note that the workers do not run in truly parallel, in the sense that they
112
+ * are not running in separate threads or processes. They are running in the
113
+ * same process, but are scheduled to run in parallel. Hence, this is useful
114
+ * for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
115
+ * workloads.
116
+ *
117
+ * @since 1.0.0
118
+ */
119
+ declare class ParallelMessageQueue implements MessageQueue {
120
+ #private;
121
+ readonly queue: MessageQueue;
122
+ readonly workers: number;
123
+ /**
124
+ * Inherits the native retry capability from the wrapped queue.
125
+ * @since 1.7.0
126
+ */
127
+ readonly nativeRetrial?: boolean;
128
+ /**
129
+ * Constructs a new {@link ParallelMessageQueue} with the given queue and
130
+ * number of workers.
131
+ * @param queue The message queue to use under the hood. Note that
132
+ * {@link ParallelMessageQueue} cannot be nested.
133
+ * @param workers The number of workers to process messages in parallel.
134
+ * @throws {TypeError} If the given queue is an instance of
135
+ * {@link ParallelMessageQueue}.
136
+ */
137
+ constructor(queue: MessageQueue, workers: number);
138
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
139
+ enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
140
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
141
+ }
142
+ //#endregion
143
+ export { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue };
@@ -0,0 +1,140 @@
1
+ //#region src/federation/mq.d.ts
2
+ /**
3
+ * Additional options for enqueuing a message in a queue.
4
+ *
5
+ * @since 0.5.0
6
+ */
7
+ interface MessageQueueEnqueueOptions {
8
+ /**
9
+ * The delay before the message is enqueued. No delay by default.
10
+ *
11
+ * It must not be negative.
12
+ */
13
+ delay?: Temporal.Duration;
14
+ }
15
+ /**
16
+ * Additional options for listening to a message queue.
17
+ *
18
+ * @since 1.0.0
19
+ */
20
+ interface MessageQueueListenOptions {
21
+ /**
22
+ * The signal to abort listening to the message queue.
23
+ */
24
+ signal?: AbortSignal;
25
+ }
26
+ /**
27
+ * An abstract interface for a message queue.
28
+ *
29
+ * @since 0.5.0
30
+ */
31
+ interface MessageQueue {
32
+ /**
33
+ * Whether the message queue backend provides native retry mechanisms.
34
+ * When `true`, Fedify will skip its own retry logic and rely on the backend
35
+ * to handle retries. When `false` or omitted, Fedify will handle retries
36
+ * using its own retry policies.
37
+ *
38
+ * @default `false`
39
+ * @since 1.7.0
40
+ */
41
+ readonly nativeRetrial?: boolean;
42
+ /**
43
+ * Enqueues a message in the queue.
44
+ * @param message The message to enqueue.
45
+ * @param options Additional options for enqueuing the message.
46
+ */
47
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
48
+ /**
49
+ * Enqueues multiple messages in the queue. This operation is optional,
50
+ * and may not be supported by all implementations. If not supported,
51
+ * Fedify will invoke {@link enqueue} for each message.
52
+ *
53
+ * @param messages The messages to enqueue.
54
+ * @param options Additional options for enqueuing the messages.
55
+ */
56
+ enqueueMany?: (messages: any[], options?: MessageQueueEnqueueOptions) => Promise<void>;
57
+ /**
58
+ * Listens for messages in the queue.
59
+ * @param handler The handler for messages in the queue.
60
+ * @param options Additional options for listening to the message queue.
61
+ * @returns A promise that resolves when the listening is done. It never
62
+ * rejects, and is resolved when the signal is aborted. If no
63
+ * signal is provided, it never resolves.
64
+ */
65
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
66
+ }
67
+ /**
68
+ * Additional options for {@link InProcessMessageQueue}.
69
+ * @since 1.0.0
70
+ */
71
+ interface InProcessMessageQueueOptions {
72
+ /**
73
+ * The interval to poll for messages in the queue. 5 seconds by default.
74
+ * @default `{ seconds: 5 }`
75
+ */
76
+ pollInterval?: Temporal.Duration | Temporal.DurationLike;
77
+ }
78
+ /**
79
+ * A message queue that processes messages in the same process.
80
+ * Do not use this in production as it does neither persist messages nor
81
+ * distribute them across multiple processes.
82
+ *
83
+ * @since 0.5.0
84
+ */
85
+ declare class InProcessMessageQueue implements MessageQueue {
86
+ #private;
87
+ /**
88
+ * In-process message queue does not provide native retry mechanisms.
89
+ * @since 1.7.0
90
+ */
91
+ readonly nativeRetrial = false;
92
+ /**
93
+ * Constructs a new {@link InProcessMessageQueue} with the given options.
94
+ * @param options Additional options for the in-process message queue.
95
+ */
96
+ constructor(options?: InProcessMessageQueueOptions);
97
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
98
+ enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
99
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
100
+ }
101
+ /**
102
+ * A message queue that processes messages in parallel. It takes another
103
+ * {@link MessageQueue}, and processes messages in parallel up to a certain
104
+ * number of workers.
105
+ *
106
+ * Actually, it's rather a decorator than a queue itself.
107
+ *
108
+ * Note that the workers do not run in truly parallel, in the sense that they
109
+ * are not running in separate threads or processes. They are running in the
110
+ * same process, but are scheduled to run in parallel. Hence, this is useful
111
+ * for I/O-bound tasks, but not for CPU-bound tasks, which is okay for Fedify's
112
+ * workloads.
113
+ *
114
+ * @since 1.0.0
115
+ */
116
+ declare class ParallelMessageQueue implements MessageQueue {
117
+ #private;
118
+ readonly queue: MessageQueue;
119
+ readonly workers: number;
120
+ /**
121
+ * Inherits the native retry capability from the wrapped queue.
122
+ * @since 1.7.0
123
+ */
124
+ readonly nativeRetrial?: boolean;
125
+ /**
126
+ * Constructs a new {@link ParallelMessageQueue} with the given queue and
127
+ * number of workers.
128
+ * @param queue The message queue to use under the hood. Note that
129
+ * {@link ParallelMessageQueue} cannot be nested.
130
+ * @param workers The number of workers to process messages in parallel.
131
+ * @throws {TypeError} If the given queue is an instance of
132
+ * {@link ParallelMessageQueue}.
133
+ */
134
+ constructor(queue: MessageQueue, workers: number);
135
+ enqueue(message: any, options?: MessageQueueEnqueueOptions): Promise<void>;
136
+ enqueueMany(messages: any[], options?: MessageQueueEnqueueOptions): Promise<void>;
137
+ listen(handler: (message: any) => Promise<void> | void, options?: MessageQueueListenOptions): Promise<void>;
138
+ }
139
+ //#endregion
140
+ export { InProcessMessageQueue, InProcessMessageQueueOptions, MessageQueue, MessageQueueEnqueueOptions, MessageQueueListenOptions, ParallelMessageQueue };