@fedify/fedify 1.9.0-pr.428.1587 → 1.9.0-pr.431.1597

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 (153) hide show
  1. package/dist/actor-CHOM_AN3.d.cts +128 -0
  2. package/dist/actor-CfaqWvJb.cjs +37783 -0
  3. package/dist/{actor-CRWrH2fJ.js → actor-Detmisdi.js} +190 -190
  4. package/dist/{actor-BAyhNMtT.js → actor-Dw7av4Zk.js} +1 -1
  5. package/dist/{authdocloader-DuPcJhwz.js → authdocloader-5UJ5Gme-.js} +6 -6
  6. package/dist/authdocloader-BVYv0Ct8.cjs +58 -0
  7. package/dist/{authdocloader-C1iaSe2N.js → authdocloader-ZlLoXSxM.js} +3 -3
  8. package/dist/{builder-DLD2OVGE.js → builder-BbKfqPmR.js} +4 -4
  9. package/dist/chunk-DqRYRqnO.cjs +34 -0
  10. package/dist/{client-PZOCn5-Y.js → client-DgRjF0ha.js} +1 -1
  11. package/dist/client-DjT_tegg.d.cts +294 -0
  12. package/dist/compat/mod.cjs +10 -0
  13. package/dist/compat/mod.d.cts +13 -0
  14. package/dist/compat/mod.js +5 -5
  15. package/dist/compat/transformers.test.js +16 -16
  16. package/dist/compat-DmDDELst.cjs +4 -0
  17. package/dist/compat-nxUqe4Z-.js +4 -0
  18. package/dist/context-KXVF2AhH.d.cts +2261 -0
  19. package/dist/{docloader-6Si9l3iy.js → docloader-BKf9RWX4.js} +4 -4
  20. package/dist/docloader-D-MrRyHl.d.cts +219 -0
  21. package/dist/docloader-eqgyMp7h.cjs +4682 -0
  22. package/dist/{esm-WCi84Tv_.js → esm-B_ZjJ1sB.js} +1 -1
  23. package/dist/federation/builder.test.js +5 -5
  24. package/dist/federation/collection.test.js +3 -3
  25. package/dist/federation/handler.test.js +17 -17
  26. package/dist/federation/inbox.test.js +4 -4
  27. package/dist/federation/keycache.test.js +4 -4
  28. package/dist/federation/kv.test.js +3 -3
  29. package/dist/federation/middleware.test.js +18 -18
  30. package/dist/federation/mod.cjs +29 -0
  31. package/dist/federation/mod.d.cts +13 -0
  32. package/dist/federation/mod.js +15 -15
  33. package/dist/federation/mq.test.js +3 -3
  34. package/dist/federation/retry.test.js +3 -3
  35. package/dist/federation/router.test.js +3 -3
  36. package/dist/federation/send.test.js +10 -10
  37. package/dist/{federation-CMX7WzeL.js → federation-D1U8YY9t.js} +3 -3
  38. package/dist/federation-H2_En3j5.cjs +244 -0
  39. package/dist/http-B_zBcsai.d.cts +253 -0
  40. package/dist/{http-CFiUVZfi.js → http-C5XLveZw.js} +2 -2
  41. package/dist/{http-DEm-ammv.js → http-CwlUFNG4.js} +6 -6
  42. package/dist/http-_vjuGcXn.cjs +826 -0
  43. package/dist/{inbox-VMSM478g.js → inbox-sVXiVBbT.js} +1 -1
  44. package/dist/key-19P2dWvf.cjs +290 -0
  45. package/dist/{key-CdGoFWIl.js → key-BCWvPOkD.js} +5 -5
  46. package/dist/key-CsQ7J8-m.js +10 -0
  47. package/dist/key-Dt7qJaQT.cjs +10 -0
  48. package/dist/{key-LefgNv9I.js → key-Jrnr66vx.js} +2 -2
  49. package/dist/{key-D3__azaY.js → key-lpATOAE4.js} +3 -3
  50. package/dist/{keycache-9EJyq0-_.js → keycache-ogQInQck.js} +1 -1
  51. package/dist/{keys-Dn0SWAWf.js → keys-DcGsKtHW.js} +1 -1
  52. package/dist/kv-63Cil1MD.d.cts +81 -0
  53. package/dist/{ld-Dgthw_5_.js → ld-BSE4jnyK.js} +2 -2
  54. package/dist/lookup-D96ipStp.cjs +137 -0
  55. package/dist/{lookup-D0EUk78B.js → lookup-D_-F1hLw.js} +4 -4
  56. package/dist/{lookup-Bj_u3eYM.js → lookup-DdxOle8f.js} +1 -1
  57. package/dist/middleware-B0f850Ei.cjs +17 -0
  58. package/dist/middleware-B2DFqtJ-.cjs +4240 -0
  59. package/dist/middleware-COHAbwGs.js +17 -0
  60. package/dist/{middleware-dku9cdga.js → middleware-CuTcPjfP.js} +13 -13
  61. package/dist/middleware-Dt7C7qpw.js +26 -0
  62. package/dist/{middleware-CqVZVdeM.js → middleware-T_y4Bnvw.js} +14 -14
  63. package/dist/mod-C2tOeRkN.d.cts +1 -0
  64. package/dist/mod-C3CGxYoF.d.cts +102 -0
  65. package/dist/mod-COw_caPC.d.cts +266 -0
  66. package/dist/mod-FZd39qVq.d.cts +1 -0
  67. package/dist/mod-NKH_G-IY.d.cts +289 -0
  68. package/dist/mod-YfAcrVbP.d.cts +80 -0
  69. package/dist/mod-jQ4OODsl.d.cts +113 -0
  70. package/dist/mod.cjs +152 -0
  71. package/dist/mod.d.cts +17 -0
  72. package/dist/mod.js +20 -20
  73. package/dist/mq-B7R1Q-M5.d.cts +140 -0
  74. package/dist/nodeinfo/client.test.js +5 -5
  75. package/dist/nodeinfo/handler.test.js +16 -16
  76. package/dist/nodeinfo/mod.cjs +13 -0
  77. package/dist/nodeinfo/mod.d.cts +5 -0
  78. package/dist/nodeinfo/mod.js +6 -6
  79. package/dist/nodeinfo/semver.test.js +3 -3
  80. package/dist/nodeinfo/types.test.js +3 -3
  81. package/dist/nodeinfo-Co9lJrWl.cjs +4 -0
  82. package/dist/nodeinfo-DfycQ8Wf.js +4 -0
  83. package/dist/owner-C9Ry0TOI.d.cts +67 -0
  84. package/dist/{owner-QgsLL0FU.js → owner-DJtc8evi.js} +2 -2
  85. package/dist/{proof-B4xoN40A.js → proof-9OMp0o4n.js} +2 -2
  86. package/dist/{proof-E_33BNCY.js → proof-BuPk23Er.js} +6 -6
  87. package/dist/proof-CRHppbRk.cjs +673 -0
  88. package/dist/runtime/authdocloader.test.js +9 -9
  89. package/dist/runtime/docloader.test.js +4 -4
  90. package/dist/runtime/key.test.js +5 -5
  91. package/dist/runtime/langstr.test.js +3 -3
  92. package/dist/runtime/mod.cjs +25 -0
  93. package/dist/runtime/mod.d.cts +6 -0
  94. package/dist/runtime/mod.js +10 -10
  95. package/dist/runtime/multibase/multibase.test.js +3 -3
  96. package/dist/runtime/url.test.js +3 -3
  97. package/dist/runtime-C58AJWSv.cjs +4 -0
  98. package/dist/runtime-DPYEDf-o.js +4 -0
  99. package/dist/{send-ByaKiMsV.js → send-cXerEJm9.js} +2 -2
  100. package/dist/sig/http.test.js +8 -8
  101. package/dist/sig/key.test.js +6 -6
  102. package/dist/sig/ld.test.js +7 -7
  103. package/dist/sig/mod.cjs +30 -0
  104. package/dist/sig/mod.d.cts +8 -0
  105. package/dist/sig/mod.js +10 -10
  106. package/dist/sig/owner.test.js +7 -7
  107. package/dist/sig/proof.test.js +7 -7
  108. package/dist/sig-ByHXzqUi.cjs +4 -0
  109. package/dist/sig-Cj3tk-ig.js +4 -0
  110. package/dist/testing/docloader.test.js +3 -3
  111. package/dist/testing/mod.js +3 -3
  112. package/dist/{testing-DK6Jj8Bp.js → testing-BX6IA3LR.js} +2 -2
  113. package/dist/{transformers-Dna8Fg7k.js → transformers-BFT6d7J5.js} +3 -3
  114. package/dist/transformers-CoBS-oFG.cjs +116 -0
  115. package/dist/{type-CKxYS9Sh.js → type-DF9yoIpt.js} +186 -186
  116. package/dist/types-DcKQIzdO.cjs +488 -0
  117. package/dist/{types-DNXXKtNN.js → types-Q17QxOOC.js} +4 -4
  118. package/dist/vocab/actor.test.js +5 -5
  119. package/dist/vocab/lookup.test.js +4 -4
  120. package/dist/vocab/mod.cjs +87 -0
  121. package/dist/vocab/mod.d.cts +6 -0
  122. package/dist/vocab/mod.js +7 -7
  123. package/dist/vocab/type.test.js +3 -3
  124. package/dist/vocab/vocab.test.js +4 -4
  125. package/dist/{vocab-BXEmH50Y.js → vocab-BUc_4ZsW.js} +6 -6
  126. package/dist/vocab-BzGg7ltX.d.cts +14629 -0
  127. package/dist/vocab-Du8FV6H1.cjs +282 -0
  128. package/dist/webfinger/handler.test.js +16 -16
  129. package/dist/webfinger/lookup.test.js +4 -4
  130. package/dist/webfinger/mod.cjs +9 -0
  131. package/dist/webfinger/mod.d.cts +4 -0
  132. package/dist/webfinger/mod.js +6 -6
  133. package/dist/webfinger-BjOEdFPs.cjs +4 -0
  134. package/dist/webfinger-De_bU0iE.js +4 -0
  135. package/dist/x/cfworkers.cjs +100 -0
  136. package/dist/x/cfworkers.d.cts +59 -0
  137. package/dist/x/cfworkers.js +3 -3
  138. package/dist/x/cfworkers.test.js +3 -3
  139. package/dist/x/hono.cjs +61 -0
  140. package/dist/x/hono.d.cts +54 -0
  141. package/dist/x/hono.js +3 -3
  142. package/dist/x/sveltekit.cjs +69 -0
  143. package/dist/x/sveltekit.d.cts +46 -0
  144. package/dist/x/sveltekit.js +3 -3
  145. package/package.json +68 -12
  146. package/dist/compat-Bb5myD13.js +0 -4
  147. package/dist/key-CiJCx5-9.js +0 -10
  148. package/dist/middleware-1wWyj5B6.js +0 -26
  149. package/dist/middleware-BxSWANLr.js +0 -17
  150. package/dist/nodeinfo-CyEbLjHs.js +0 -4
  151. package/dist/runtime-BSkOVUWM.js +0 -4
  152. package/dist/sig-BXJO--F9.js +0 -4
  153. package/dist/webfinger-C3GIyXIg.js +0 -4
@@ -0,0 +1,128 @@
1
+ import { GetUserAgentOptions } from "./docloader-D-MrRyHl.cjs";
2
+ import { Application, Group, Organization, Person, Service } from "./vocab-BzGg7ltX.cjs";
3
+ import { TracerProvider } from "@opentelemetry/api";
4
+
5
+ //#region src/vocab/actor.d.ts
6
+ /**
7
+ * Actor types are {@link Object} types that are capable of performing
8
+ * activities.
9
+ */
10
+ type Actor = Application | Group | Organization | Person | Service;
11
+ /**
12
+ * Checks if the given object is an {@link Actor}.
13
+ * @param object The object to check.
14
+ * @returns `true` if the given object is an {@link Actor}.
15
+ */
16
+ declare function isActor(object: unknown): object is Actor;
17
+ /**
18
+ * A string representation of an actor type name.
19
+ */
20
+ type ActorTypeName = "Application" | "Group" | "Organization" | "Person" | "Service";
21
+ /**
22
+ * Gets the type name of the given actor.
23
+ * @param actor The actor to get the type name of.
24
+ * @returns The type name of the given actor.
25
+ */
26
+ declare function getActorTypeName(actor: Actor): ActorTypeName;
27
+ /**
28
+ * Gets the actor class by the given type name.
29
+ * @param typeName The type name to get the actor class by.
30
+ * @returns The actor class by the given type name.
31
+ */
32
+ declare function getActorClassByTypeName(typeName: ActorTypeName): typeof Application | typeof Group | typeof Organization | typeof Person | typeof Service;
33
+ /**
34
+ * Options for {@link getActorHandle}.
35
+ * @since 1.3.0
36
+ */
37
+ interface GetActorHandleOptions extends NormalizeActorHandleOptions {
38
+ /**
39
+ * The options for making `User-Agent` header.
40
+ * If a string is given, it is used as the `User-Agent` header value.
41
+ * If an object is given, it is passed to {@link getUserAgent} to generate
42
+ * the `User-Agent` header value.
43
+ * @since 1.3.0
44
+ */
45
+ userAgent?: GetUserAgentOptions | string;
46
+ /**
47
+ * The OpenTelemetry tracer provider. If omitted, the global tracer provider
48
+ * is used.
49
+ * @since 1.3.0
50
+ */
51
+ tracerProvider?: TracerProvider;
52
+ }
53
+ /**
54
+ * Gets the actor handle, of the form `@username@domain`, from the given actor
55
+ * or an actor URI.
56
+ *
57
+ * @example
58
+ * ``` typescript
59
+ * // Get the handle of an actor object:
60
+ * await getActorHandle(
61
+ * new Person({ id: new URL("https://fosstodon.org/users/hongminhee") })
62
+ * );
63
+ *
64
+ * // Get the handle of an actor URI:
65
+ * await getActorHandle(new URL("https://fosstodon.org/users/hongminhee"));
66
+ * ```
67
+ *
68
+ * @param actor The actor or actor URI to get the handle from.
69
+ * @param options The extra options for getting the actor handle.
70
+ * @returns The actor handle. It starts with `@` and is followed by the
71
+ * username and domain, separated by `@` by default (it can be
72
+ * customized with the options).
73
+ * @throws {TypeError} If the actor does not have enough information to get the
74
+ * handle.
75
+ * @since 0.4.0
76
+ */
77
+ declare function getActorHandle(actor: Actor | URL, options?: GetActorHandleOptions): Promise<`@${string}@${string}` | `${string}@${string}`>;
78
+ /**
79
+ * Options for {@link normalizeActorHandle}.
80
+ * @since 0.9.0
81
+ */
82
+ interface NormalizeActorHandleOptions {
83
+ /**
84
+ * Whether to trim the leading `@` from the actor handle. Turned off by
85
+ * default.
86
+ */
87
+ trimLeadingAt?: boolean;
88
+ /**
89
+ * Whether to convert the domain part of the actor handle to punycode, if it
90
+ * is an internationalized domain name. Turned off by default.
91
+ */
92
+ punycode?: boolean;
93
+ }
94
+ /**
95
+ * Normalizes the given actor handle.
96
+ * @param handle The full handle of the actor to normalize.
97
+ * @param options The options for normalizing the actor handle.
98
+ * @returns The normalized actor handle.
99
+ * @throws {TypeError} If the actor handle is invalid.
100
+ * @since 0.9.0
101
+ */
102
+ declare function normalizeActorHandle(handle: string, options?: NormalizeActorHandleOptions): `@${string}@${string}` | `${string}@${string}`;
103
+ /**
104
+ * The object that can be a recipient of an activity.
105
+ *
106
+ * Note that every {@link Actor} is also a {@link Recipient}.
107
+ */
108
+ interface Recipient {
109
+ /**
110
+ * The URI of the actor.
111
+ */
112
+ readonly id: URL | null;
113
+ /**
114
+ * The URI of the actor's inbox.
115
+ */
116
+ readonly inboxId: URL | null;
117
+ /**
118
+ * The endpoints of the actor.
119
+ */
120
+ readonly endpoints?: {
121
+ /**
122
+ * The URI of the actor's shared inbox.
123
+ */
124
+ sharedInbox: URL | null;
125
+ } | null;
126
+ }
127
+ //#endregion
128
+ export { Actor, ActorTypeName, GetActorHandleOptions, NormalizeActorHandleOptions, Recipient, getActorClassByTypeName, getActorHandle, getActorTypeName, isActor, normalizeActorHandle };