@fedify/fedify 2.4.0-dev.1508 → 2.4.0-dev.1531

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 (109) hide show
  1. package/README.md +0 -4
  2. package/dist/{assert-DvVHoIZ0.mjs → assert-OguE97r2.mjs} +1 -1
  3. package/dist/{assert_instance_of-CxoC8bVq.mjs → assert_instance_of-DBC5X09g.mjs} +1 -1
  4. package/dist/{assert_not_equals-C8vcTTA3.mjs → assert_not_equals-DkVK8oqV.mjs} +1 -1
  5. package/dist/{assert_rejects-DAdaaIWM.mjs → assert_rejects-DN60FHPX.mjs} +2 -2
  6. package/dist/{assert_strict_equals-BzqyKuYL.mjs → assert_strict_equals-XEgZAlrj.mjs} +1 -1
  7. package/dist/{assert_throws-zN79lgIC.mjs → assert_throws-BOkhLGYc.mjs} +1 -1
  8. package/dist/{builder-DlWCek6Z.mjs → builder-CmQLlEE1.mjs} +3 -23
  9. package/dist/compat/mod.d.cts +1 -1
  10. package/dist/compat/mod.d.ts +1 -1
  11. package/dist/compat/outgoing-jsonld.test.mjs +3 -3
  12. package/dist/compat/public-audience.test.mjs +3 -3
  13. package/dist/compat/transformers.test.mjs +5 -5
  14. package/dist/{context-CYF8X0ft.d.cts → context-BBVLF7lx.d.cts} +272 -543
  15. package/dist/{context-BF5B4ZDk.d.ts → context-BU6jSQdo.d.ts} +272 -542
  16. package/dist/{context-BBRTgkrs.mjs → context-DVoTs_wM.mjs} +2 -8
  17. package/dist/{deno-nexucTAX.mjs → deno-bSDsva_4.mjs} +1 -1
  18. package/dist/{docloader-DAdEN549.mjs → docloader-DlmmTFJc.mjs} +3 -3
  19. package/dist/federation/builder.test.mjs +5 -5
  20. package/dist/federation/circuit-breaker.test.mjs +5 -5
  21. package/dist/federation/collection.test.mjs +3 -3
  22. package/dist/federation/handler.test.mjs +13 -13
  23. package/dist/federation/idempotency.test.mjs +6 -6
  24. package/dist/federation/inbox.test.mjs +3 -3
  25. package/dist/federation/keycache.test.mjs +5 -5
  26. package/dist/federation/kv.test.mjs +3 -3
  27. package/dist/federation/metrics.test.mjs +4 -4
  28. package/dist/federation/middleware.test.mjs +19 -200
  29. package/dist/federation/mod.cjs +259 -3
  30. package/dist/federation/mod.d.cts +4 -4
  31. package/dist/federation/mod.d.ts +4 -4
  32. package/dist/federation/mod.js +257 -1
  33. package/dist/federation/mq.test.mjs +261 -103
  34. package/dist/federation/negotiation.test.mjs +4 -4
  35. package/dist/federation/retry.test.mjs +3 -3
  36. package/dist/federation/router.test.mjs +5 -5
  37. package/dist/federation/send.test.mjs +10 -10
  38. package/dist/federation/temporal.test.mjs +4 -4
  39. package/dist/federation/webfinger.test.mjs +6 -6
  40. package/dist/{http-inQqS3yx.mjs → http-DwsK1LoE.mjs} +4 -4
  41. package/dist/{http-BCj9dlA_.cjs → http-bsrB-Tun.cjs} +1 -1
  42. package/dist/{http-Dv3147TL.js → http-yVXJ4RhY.js} +1 -1
  43. package/dist/{key-CGrr6-I2.mjs → key-C0aqQKRk.mjs} +2 -2
  44. package/dist/{kv-cache-C3qkFkbt.mjs → kv-cache-D3EQwzQ4.mjs} +1 -1
  45. package/dist/{kv-cache-c8X6svwE.cjs → kv-cache-Dv62PM2B.cjs} +1 -1
  46. package/dist/{kv-cache-C2oTEXyb.js → kv-cache-M2xxXg9M.js} +1 -1
  47. package/dist/{ld-fnWaNT8y.mjs → ld-CBIxjtov.mjs} +3 -3
  48. package/dist/{metrics-C5hMINAa.mjs → metrics-CwNvxtP6.mjs} +1 -1
  49. package/dist/{middleware-Dl2nyVgB.mjs → middleware-BWi34Ga3.mjs} +46 -306
  50. package/dist/{middleware-vQ_ZpgcX.js → middleware-BpMbjN9m.js} +31 -679
  51. package/dist/{middleware-DeVzbg1I.cjs → middleware-C27Pdo18.cjs} +30 -690
  52. package/dist/{middleware-CQlq6ykI.mjs → middleware-DiTi3jC5.mjs} +1 -1
  53. package/dist/{mod-BHEB3xhE.d.cts → mod-C0F6kvgS.d.cts} +1 -1
  54. package/dist/{mod-4WGAuR6X.d.ts → mod-vPYVoa5n.d.ts} +1 -1
  55. package/dist/mod.cjs +6 -6
  56. package/dist/mod.d.cts +5 -5
  57. package/dist/mod.d.ts +5 -5
  58. package/dist/mod.js +5 -5
  59. package/dist/{mq-DXMt_qCY.d.cts → mq-D-nlpY04.d.ts} +0 -34
  60. package/dist/{mq-B5_hohs7.d.ts → mq-D8uSFzxe.d.cts} +0 -34
  61. package/dist/nodeinfo/client.test.mjs +3 -3
  62. package/dist/nodeinfo/handler.test.mjs +5 -5
  63. package/dist/nodeinfo/types.test.mjs +4 -4
  64. package/dist/otel/exporter.test.mjs +3 -3
  65. package/dist/{outgoing-jsonld-BNL8AC14.mjs → outgoing-jsonld-L_DbOaFe.mjs} +1 -1
  66. package/dist/{owner-Bq2eZyO_.mjs → owner-SuWJf5wy.mjs} +2 -2
  67. package/dist/{proof-Buz7I8wj.cjs → proof-BclG-T7h.cjs} +1 -1
  68. package/dist/{proof-DZCjcFCd.mjs → proof-CZI5KQdk.mjs} +5 -5
  69. package/dist/{proof-CTG9azxN.js → proof-DMWr-n3N.js} +1 -1
  70. package/dist/{send-B253S5gN.mjs → send-1EADALaf.mjs} +3 -3
  71. package/dist/sig/accept.test.mjs +1 -1
  72. package/dist/sig/http.test.mjs +8 -8
  73. package/dist/sig/key.test.mjs +6 -6
  74. package/dist/sig/ld.test.mjs +7 -7
  75. package/dist/sig/mod.cjs +2 -2
  76. package/dist/sig/mod.js +2 -2
  77. package/dist/sig/owner.test.mjs +6 -6
  78. package/dist/sig/proof.test.mjs +8 -8
  79. package/dist/{std__assert-Dh6uLf_q.mjs → std__assert-BBjXFNOb.mjs} +4 -4
  80. package/dist/{temporal-d6TshGjq.mjs → temporal-GLaGoMUR.mjs} +1 -1
  81. package/dist/testing/mod.d.mts +8 -1037
  82. package/dist/testing/mod.mjs +2 -3
  83. package/dist/utils/docloader.test.mjs +6 -6
  84. package/dist/utils/kv-cache.test.mjs +1 -1
  85. package/dist/utils/mod.cjs +1 -1
  86. package/dist/utils/mod.js +1 -1
  87. package/package.json +7 -9
  88. package/dist/codec-CmlPqjNX.mjs +0 -103
  89. package/dist/federation/tasks/codec.test.d.mts +0 -2
  90. package/dist/federation/tasks/codec.test.mjs +0 -292
  91. package/dist/federation/tasks/enqueue.test.d.mts +0 -2
  92. package/dist/federation/tasks/enqueue.test.mjs +0 -992
  93. package/dist/federation/tasks/tasks.test.d.mts +0 -2
  94. package/dist/federation/tasks/tasks.test.mjs +0 -555
  95. package/dist/mq-03vS-C9P.mjs +0 -276
  96. package/dist/testing-Dy-WhqpN.mjs +0 -77
  97. /package/dist/{accept-CgDcxvjV.mjs → accept-CPkZzmGN.mjs} +0 -0
  98. /package/dist/{activity-listener-BeTGV3wc.mjs → activity-listener-tztVvlNb.mjs} +0 -0
  99. /package/dist/{assert_equals-PBVKNMJd.mjs → assert_equals-C-ZRDbaf.mjs} +0 -0
  100. /package/dist/{circuit-breaker-hJBB6jwA.mjs → circuit-breaker-CSWsyoef.mjs} +0 -0
  101. /package/dist/{client-B_A6mfn3.mjs → client-ByXmQhYD.mjs} +0 -0
  102. /package/dist/{collection-Dp5ky45w.mjs → collection-Cc3DVAhE.mjs} +0 -0
  103. /package/dist/{keycache-CaOR6NYg.mjs → keycache-BeU0LCII.mjs} +0 -0
  104. /package/dist/{keys-CSYsOMFG.mjs → keys-DGu1NFwu.mjs} +0 -0
  105. /package/dist/{kv-CIvR3Non.mjs → kv-rV3vodCc.mjs} +0 -0
  106. /package/dist/{negotiation-m_L2nyS3.mjs → negotiation-DDstyBvc.mjs} +0 -0
  107. /package/dist/{public-audience-c9zmYKgA.mjs → public-audience-Cvbr2Gzt.mjs} +0 -0
  108. /package/dist/{retry-DI4O-zYl.mjs → retry-CXg_MBI-.mjs} +0 -0
  109. /package/dist/{types-BFowWFTT.mjs → types-J53Kw7so.mjs} +0 -0
package/README.md CHANGED
@@ -9,9 +9,6 @@
9
9
  [![Matrix][Matrix badge]][Matrix]
10
10
  [![@fedify@hackers.pub][@fedify@hackers.pub badge]][@fedify@hackers.pub]
11
11
 
12
- > [!NOTE]
13
- > Looking for a quick demo? Here it is: [Fedify Demo] on Deno Playground.
14
-
15
12
  Fedify is a TypeScript library for building federated server apps
16
13
  powered by [ActivityPub] and other standards, so-called [fediverse].[^1]
17
14
  It aims to eliminate the complexity and boilerplate code when
@@ -63,7 +60,6 @@ in the fediverse!
63
60
  [Matrix]: https://matrix.to/#/#fedify:matrix.org
64
61
  [@fedify@hackers.pub badge]: https://fedi-badge.minhee.org/@fedify@hackers.pub/followers.svg
65
62
  [@fedify@hackers.pub]: https://hackers.pub/@fedify
66
- [Fedify Demo]: https://dash.deno.com/playground/fedify-demo
67
63
  [ActivityPub]: https://www.w3.org/TR/activitypub/
68
64
  [fediverse]: https://en.wikipedia.org/wiki/Fediverse
69
65
  [Activity Vocabulary]: https://www.w3.org/TR/activitystreams-vocabulary/
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError } from "./assert_equals-PBVKNMJd.mjs";
4
+ import { l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
5
5
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert.js
6
6
  /**
7
7
  * Make an assertion, error will be thrown if `expr` does not have truthy value.
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError } from "./assert_equals-PBVKNMJd.mjs";
4
+ import { l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
5
5
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_instance_of.js
6
6
  /**
7
7
  * Make an assertion that `obj` is an instance of `type`.
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { c as equal, l as AssertionError } from "./assert_equals-PBVKNMJd.mjs";
4
+ import { c as equal, l as AssertionError } from "./assert_equals-C-ZRDbaf.mjs";
5
5
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_not_equals.js
6
6
  /**
7
7
  * Make an assertion that `actual` and `expected` are not equal, deeply.
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError, s as format } from "./assert_equals-PBVKNMJd.mjs";
5
- import { n as assertIsError } from "./assert_throws-zN79lgIC.mjs";
4
+ import { l as AssertionError, s as format } from "./assert_equals-C-ZRDbaf.mjs";
5
+ import { n as assertIsError } from "./assert_throws-BOkhLGYc.mjs";
6
6
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_false.js
7
7
  /**
8
8
  * Make an assertion, error will be thrown if `expr` have truthy value.
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-PBVKNMJd.mjs";
4
+ import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-C-ZRDbaf.mjs";
5
5
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_strict_equals.js
6
6
  /**
7
7
  * Make an assertion that `actual` and `expected` are equal using
@@ -1,7 +1,7 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-PBVKNMJd.mjs";
4
+ import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-C-ZRDbaf.mjs";
5
5
  //#region ../../node_modules/.pnpm/@jsr+std__assert@0.226.0/node_modules/@jsr/std__assert/assert_is_error.js
6
6
  /**
7
7
  * Make an assertion that `error` is an `Error`.
@@ -1,8 +1,8 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { n as version, t as name } from "./deno-nexucTAX.mjs";
5
- import { t as ActivityListenerSet } from "./activity-listener-BeTGV3wc.mjs";
4
+ import { n as version, t as name } from "./deno-bSDsva_4.mjs";
5
+ import { t as ActivityListenerSet } from "./activity-listener-tztVvlNb.mjs";
6
6
  import { getLogger } from "@logtape/logtape";
7
7
  import { Router, RouterError, assertPath } from "@fedify/uri-template";
8
8
  import { Tombstone, getTypeId } from "@fedify/vocab";
@@ -61,7 +61,6 @@ var FederationBuilderImpl = class {
61
61
  idempotencyStrategy;
62
62
  collectionTypeIds;
63
63
  collectionCallbacks;
64
- taskDefinitions;
65
64
  /**
66
65
  * Symbol registry for unique identification of unnamed symbols.
67
66
  */
@@ -72,7 +71,6 @@ var FederationBuilderImpl = class {
72
71
  this.objectTypeIds = {};
73
72
  this.collectionCallbacks = {};
74
73
  this.collectionTypeIds = {};
75
- this.taskDefinitions = /* @__PURE__ */ new Map();
76
74
  }
77
75
  /**
78
76
  * Builds the federation object.
@@ -82,7 +80,7 @@ var FederationBuilderImpl = class {
82
80
  * specified.
83
81
  */
84
82
  async build(options) {
85
- const { FederationImpl } = await import("./middleware-CQlq6ykI.mjs");
83
+ const { FederationImpl } = await import("./middleware-DiTi3jC5.mjs");
86
84
  const f = new FederationImpl(options);
87
85
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
88
86
  f.router = this.router.clone();
@@ -111,7 +109,6 @@ var FederationBuilderImpl = class {
111
109
  f.unverifiedActivityHandler = this.unverifiedActivityHandler;
112
110
  f.outboxPermanentFailureHandler = this.outboxPermanentFailureHandler;
113
111
  f.idempotencyStrategy = this.idempotencyStrategy;
114
- f.taskDefinitions = new Map(this.taskDefinitions);
115
112
  return f;
116
113
  }
117
114
  _getTracer() {
@@ -244,23 +241,6 @@ var FederationBuilderImpl = class {
244
241
  setWebFingerLinksDispatcher(dispatcher) {
245
242
  this.webFingerLinksDispatcher = dispatcher;
246
243
  }
247
- defineTask(name, options) {
248
- if (this.taskDefinitions.has(name)) throw new TypeError(`Task ${JSON.stringify(name)} is already defined.`);
249
- const handle = {
250
- name,
251
- schema: options.schema
252
- };
253
- this.taskDefinitions.set(name, {
254
- name,
255
- schema: options.schema,
256
- handle,
257
- handler: options.handler,
258
- onError: options.onError,
259
- retryPolicy: options.retryPolicy,
260
- queue: options.queue
261
- });
262
- return handle;
263
- }
264
244
  /**
265
245
  * The RFC 6570 template-literal `path` overloads were removed for
266
246
  * type-checking efficiency, so the URI variable types can no longer be
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { It as ActivityTransformer, n as Context } from "../context-CYF8X0ft.cjs";
2
+ import { jt as ActivityTransformer, n as Context } from "../context-BBVLF7lx.cjs";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { It as ActivityTransformer, n as Context } from "../context-BF5B4ZDk.js";
2
+ import { jt as ActivityTransformer, n as Context } from "../context-BU6jSQdo.js";
3
3
  import { Activity } from "@fedify/vocab";
4
4
 
5
5
  //#region src/compat/transformers.d.ts
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-PBVKNMJd.mjs";
5
- import { t as assertStrictEquals } from "../assert_strict_equals-BzqyKuYL.mjs";
6
- import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-BNL8AC14.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertStrictEquals } from "../assert_strict_equals-XEgZAlrj.mjs";
6
+ import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-L_DbOaFe.mjs";
7
7
  import { Create, Document, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
8
8
  import { mockDocumentLoader, test } from "@fedify/fixture";
9
9
  //#region src/compat/outgoing-jsonld.test.ts
@@ -1,9 +1,9 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as assertEquals } from "../assert_equals-PBVKNMJd.mjs";
5
- import { t as assertNotEquals } from "../assert_not_equals-C8vcTTA3.mjs";
6
- import { t as normalizePublicAudience } from "../public-audience-c9zmYKgA.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
6
+ import { t as normalizePublicAudience } from "../public-audience-Cvbr2Gzt.mjs";
7
7
  import { Create, Note, PUBLIC_COLLECTION } from "@fedify/vocab";
8
8
  import { test } from "@fedify/fixture";
9
9
  import { getDocumentLoader, preloadedContexts } from "@fedify/vocab-runtime";
@@ -1,11 +1,11 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import "urlpattern-polyfill";
3
3
  globalThis.addEventListener = () => {};
4
- import { t as MemoryKvStore } from "../kv-CIvR3Non.mjs";
5
- import { t as assertEquals } from "../assert_equals-PBVKNMJd.mjs";
6
- import { t as assertInstanceOf } from "../assert_instance_of-CxoC8bVq.mjs";
7
- import { t as assert } from "../assert-DvVHoIZ0.mjs";
8
- import { b as autoIdAssigner, n as FederationImpl, y as actorDehydrator } from "../middleware-Dl2nyVgB.mjs";
4
+ import { t as assertEquals } from "../assert_equals-C-ZRDbaf.mjs";
5
+ import { t as assertInstanceOf } from "../assert_instance_of-DBC5X09g.mjs";
6
+ import { t as assert } from "../assert-OguE97r2.mjs";
7
+ import { t as MemoryKvStore } from "../kv-rV3vodCc.mjs";
8
+ import { b as autoIdAssigner, n as FederationImpl, y as actorDehydrator } from "../middleware-BWi34Ga3.mjs";
9
9
  import { Follow, Person } from "@fedify/vocab";
10
10
  import { test } from "@fedify/fixture";
11
11
  //#region src/compat/transformers.test.ts