@fedify/fedify 2.3.0 → 2.4.0-dev.1422

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 (104) hide show
  1. package/dist/{assert-OguE97r2.mjs → assert-DikXweDx.mjs} +1 -1
  2. package/dist/{assert_instance_of-DBC5X09g.mjs → assert_instance_of-C4Ri6VuN.mjs} +1 -1
  3. package/dist/{assert_not_equals-DkVK8oqV.mjs → assert_not_equals--wG9hV7u.mjs} +1 -1
  4. package/dist/{assert_rejects-DN60FHPX.mjs → assert_rejects-DQP-q39h.mjs} +2 -2
  5. package/dist/{assert_strict_equals-XEgZAlrj.mjs → assert_strict_equals-Dmjbg-bA.mjs} +1 -1
  6. package/dist/{assert_throws-BOkhLGYc.mjs → assert_throws-4NwKEy2q.mjs} +1 -1
  7. package/dist/{builder-DYXTKqvC.mjs → builder-Gef_ZeDE.mjs} +23 -3
  8. package/dist/codec-Bf-rTqks.mjs +94 -0
  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-DVoTs_wM.mjs → context-BrIOaBSs.mjs} +7 -1
  15. package/dist/{context-BBVLF7lx.d.cts → context-BuGH_Vft.d.cts} +286 -70
  16. package/dist/{context-BU6jSQdo.d.ts → context-CLtZxCu6.d.ts} +285 -70
  17. package/dist/{deno-ChfuM30K.mjs → deno-BmD7XRaO.mjs} +1 -1
  18. package/dist/{docloader-Bu-Oecom.mjs → docloader-B8AJowCx.mjs} +2 -2
  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 +200 -19
  29. package/dist/federation/mod.cjs +1 -1
  30. package/dist/federation/mod.d.cts +3 -3
  31. package/dist/federation/mod.d.ts +3 -3
  32. package/dist/federation/mod.js +1 -1
  33. package/dist/federation/mq.test.mjs +5 -260
  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/tasks/codec.test.d.mts +2 -0
  39. package/dist/federation/tasks/codec.test.mjs +292 -0
  40. package/dist/federation/tasks/tasks.test.d.mts +2 -0
  41. package/dist/federation/tasks/tasks.test.mjs +651 -0
  42. package/dist/federation/temporal.test.mjs +4 -4
  43. package/dist/federation/webfinger.test.mjs +6 -6
  44. package/dist/{http-Q2nW0DHO.cjs → http-BCSQJ_gv.cjs} +1 -1
  45. package/dist/{http-CiPBp7Ax.js → http-CJ0WNyqA.js} +1 -1
  46. package/dist/{http-Cm_e9dY7.mjs → http-GQoPA_YT.mjs} +4 -4
  47. package/dist/{key-nrqRBwjx.mjs → key-BLy_TeTg.mjs} +2 -2
  48. package/dist/{kv-cache-BQLjC1KN.js → kv-cache-CjEcb9qH.js} +1 -1
  49. package/dist/{kv-cache-QkLiue07.cjs → kv-cache-DXwu7BtY.cjs} +1 -1
  50. package/dist/{kv-cache-B3Na5DMI.mjs → kv-cache-pw-kBdVz.mjs} +1 -1
  51. package/dist/{ld-CaRoGhYH.mjs → ld-CWgxPlZq.mjs} +3 -3
  52. package/dist/{metrics-BSUZSyQU.mjs → metrics-DUKoLd_E.mjs} +1 -1
  53. package/dist/{middleware-BIj0BBxb.js → middleware-2Us0G3Iy.js} +277 -10
  54. package/dist/{middleware-DXLo-UOS.cjs → middleware-BiCk4wGY.cjs} +277 -10
  55. package/dist/{middleware-BIctkZ9S.mjs → middleware-Dq-HhJHd.mjs} +1 -1
  56. package/dist/{middleware-CwJv5KxX.mjs → middleware-PZaroDUk.mjs} +182 -23
  57. package/dist/{mod-C0F6kvgS.d.cts → mod-DRokcHeU.d.cts} +1 -1
  58. package/dist/{mod-vPYVoa5n.d.ts → mod-r-1xOW_C.d.ts} +1 -1
  59. package/dist/mod.cjs +4 -4
  60. package/dist/mod.d.cts +4 -4
  61. package/dist/mod.d.ts +4 -4
  62. package/dist/mod.js +4 -4
  63. package/dist/mq-CvJAzRz5.mjs +260 -0
  64. package/dist/nodeinfo/client.test.mjs +3 -3
  65. package/dist/nodeinfo/handler.test.mjs +5 -5
  66. package/dist/nodeinfo/types.test.mjs +4 -4
  67. package/dist/otel/exporter.test.mjs +3 -3
  68. package/dist/{outgoing-jsonld-L_DbOaFe.mjs → outgoing-jsonld-BgFLCJQ_.mjs} +1 -1
  69. package/dist/{owner-CyK8YW7-.mjs → owner-U0Z8Ex6i.mjs} +2 -2
  70. package/dist/{proof-CIUSLcHg.cjs → proof-DA3hLGSO.cjs} +1 -1
  71. package/dist/{proof-Ba14ORbL.js → proof-f7K32nz7.js} +1 -1
  72. package/dist/{proof-DXHo4Yon.mjs → proof-nb5tfciW.mjs} +5 -5
  73. package/dist/{send-B4Ld91pX.mjs → send-CLfW5Fdf.mjs} +3 -3
  74. package/dist/sig/accept.test.mjs +1 -1
  75. package/dist/sig/http.test.mjs +8 -8
  76. package/dist/sig/key.test.mjs +6 -6
  77. package/dist/sig/ld.test.mjs +7 -7
  78. package/dist/sig/mod.cjs +2 -2
  79. package/dist/sig/mod.js +2 -2
  80. package/dist/sig/owner.test.mjs +6 -6
  81. package/dist/sig/proof.test.mjs +8 -8
  82. package/dist/{std__assert-BBjXFNOb.mjs → std__assert-BTEgfoJo.mjs} +4 -4
  83. package/dist/{temporal-E7cF2Hsh.mjs → temporal-2ry_jdCK.mjs} +1 -1
  84. package/dist/testing/mod.d.mts +378 -7
  85. package/dist/testing/mod.mjs +3 -2
  86. package/dist/testing-CjYPStvE.mjs +55 -0
  87. package/dist/utils/docloader.test.mjs +6 -6
  88. package/dist/utils/kv-cache.test.mjs +1 -1
  89. package/dist/utils/mod.cjs +1 -1
  90. package/dist/utils/mod.js +1 -1
  91. package/package.json +8 -6
  92. /package/dist/{accept-CPkZzmGN.mjs → accept-CceiKpCy.mjs} +0 -0
  93. /package/dist/{activity-listener-tztVvlNb.mjs → activity-listener-BeTGV3wc.mjs} +0 -0
  94. /package/dist/{assert_equals-C-ZRDbaf.mjs → assert_equals-Ew3jOFa3.mjs} +0 -0
  95. /package/dist/{circuit-breaker-CSWsyoef.mjs → circuit-breaker-hJBB6jwA.mjs} +0 -0
  96. /package/dist/{client-ByXmQhYD.mjs → client-B_A6mfn3.mjs} +0 -0
  97. /package/dist/{collection-Cc3DVAhE.mjs → collection-Dp5ky45w.mjs} +0 -0
  98. /package/dist/{keycache-BeU0LCII.mjs → keycache-CaOR6NYg.mjs} +0 -0
  99. /package/dist/{keys-DGu1NFwu.mjs → keys-C3kae-6B.mjs} +0 -0
  100. /package/dist/{kv-rV3vodCc.mjs → kv-x2IvBUyq.mjs} +0 -0
  101. /package/dist/{negotiation-DDstyBvc.mjs → negotiation-m_L2nyS3.mjs} +0 -0
  102. /package/dist/{public-audience-Cvbr2Gzt.mjs → public-audience-N3pyOx2p.mjs} +0 -0
  103. /package/dist/{retry-CXg_MBI-.mjs → retry-DI4O-zYl.mjs} +0 -0
  104. /package/dist/{types-J53Kw7so.mjs → types-BFowWFTT.mjs} +0 -0
@@ -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-C-ZRDbaf.mjs";
4
+ import { l as AssertionError } from "./assert_equals-Ew3jOFa3.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-C-ZRDbaf.mjs";
4
+ import { l as AssertionError } from "./assert_equals-Ew3jOFa3.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-C-ZRDbaf.mjs";
4
+ import { c as equal, l as AssertionError } from "./assert_equals-Ew3jOFa3.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-C-ZRDbaf.mjs";
5
- import { n as assertIsError } from "./assert_throws-BOkhLGYc.mjs";
4
+ import { l as AssertionError, s as format } from "./assert_equals-Ew3jOFa3.mjs";
5
+ import { n as assertIsError } from "./assert_throws-4NwKEy2q.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-C-ZRDbaf.mjs";
4
+ import { a as red, i as buildMessage, l as AssertionError, n as diffStr, r as diff, s as format } from "./assert_equals-Ew3jOFa3.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-C-ZRDbaf.mjs";
4
+ import { l as AssertionError, o as stripAnsiCode } from "./assert_equals-Ew3jOFa3.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-ChfuM30K.mjs";
5
- import { t as ActivityListenerSet } from "./activity-listener-tztVvlNb.mjs";
4
+ import { n as version, t as name } from "./deno-BmD7XRaO.mjs";
5
+ import { t as ActivityListenerSet } from "./activity-listener-BeTGV3wc.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,6 +61,7 @@ var FederationBuilderImpl = class {
61
61
  idempotencyStrategy;
62
62
  collectionTypeIds;
63
63
  collectionCallbacks;
64
+ taskDefinitions;
64
65
  /**
65
66
  * Symbol registry for unique identification of unnamed symbols.
66
67
  */
@@ -71,6 +72,7 @@ var FederationBuilderImpl = class {
71
72
  this.objectTypeIds = {};
72
73
  this.collectionCallbacks = {};
73
74
  this.collectionTypeIds = {};
75
+ this.taskDefinitions = /* @__PURE__ */ new Map();
74
76
  }
75
77
  /**
76
78
  * Builds the federation object.
@@ -80,7 +82,7 @@ var FederationBuilderImpl = class {
80
82
  * specified.
81
83
  */
82
84
  async build(options) {
83
- const { FederationImpl } = await import("./middleware-BIctkZ9S.mjs");
85
+ const { FederationImpl } = await import("./middleware-Dq-HhJHd.mjs");
84
86
  const f = new FederationImpl(options);
85
87
  const trailingSlashInsensitiveValue = f.router.trailingSlashInsensitive;
86
88
  f.router = this.router.clone();
@@ -109,6 +111,7 @@ var FederationBuilderImpl = class {
109
111
  f.unverifiedActivityHandler = this.unverifiedActivityHandler;
110
112
  f.outboxPermanentFailureHandler = this.outboxPermanentFailureHandler;
111
113
  f.idempotencyStrategy = this.idempotencyStrategy;
114
+ f.taskDefinitions = new Map(this.taskDefinitions);
112
115
  return f;
113
116
  }
114
117
  _getTracer() {
@@ -241,6 +244,23 @@ var FederationBuilderImpl = class {
241
244
  setWebFingerLinksDispatcher(dispatcher) {
242
245
  this.webFingerLinksDispatcher = dispatcher;
243
246
  }
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
+ }
244
264
  /**
245
265
  * The RFC 6570 template-literal `path` overloads were removed for
246
266
  * type-checking efficiency, so the URI variable types can no longer be
@@ -0,0 +1,94 @@
1
+ import "@js-temporal/polyfill";
2
+ import "urlpattern-polyfill";
3
+ globalThis.addEventListener = () => {};
4
+ import { Link, Object as Object$1 } from "@fedify/vocab";
5
+ import { parse, stringifyAsync } from "devalue";
6
+ //#region src/federation/tasks/codec.ts
7
+ var TaskCodec = class TaskCodec {
8
+ options;
9
+ constructor(options) {
10
+ this.options = options;
11
+ }
12
+ serialize = (data) => stringifyAsync(data, { Vocab: this.#stringifyVocab });
13
+ deserialize = (raw) => this.#revive(/* @__PURE__ */ new Map())(parse(raw, { Vocab: VocabHolder.from }));
14
+ /** Validates `data` against `schema`, then serializes it. */
15
+ encode = async (schema, data) => this.serialize(await TaskCodec.validate(schema, data));
16
+ /** Deserializes `raw`, then validates the result against `schema`. */
17
+ decode = async (schema, raw) => TaskCodec.validate(schema, await this.deserialize(raw));
18
+ static validate = async (schema, data) => getValueIfSchema(await schema["~standard"].validate(data));
19
+ #stringifyVocab = (value) => isVocab(value) && this.#toWire(value);
20
+ #toWire = async (value) => ({
21
+ kind: value instanceof Link ? "link" : "object",
22
+ jsonLd: await value.toJsonLd({
23
+ format: "expand",
24
+ ...this.options
25
+ })
26
+ });
27
+ #revive = (seen) => {
28
+ const inner = async (node) => {
29
+ if (node === null || typeof node !== "object") return node;
30
+ if (seen.has(node)) return seen.get(node);
31
+ for (const reviver of this.#classRevivers) {
32
+ const out = reviver(seen, inner, node);
33
+ if (out !== void 0) return await out;
34
+ }
35
+ return node;
36
+ };
37
+ return inner;
38
+ };
39
+ #classRevivers = [
40
+ classReviver(isInstanceOf(VocabHolder), ({ kind, jsonLd }) => kind === "link" ? Link.fromJsonLd(jsonLd, this.options) : Object$1.fromJsonLd(jsonLd, this.options), () => {}),
41
+ classReviver(isInstanceOf(Array), () => [], async (revive, node, arr) => {
42
+ for (const item of await Array.fromAsync(node, revive)) arr.push(item);
43
+ }),
44
+ classReviver(isInstanceOf(Map), () => /* @__PURE__ */ new Map(), async (revive, node, map) => {
45
+ for (const [k, v] of node) map.set(await revive(k), await revive(v));
46
+ }),
47
+ classReviver(isInstanceOf(Set), () => /* @__PURE__ */ new Set(), async (revive, node, set) => {
48
+ for (const v of await Array.fromAsync(node, revive)) set.add(v);
49
+ }),
50
+ classReviver(isPlainObject, () => ({}), async (revive, node, obj) => {
51
+ for (const [k, v] of globalThis.Object.entries(node)) obj[k] = await revive(v);
52
+ })
53
+ ];
54
+ };
55
+ const isVocab = (value) => value instanceof Object$1 || value instanceof Link;
56
+ const isPlainObject = (value) => value === null || typeof value !== "object" ? false : isObjectPrototype(globalThis.Object.getPrototypeOf(value));
57
+ const isObjectPrototype = (proto) => proto === null || proto === globalThis.Object.prototype;
58
+ const isInstanceOf = (cls) => (v) => v instanceof cls;
59
+ function getValueIfSchema(result) {
60
+ assertSchema(result);
61
+ return result.value;
62
+ }
63
+ function assertSchema(result) {
64
+ if (result.issues && result.issues.length > 0) throw new TypeError(`Task data failed schema validation: ${JSON.stringify(result.issues)}`);
65
+ }
66
+ /**
67
+ * A vocabulary object parked by the synchronous decode reviver, held until
68
+ * the async revive pass can `fromJsonLd()` it back into an instance.
69
+ */
70
+ var VocabHolder = class VocabHolder {
71
+ kind;
72
+ jsonLd;
73
+ constructor(kind, jsonLd) {
74
+ this.kind = kind;
75
+ this.jsonLd = jsonLd;
76
+ }
77
+ static from = ({ kind, jsonLd }) => new VocabHolder(kind, jsonLd);
78
+ };
79
+ /**
80
+ * Ties a container filter to its empty-shell `init` and child-filling `set`
81
+ * through one type parameter—a correlation the heterogeneous reviver list
82
+ * cannot carry, which previously forced `@ts-ignore` at the dispatch site.
83
+ */
84
+ const classReviver = (filter, init, set) => (seen, revive, node) => {
85
+ if (!filter(node)) return void 0;
86
+ return (async () => {
87
+ const out = await init(node);
88
+ seen.set(node, out);
89
+ await set(revive, node, out);
90
+ return out;
91
+ })();
92
+ };
93
+ //#endregion
94
+ export { TaskCodec as t };
@@ -1,5 +1,5 @@
1
1
  /// <reference lib="esnext.temporal" />
2
- import { jt as ActivityTransformer, n as Context } from "../context-BBVLF7lx.cjs";
2
+ import { It as ActivityTransformer, n as Context } from "../context-BuGH_Vft.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 { jt as ActivityTransformer, n as Context } from "../context-BU6jSQdo.js";
2
+ import { It as ActivityTransformer, n as Context } from "../context-CLtZxCu6.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-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";
4
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
+ import { t as assertStrictEquals } from "../assert_strict_equals-Dmjbg-bA.mjs";
6
+ import { n as normalizeAttachmentArrays, r as normalizeOutgoingActivityJsonLd, t as isPreloadedContextAttachmentSafe } from "../outgoing-jsonld-BgFLCJQ_.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-C-ZRDbaf.mjs";
5
- import { t as assertNotEquals } from "../assert_not_equals-DkVK8oqV.mjs";
6
- import { t as normalizePublicAudience } from "../public-audience-Cvbr2Gzt.mjs";
4
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
+ import { t as assertNotEquals } from "../assert_not_equals--wG9hV7u.mjs";
6
+ import { t as normalizePublicAudience } from "../public-audience-N3pyOx2p.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 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-CwJv5KxX.mjs";
4
+ import { t as assertEquals } from "../assert_equals-Ew3jOFa3.mjs";
5
+ import { t as assertInstanceOf } from "../assert_instance_of-C4Ri6VuN.mjs";
6
+ import { t as assert } from "../assert-DikXweDx.mjs";
7
+ import { t as MemoryKvStore } from "../kv-x2IvBUyq.mjs";
8
+ import { b as autoIdAssigner, n as FederationImpl, y as actorDehydrator } from "../middleware-PZaroDUk.mjs";
9
9
  import { Follow, Person } from "@fedify/vocab";
10
10
  import { test } from "@fedify/fixture";
11
11
  //#region src/compat/transformers.test.ts
@@ -66,7 +66,7 @@ const testDefinitions = [];
66
66
  //#endregion
67
67
  //#region src/testing/context.ts
68
68
  function createContext(values) {
69
- const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity } = values;
69
+ const { federation, url = new URL("http://example.com/"), canonicalOrigin, data, documentLoader, contextLoader, meterProvider, tracerProvider, clone, getNodeInfoUri, getActorUri, getObjectUri, getCollectionUri, getOutboxUri, getInboxUri, getFollowingUri, getFollowersUri, getLikedUri, getFeaturedUri, getFeaturedTagsUri, parseUri, getActorKeyPairs, getDocumentLoader, lookupObject: lookupObject$1, traverseCollection: traverseCollection$1, lookupNodeInfo, lookupWebFinger: lookupWebFinger$1, sendActivity, routeActivity, enqueueTask, enqueueTaskMany } = values;
70
70
  function throwRouterError() {
71
71
  throw new RouterError("Not implemented");
72
72
  }
@@ -126,6 +126,12 @@ function createContext(values) {
126
126
  }),
127
127
  routeActivity: routeActivity ?? ((_params) => {
128
128
  throw new Error("Not implemented");
129
+ }),
130
+ enqueueTask: enqueueTask ?? ((_task, _data, _options) => {
131
+ throw new Error("Not implemented");
132
+ }),
133
+ enqueueTaskMany: enqueueTaskMany ?? ((_task, _payloads, _options) => {
134
+ throw new Error("Not implemented");
129
135
  })
130
136
  };
131
137
  }