applesauce-common 6.1.0 → 7.0.0

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 (231) hide show
  1. package/README.md +1 -0
  2. package/dist/casts/_circular-import.d.ts +3 -0
  3. package/dist/casts/_circular-import.js +3 -0
  4. package/dist/casts/app-handler.d.ts +56 -0
  5. package/dist/casts/app-handler.js +105 -0
  6. package/dist/casts/app-recommendation.d.ts +26 -0
  7. package/dist/casts/app-recommendation.js +41 -0
  8. package/dist/casts/external-identities.d.ts +9 -0
  9. package/dist/casts/external-identities.js +14 -0
  10. package/dist/casts/forum-thread.d.ts +17 -0
  11. package/dist/casts/forum-thread.js +31 -0
  12. package/dist/casts/git-issue.d.ts +18 -0
  13. package/dist/casts/git-issue.js +26 -0
  14. package/dist/casts/git-patch.d.ts +49 -0
  15. package/dist/casts/git-patch.js +88 -0
  16. package/dist/casts/git-pull-request.d.ts +67 -0
  17. package/dist/casts/git-pull-request.js +122 -0
  18. package/dist/casts/git-repository.d.ts +9 -0
  19. package/dist/casts/git-repository.js +16 -0
  20. package/dist/casts/git-thread.d.ts +33 -0
  21. package/dist/casts/git-thread.js +65 -0
  22. package/dist/casts/index.d.ts +11 -0
  23. package/dist/casts/index.js +11 -0
  24. package/dist/casts/napplet.d.ts +98 -0
  25. package/dist/casts/napplet.js +196 -0
  26. package/dist/casts/note.d.ts +8 -0
  27. package/dist/casts/note.js +21 -1
  28. package/dist/casts/nsite.d.ts +134 -0
  29. package/dist/casts/nsite.js +249 -0
  30. package/dist/casts/profile.d.ts +20 -0
  31. package/dist/casts/profile.js +30 -0
  32. package/dist/casts/reaction.d.ts +1 -1
  33. package/dist/casts/relay-discovery.d.ts +4 -0
  34. package/dist/casts/relay-discovery.js +9 -1
  35. package/dist/casts/report.d.ts +28 -15
  36. package/dist/casts/report.js +42 -19
  37. package/dist/casts/share.d.ts +1 -1
  38. package/dist/casts/torrent.d.ts +5 -0
  39. package/dist/casts/torrent.js +8 -1
  40. package/dist/casts/trusted-assertions.d.ts +4 -2
  41. package/dist/casts/trusted-assertions.js +20 -19
  42. package/dist/casts/user-status.d.ts +33 -0
  43. package/dist/casts/user-status.js +69 -0
  44. package/dist/casts/user.d.ts +7 -0
  45. package/dist/casts/user.js +20 -1
  46. package/dist/factories/app-handler.d.ts +31 -0
  47. package/dist/factories/app-handler.js +50 -0
  48. package/dist/factories/app-recommendation.d.ts +21 -0
  49. package/dist/factories/app-recommendation.js +28 -0
  50. package/dist/factories/chat-message.d.ts +37 -0
  51. package/dist/factories/chat-message.js +56 -0
  52. package/dist/factories/comment.d.ts +8 -7
  53. package/dist/factories/comment.js +2 -2
  54. package/dist/factories/external-identities.d.ts +17 -0
  55. package/dist/factories/external-identities.js +28 -0
  56. package/dist/factories/forum-thread.d.ts +34 -0
  57. package/dist/factories/forum-thread.js +50 -0
  58. package/dist/factories/git-applied-status.d.ts +39 -0
  59. package/dist/factories/git-applied-status.js +53 -0
  60. package/dist/factories/git-closed-status.d.ts +18 -0
  61. package/dist/factories/git-closed-status.js +24 -0
  62. package/dist/factories/git-draft-status.d.ts +18 -0
  63. package/dist/factories/git-draft-status.js +24 -0
  64. package/dist/factories/git-issue.d.ts +19 -0
  65. package/dist/factories/git-issue.js +25 -0
  66. package/dist/factories/git-open-status.d.ts +18 -0
  67. package/dist/factories/git-open-status.js +22 -0
  68. package/dist/factories/git-patch.d.ts +59 -0
  69. package/dist/factories/git-patch.js +102 -0
  70. package/dist/factories/git-pull-request-update.d.ts +23 -0
  71. package/dist/factories/git-pull-request-update.js +33 -0
  72. package/dist/factories/git-pull-request.d.ts +39 -0
  73. package/dist/factories/git-pull-request.js +64 -0
  74. package/dist/factories/index.d.ts +23 -0
  75. package/dist/factories/index.js +23 -0
  76. package/dist/factories/internal/git-pull-request.d.ts +19 -0
  77. package/dist/factories/internal/git-pull-request.js +26 -0
  78. package/dist/factories/internal/git-status.d.ts +11 -0
  79. package/dist/factories/internal/git-status.js +12 -0
  80. package/dist/factories/internal/git-thread.d.ts +19 -0
  81. package/dist/factories/internal/git-thread.js +29 -0
  82. package/dist/factories/internal/napplet-manifest.d.ts +52 -0
  83. package/dist/factories/internal/napplet-manifest.js +85 -0
  84. package/dist/factories/internal/nsite-manifest.d.ts +45 -0
  85. package/dist/factories/internal/nsite-manifest.js +68 -0
  86. package/dist/factories/legacy-message.d.ts +2 -0
  87. package/dist/factories/legacy-message.js +9 -2
  88. package/dist/factories/named-napplet.d.ts +20 -0
  89. package/dist/factories/named-napplet.js +30 -0
  90. package/dist/factories/named-nsite.d.ts +28 -0
  91. package/dist/factories/named-nsite.js +53 -0
  92. package/dist/factories/napplet-snapshot.d.ts +18 -0
  93. package/dist/factories/napplet-snapshot.js +38 -0
  94. package/dist/factories/nostr-web-token.d.ts +39 -0
  95. package/dist/factories/nostr-web-token.js +95 -0
  96. package/dist/factories/nsite-snapshot.d.ts +18 -0
  97. package/dist/factories/nsite-snapshot.js +29 -0
  98. package/dist/factories/reaction.d.ts +3 -2
  99. package/dist/factories/report.d.ts +48 -0
  100. package/dist/factories/report.js +66 -0
  101. package/dist/factories/root-napplet.d.ts +18 -0
  102. package/dist/factories/root-napplet.js +24 -0
  103. package/dist/factories/root-nsite.d.ts +23 -0
  104. package/dist/factories/root-nsite.js +44 -0
  105. package/dist/factories/torrent.d.ts +24 -10
  106. package/dist/factories/torrent.js +48 -44
  107. package/dist/factories/trusted-provider-list.d.ts +23 -0
  108. package/dist/factories/trusted-provider-list.js +39 -0
  109. package/dist/factories/user-status.d.ts +26 -0
  110. package/dist/factories/user-status.js +52 -0
  111. package/dist/helpers/app-data.js +15 -7
  112. package/dist/helpers/app-handler.d.ts +43 -6
  113. package/dist/helpers/app-handler.js +53 -3
  114. package/dist/helpers/app-recommendation.d.ts +24 -0
  115. package/dist/helpers/app-recommendation.js +30 -0
  116. package/dist/helpers/bookmark.js +5 -2
  117. package/dist/helpers/comment.d.ts +11 -5
  118. package/dist/helpers/comment.js +7 -1
  119. package/dist/helpers/content.d.ts +3 -1
  120. package/dist/helpers/emoji-pack.js +11 -6
  121. package/dist/helpers/emoji.d.ts +2 -2
  122. package/dist/helpers/encrypted-content-cache.js +18 -1
  123. package/dist/helpers/external-id.d.ts +1 -0
  124. package/dist/helpers/external-id.js +21 -46
  125. package/dist/helpers/external-identities.d.ts +29 -0
  126. package/dist/helpers/external-identities.js +52 -0
  127. package/dist/helpers/file-metadata.js +5 -6
  128. package/dist/helpers/forum-thread.d.ts +10 -0
  129. package/dist/helpers/forum-thread.js +10 -0
  130. package/dist/helpers/gift-wrap.d.ts +40 -15
  131. package/dist/helpers/gift-wrap.js +110 -33
  132. package/dist/helpers/git-issue.d.ts +13 -0
  133. package/dist/helpers/git-issue.js +19 -0
  134. package/dist/helpers/git-patch.d.ts +41 -0
  135. package/dist/helpers/git-patch.js +73 -0
  136. package/dist/helpers/git-pull-request.d.ts +57 -0
  137. package/dist/helpers/git-pull-request.js +111 -0
  138. package/dist/helpers/git-repository.d.ts +4 -0
  139. package/dist/helpers/git-repository.js +16 -0
  140. package/dist/helpers/git-status.d.ts +44 -0
  141. package/dist/helpers/git-status.js +93 -0
  142. package/dist/helpers/git.d.ts +2 -0
  143. package/dist/helpers/git.js +4 -0
  144. package/dist/helpers/groups.d.ts +5 -2
  145. package/dist/helpers/groups.js +40 -18
  146. package/dist/helpers/hashtag.d.ts +4 -2
  147. package/dist/helpers/index.d.ts +11 -0
  148. package/dist/helpers/index.js +11 -0
  149. package/dist/helpers/lists.js +14 -2
  150. package/dist/helpers/lnurl.js +1 -1
  151. package/dist/helpers/mute.js +18 -7
  152. package/dist/helpers/napplet.d.ts +89 -0
  153. package/dist/helpers/napplet.js +144 -0
  154. package/dist/helpers/nostr-web-token.d.ts +54 -0
  155. package/dist/helpers/nostr-web-token.js +124 -0
  156. package/dist/helpers/nsite.d.ts +90 -0
  157. package/dist/helpers/nsite.js +217 -0
  158. package/dist/helpers/relay-discovery.d.ts +4 -0
  159. package/dist/helpers/relay-discovery.js +8 -0
  160. package/dist/helpers/reports.d.ts +35 -0
  161. package/dist/helpers/reports.js +36 -5
  162. package/dist/helpers/threading.d.ts +4 -2
  163. package/dist/helpers/torrent.d.ts +9 -6
  164. package/dist/helpers/torrent.js +23 -15
  165. package/dist/helpers/trusted-assertions.d.ts +7 -0
  166. package/dist/helpers/trusted-assertions.js +41 -2
  167. package/dist/helpers/user-status.d.ts +13 -1
  168. package/dist/helpers/user-status.js +15 -0
  169. package/dist/models/app-handler.d.ts +21 -0
  170. package/dist/models/app-handler.js +47 -0
  171. package/dist/models/git.d.ts +34 -0
  172. package/dist/models/git.js +144 -0
  173. package/dist/models/index.d.ts +3 -0
  174. package/dist/models/index.js +3 -0
  175. package/dist/models/nsite.d.ts +22 -0
  176. package/dist/models/nsite.js +67 -0
  177. package/dist/models/thread.d.ts +4 -1
  178. package/dist/models/thread.js +34 -5
  179. package/dist/models/user-status.d.ts +8 -4
  180. package/dist/models/user-status.js +16 -22
  181. package/dist/observable/filter-timeline-by-mutes.d.ts +1 -1
  182. package/dist/observable/filter-timeline-by-mutes.js +5 -1
  183. package/dist/operations/app-handler.d.ts +24 -0
  184. package/dist/operations/app-handler.js +58 -0
  185. package/dist/operations/app-recommendation.d.ts +13 -0
  186. package/dist/operations/app-recommendation.js +40 -0
  187. package/dist/operations/calendar-event.js +3 -2
  188. package/dist/operations/chat-message.d.ts +9 -0
  189. package/dist/operations/chat-message.js +12 -0
  190. package/dist/operations/client.d.ts +1 -4
  191. package/dist/operations/client.js +1 -23
  192. package/dist/operations/comment.d.ts +9 -3
  193. package/dist/operations/comment.js +12 -9
  194. package/dist/operations/external-identities.d.ts +8 -0
  195. package/dist/operations/external-identities.js +23 -0
  196. package/dist/operations/forum-thread.d.ts +3 -0
  197. package/dist/operations/forum-thread.js +6 -0
  198. package/dist/operations/gift-wrap.js +38 -14
  199. package/dist/operations/git-issue.d.ts +18 -0
  200. package/dist/operations/git-issue.js +31 -0
  201. package/dist/operations/git-patch.d.ts +30 -0
  202. package/dist/operations/git-patch.js +75 -0
  203. package/dist/operations/git-pull-request.d.ts +29 -0
  204. package/dist/operations/git-pull-request.js +74 -0
  205. package/dist/operations/git-repository.js +4 -4
  206. package/dist/operations/git-status.d.ts +28 -0
  207. package/dist/operations/git-status.js +116 -0
  208. package/dist/operations/git-thread.d.ts +13 -0
  209. package/dist/operations/git-thread.js +39 -0
  210. package/dist/operations/index.d.ts +16 -0
  211. package/dist/operations/index.js +16 -0
  212. package/dist/operations/internal/git-commits.d.ts +2 -0
  213. package/dist/operations/internal/git-commits.js +16 -0
  214. package/dist/operations/napplet.d.ts +51 -0
  215. package/dist/operations/napplet.js +121 -0
  216. package/dist/operations/nostr-web-token.d.ts +27 -0
  217. package/dist/operations/nostr-web-token.js +58 -0
  218. package/dist/operations/nsite.d.ts +51 -0
  219. package/dist/operations/nsite.js +112 -0
  220. package/dist/operations/reaction.d.ts +12 -2
  221. package/dist/operations/reaction.js +1 -1
  222. package/dist/operations/report.d.ts +33 -0
  223. package/dist/operations/report.js +60 -0
  224. package/dist/operations/stream.js +5 -4
  225. package/dist/operations/torrent.d.ts +1 -4
  226. package/dist/operations/torrent.js +24 -11
  227. package/dist/operations/trusted-providers.d.ts +14 -0
  228. package/dist/operations/trusted-providers.js +33 -0
  229. package/dist/operations/user-status.d.ts +11 -0
  230. package/dist/operations/user-status.js +29 -0
  231. package/package.json +10 -10
@@ -1,19 +1,18 @@
1
1
  // Read https://github.com/nostr-protocol/nips/blob/master/59.md#overview for details on rumors and seals
2
2
  // Gift wrap (signed random key) -> seal (signed sender key) -> rumor (unsigned)
3
3
  import { blankEventTemplate } from "applesauce-core/factories";
4
+ import { setCachedValue } from "applesauce-core/helpers/cache";
4
5
  import { EncryptedContentSymbol } from "applesauce-core/helpers/encrypted-content";
5
6
  import { nip44 } from "applesauce-core/helpers/encryption";
6
7
  import { finalizeEvent, getEventHash, kinds, } from "applesauce-core/helpers/event";
7
8
  import { generateSecretKey } from "applesauce-core/helpers/keys";
8
- import { eventPipe, PRESERVE_EVENT_SYMBOLS } from "applesauce-core/helpers/pipeline";
9
+ import { eventPipe } from "applesauce-core/helpers/pipeline";
9
10
  import { unixNow } from "applesauce-core/helpers/time";
10
11
  import { setEncryptedContent } from "applesauce-core/operations/encrypted-content";
11
12
  import { setMetaTags, stamp } from "applesauce-core/operations/event";
12
13
  import { GiftWrapSymbol, RumorSymbol, SealSymbol } from "../helpers/gift-wrap.js";
13
- // Preserve gift-wrap and seal symbols when building gift-wrap events
14
- PRESERVE_EVENT_SYMBOLS.add(GiftWrapSymbol);
15
- PRESERVE_EVENT_SYMBOLS.add(SealSymbol);
16
- PRESERVE_EVENT_SYMBOLS.add(RumorSymbol);
14
+ // GiftWrapSymbol/SealSymbol/RumorSymbol are static members of applesauce-core's
15
+ // PRESERVE_EVENT_SYMBOLS (see core/helpers/pipeline.ts) — no import-time mutation needed here.
17
16
  /** Create a timestamp with a random offset of an hour */
18
17
  function randomNow() {
19
18
  return unixNow() - Math.floor(Math.random() * 60 * 60);
@@ -56,14 +55,23 @@ export function sealRumor(pubkey, signer) {
56
55
  // Stamp the seal with the signer's pubkey
57
56
  stamp(signer))({ ...blankEventTemplate(kinds.Seal), created_at: randomNow() });
58
57
  const seal = await signer.signEvent(unsigned);
59
- // Set the downstream reference on the seal
60
- Reflect.set(seal, RumorSymbol, rumor);
58
+ // Set the downstream reference on the seal: an object-reference link to `rumor`, not a
59
+ // value copy. `RumorSymbol` is a static member of `PRESERVE_EVENT_SYMBOLS` (applesauce-core),
60
+ // which stops `eventPipe`'s delete loop from scrubbing it mid-pipe — it is NOT carried onto a
61
+ // redelivered duplicate of this event by `EventStore.copySymbolsToDuplicateEvent`'s merge
62
+ // list, which has no gift-wrap symbols — accumulated state (see cache.ts one-rule doc block).
63
+ // Written non-enumerable via setCachedValue so a plain spread drops it instead of silently
64
+ // carrying a stale reference forward.
65
+ setCachedValue(seal, RumorSymbol, rumor);
61
66
  // Add the upstream reference to the rumor
62
67
  const seals = Reflect.get(rumor, SealSymbol);
63
68
  if (seals)
64
69
  seals.add(seal);
70
+ // Initializes the mutable Set that grows in place elsewhere (helpers/gift-wrap.ts's
71
+ // addParentSealReference) — accumulated state (see cache.ts one-rule doc block), not a memo.
72
+ // Written non-enumerable via setCachedValue.
65
73
  else
66
- Reflect.set(rumor, SealSymbol, new Set([seal]));
74
+ setCachedValue(rumor, SealSymbol, new Set([seal]));
67
75
  return seal;
68
76
  };
69
77
  }
@@ -81,12 +89,28 @@ export function wrapSeal(pubkey, opts) {
81
89
  tags: [["p", pubkey]],
82
90
  });
83
91
  const gift = finalizeEvent(draft, key);
84
- // Set the upstream references on the seal
85
- Reflect.set(seal, GiftWrapSymbol, gift);
86
- // Set the downstream reference on the gift wrap
87
- Reflect.set(gift, SealSymbol, seal);
88
- // Set the encrypted content on the gift wrap
89
- Reflect.set(gift, EncryptedContentSymbol, plaintext);
92
+ // Set the upstream reference on the seal: an object-reference link to `gift`, not a
93
+ // value copy. `GiftWrapSymbol` is a static member of `PRESERVE_EVENT_SYMBOLS` (applesauce-core),
94
+ // which stops `eventPipe`'s delete loop from scrubbing it mid-pipe — it is NOT carried onto a
95
+ // redelivered duplicate of this event by `EventStore.copySymbolsToDuplicateEvent`'s merge
96
+ // list, which has no gift-wrap symbols — accumulated state (see cache.ts one-rule doc block).
97
+ // Written non-enumerable via setCachedValue.
98
+ setCachedValue(seal, GiftWrapSymbol, gift);
99
+ // Set the downstream reference on the gift wrap: an object-reference link to `seal`, not
100
+ // a value copy. `SealSymbol`'s static membership in `PRESERVE_EVENT_SYMBOLS` (applesauce-core)
101
+ // buys survival of `eventPipe`'s delete loop, nothing more — it is NOT carried onto a
102
+ // redelivered duplicate of this event by that merge list, which has no gift-wrap symbols
103
+ // — accumulated state (see cache.ts one-rule doc block). Written non-enumerable via
104
+ // setCachedValue.
105
+ setCachedValue(gift, SealSymbol, seal);
106
+ // Set the encrypted content on the gift wrap: a build-path write, like applesauce-core's
107
+ // operations/tags.ts's modifyHiddenTags return and operations/encrypted-content.ts's
108
+ // setEncryptedContent return. `wrapSeal` is the last step of the `giftWrap` eventPipe, so this
109
+ // write survives because PRESERVE_EVENT_SYMBOLS keeps it through the delete loop that runs
110
+ // immediately after this operation — it is set directly on this operation's own returned
111
+ // event (`gift`), not inherited from a prior step's carry-forward. Written non-enumerable via
112
+ // setCachedValue (see cache.ts one-rule doc block).
113
+ setCachedValue(gift, EncryptedContentSymbol, plaintext);
90
114
  return gift;
91
115
  };
92
116
  }
@@ -0,0 +1,18 @@
1
+ import { EventOperation } from "applesauce-core/factories";
2
+ import { NostrEvent } from "applesauce-core/helpers/event";
3
+ import { GitRepositoryPointer } from "../helpers/git-repository.js";
4
+ /** Returns the `a`, `p` and `r` tags that link an event to a repository */
5
+ export { createGitRepositoryTags } from "./git-thread.js";
6
+ /**
7
+ * Sets the repository an issue belongs to
8
+ * @throws if the event or pointer is not a valid repository
9
+ */
10
+ export declare function setGitIssueRepository(repo: GitRepositoryPointer | NostrEvent): EventOperation;
11
+ /** Sets or removes the issue subject */
12
+ export declare function setGitIssueSubject(subject: string | null): EventOperation;
13
+ /** Adds a label `t` tag */
14
+ export declare function addGitIssueLabel(label: string): EventOperation;
15
+ /** Removes a label `t` tag */
16
+ export declare function removeGitIssueLabel(label: string): EventOperation;
17
+ /** Replaces all label `t` tags */
18
+ export declare function setGitIssueLabels(labels: string[]): EventOperation;
@@ -0,0 +1,31 @@
1
+ import { modifyPublicTags } from "applesauce-core/operations/tags";
2
+ import { removeSingletonTag, setSingletonTag } from "applesauce-core/operations/tag/common";
3
+ import { setGitThreadRepository } from "./git-thread.js";
4
+ /** Returns the `a`, `p` and `r` tags that link an event to a repository */
5
+ export { createGitRepositoryTags } from "./git-thread.js";
6
+ /**
7
+ * Sets the repository an issue belongs to
8
+ * @throws if the event or pointer is not a valid repository
9
+ */
10
+ export function setGitIssueRepository(repo) {
11
+ return setGitThreadRepository(repo);
12
+ }
13
+ /** Sets or removes the issue subject */
14
+ export function setGitIssueSubject(subject) {
15
+ return modifyPublicTags(subject === null ? removeSingletonTag("subject") : setSingletonTag(["subject", subject]));
16
+ }
17
+ /** Adds a label `t` tag */
18
+ export function addGitIssueLabel(label) {
19
+ return modifyPublicTags((tags) => [...tags.filter((t) => !(t[0] === "t" && t[1] === label)), ["t", label]]);
20
+ }
21
+ /** Removes a label `t` tag */
22
+ export function removeGitIssueLabel(label) {
23
+ return modifyPublicTags((tags) => tags.filter((t) => !(t[0] === "t" && t[1] === label)));
24
+ }
25
+ /** Replaces all label `t` tags */
26
+ export function setGitIssueLabels(labels) {
27
+ return modifyPublicTags((tags) => [
28
+ ...tags.filter((t) => t[0] !== "t"),
29
+ ...[...new Set(labels)].map((label) => ["t", label]),
30
+ ]);
31
+ }
@@ -0,0 +1,30 @@
1
+ import { EventOperation } from "applesauce-core/factories";
2
+ import { NostrEvent } from "applesauce-core/helpers/event";
3
+ import { EventPointer } from "applesauce-core/helpers/pointers";
4
+ import { GitPatchCommitter } from "../helpers/git-patch.js";
5
+ /** Sets the patch series marker, preserving ordinary labels */
6
+ export declare function setGitPatchRoot(type: "root" | "root-revision" | null): EventOperation;
7
+ /** Replaces patch labels while preserving series markers */
8
+ export declare function setGitPatchLabels(labels: string[]): EventOperation;
9
+ /**
10
+ * Sets or removes the previous patch or original root reference
11
+ * @throws if the pointer has an invalid event id
12
+ */
13
+ export declare function setGitPatchPrevious(patch: NostrEvent | EventPointer | null): EventOperation;
14
+ /**
15
+ * Sets or removes the patch commit and its matching discovery tag
16
+ * @throws if the commit is not a Git object id
17
+ */
18
+ export declare function setGitPatchCommit(commit: string | null): EventOperation;
19
+ /**
20
+ * Sets or removes the parent commit
21
+ * @throws if the commit is not a Git object id
22
+ */
23
+ export declare function setGitPatchParentCommit(commit: string | null): EventOperation;
24
+ /** Sets or removes the commit signature, retaining an empty string for unsigned commits */
25
+ export declare function setGitPatchCommitSignature(signature: string | null): EventOperation;
26
+ /**
27
+ * Sets or removes reproducible committer metadata
28
+ * @throws if the timestamp or timezone is invalid
29
+ */
30
+ export declare function setGitPatchCommitter(committer: GitPatchCommitter | null): EventOperation;
@@ -0,0 +1,75 @@
1
+ import { isHexKey } from "applesauce-core/helpers/string";
2
+ import { modifyPublicTags } from "applesauce-core/operations/tags";
3
+ import { removeSingletonTag, setSingletonTag } from "applesauce-core/operations/tag/common";
4
+ import { isGitCommitId } from "../helpers/git.js";
5
+ import { replaceGitCommitReferences } from "./internal/git-commits.js";
6
+ /** Sets the patch series marker, preserving ordinary labels */
7
+ export function setGitPatchRoot(type) {
8
+ return modifyPublicTags((tags) => [
9
+ ...tags.filter((t) => !(t[0] === "t" && ["root", "root-revision"].includes(t[1]))),
10
+ ...(type ? [["t", type]] : []),
11
+ ]);
12
+ }
13
+ /** Replaces patch labels while preserving series markers */
14
+ export function setGitPatchLabels(labels) {
15
+ return modifyPublicTags((tags) => [
16
+ ...tags.filter((t) => t[0] !== "t" || ["root", "root-revision"].includes(t[1])),
17
+ ...[...new Set(labels)].filter((label) => !["root", "root-revision"].includes(label)).map((label) => ["t", label]),
18
+ ]);
19
+ }
20
+ /**
21
+ * Sets or removes the previous patch or original root reference
22
+ * @throws if the pointer has an invalid event id
23
+ */
24
+ export function setGitPatchPrevious(patch) {
25
+ if (patch && !isHexKey(patch.id))
26
+ throw new Error("Invalid patch id");
27
+ const relay = patch && "relays" in patch ? patch.relays?.[0] : "";
28
+ const author = patch && "pubkey" in patch ? patch.pubkey : patch?.author;
29
+ return modifyPublicTags((tags) => [
30
+ ...tags.filter((t) => !(t[0] === "e" && t[3] === "reply")),
31
+ ...(patch ? [["e", patch.id, relay || "", "reply", ...(author ? [author] : [])]] : []),
32
+ ]);
33
+ }
34
+ /**
35
+ * Sets or removes the patch commit and its matching discovery tag
36
+ * @throws if the commit is not a Git object id
37
+ */
38
+ export function setGitPatchCommit(commit) {
39
+ if (commit !== null && !isGitCommitId(commit))
40
+ throw new Error("Invalid Git commit id");
41
+ return modifyPublicTags((tags) => replaceGitCommitReferences(tags, "commit", commit ? [commit] : []));
42
+ }
43
+ /**
44
+ * Sets or removes the parent commit
45
+ * @throws if the commit is not a Git object id
46
+ */
47
+ export function setGitPatchParentCommit(commit) {
48
+ if (commit !== null && !isGitCommitId(commit))
49
+ throw new Error("Invalid Git commit id");
50
+ return modifyPublicTags(commit === null ? removeSingletonTag("parent-commit") : setSingletonTag(["parent-commit", commit]));
51
+ }
52
+ /** Sets or removes the commit signature, retaining an empty string for unsigned commits */
53
+ export function setGitPatchCommitSignature(signature) {
54
+ return modifyPublicTags(signature === null ? removeSingletonTag("commit-pgp-sig") : setSingletonTag(["commit-pgp-sig", signature]));
55
+ }
56
+ /**
57
+ * Sets or removes reproducible committer metadata
58
+ * @throws if the timestamp or timezone is invalid
59
+ */
60
+ export function setGitPatchCommitter(committer) {
61
+ if (committer &&
62
+ (!Number.isSafeInteger(committer.timestamp) ||
63
+ committer.timestamp < 0 ||
64
+ !Number.isInteger(committer.timezoneOffset)))
65
+ throw new Error("Invalid committer timestamp or timezone");
66
+ return modifyPublicTags(committer === null
67
+ ? removeSingletonTag("committer")
68
+ : setSingletonTag([
69
+ "committer",
70
+ committer.name,
71
+ committer.email,
72
+ String(committer.timestamp),
73
+ String(committer.timezoneOffset),
74
+ ]));
75
+ }
@@ -0,0 +1,29 @@
1
+ import { EventOperation } from "applesauce-core/factories";
2
+ import { NostrEvent } from "applesauce-core/helpers/event";
3
+ /**
4
+ * Sets the branch tip commit of a pull request or update
5
+ * @throws if the commit is not a Git object id
6
+ */
7
+ export declare function setGitPullRequestTipCommit(commit: string): EventOperation;
8
+ /**
9
+ * Replaces the clone URLs of a pull request or update
10
+ * @throws if there are no nonempty clone URLs
11
+ */
12
+ export declare function setGitPullRequestCloneUrls(urls: string[]): EventOperation;
13
+ /** Sets or removes the recommended branch name */
14
+ export declare function setGitPullRequestBranchName(name: string | null): EventOperation;
15
+ /**
16
+ * Sets or removes the common ancestor with the target branch
17
+ * @throws if the commit is not a Git object id
18
+ */
19
+ export declare function setGitPullRequestMergeBase(commit: string | null): EventOperation;
20
+ /**
21
+ * Sets or removes the original patch revised by a pull request
22
+ * @throws if the target is not a root patch or its id is invalid
23
+ */
24
+ export declare function setGitPullRequestPatch(patch: NostrEvent | string | null): EventOperation;
25
+ /**
26
+ * Sets the pull request targeted by an update and copies its repository tags
27
+ * @throws if the target is not a valid pull request
28
+ */
29
+ export declare function setGitPullRequestUpdateTarget(pr: NostrEvent, relay?: string): EventOperation;
@@ -0,0 +1,74 @@
1
+ import { isHexKey } from "applesauce-core/helpers/string";
2
+ import { modifyPublicTags } from "applesauce-core/operations/tags";
3
+ import { removeSingletonTag, setSingletonTag } from "applesauce-core/operations/tag/common";
4
+ import { isGitCommitId } from "../helpers/git.js";
5
+ import { isGitPatchRoot, isValidGitPatch } from "../helpers/git-patch.js";
6
+ import { isValidGitPullRequest } from "../helpers/git-pull-request.js";
7
+ import { getGitRepositoryReference } from "../helpers/git-repository.js";
8
+ import { setGitThreadRepository } from "./git-thread.js";
9
+ /**
10
+ * Sets the branch tip commit of a pull request or update
11
+ * @throws if the commit is not a Git object id
12
+ */
13
+ export function setGitPullRequestTipCommit(commit) {
14
+ if (!isGitCommitId(commit))
15
+ throw new Error("Invalid Git commit id");
16
+ return modifyPublicTags(setSingletonTag(["c", commit]));
17
+ }
18
+ /**
19
+ * Replaces the clone URLs of a pull request or update
20
+ * @throws if there are no nonempty clone URLs
21
+ */
22
+ export function setGitPullRequestCloneUrls(urls) {
23
+ if (!urls.length || urls.some((url) => !url.trim()))
24
+ throw new Error("Expected at least one clone URL");
25
+ return modifyPublicTags((tags) => [...tags.filter((t) => t[0] !== "clone"), ["clone", ...new Set(urls)]]);
26
+ }
27
+ /** Sets or removes the recommended branch name */
28
+ export function setGitPullRequestBranchName(name) {
29
+ return modifyPublicTags(name === null ? removeSingletonTag("branch-name") : setSingletonTag(["branch-name", name]));
30
+ }
31
+ /**
32
+ * Sets or removes the common ancestor with the target branch
33
+ * @throws if the commit is not a Git object id
34
+ */
35
+ export function setGitPullRequestMergeBase(commit) {
36
+ if (commit !== null && !isGitCommitId(commit))
37
+ throw new Error("Invalid Git commit id");
38
+ return modifyPublicTags(commit === null ? removeSingletonTag("merge-base") : setSingletonTag(["merge-base", commit]));
39
+ }
40
+ /**
41
+ * Sets or removes the original patch revised by a pull request
42
+ * @throws if the target is not a root patch or its id is invalid
43
+ */
44
+ export function setGitPullRequestPatch(patch) {
45
+ if (patch !== null && typeof patch !== "string" && (!isValidGitPatch(patch) || !isGitPatchRoot(patch)))
46
+ throw new Error("Expected a root patch");
47
+ const id = typeof patch === "string" ? patch : patch?.id;
48
+ if (id !== undefined && !isHexKey(id))
49
+ throw new Error("Invalid patch id");
50
+ return modifyPublicTags(id === undefined ? removeSingletonTag("e") : setSingletonTag(["e", id]));
51
+ }
52
+ /**
53
+ * Sets the pull request targeted by an update and copies its repository tags
54
+ * @throws if the target is not a valid pull request
55
+ */
56
+ export function setGitPullRequestUpdateTarget(pr, relay = "") {
57
+ if (!isValidGitPullRequest(pr) || !isHexKey(pr.id) || !isHexKey(pr.pubkey))
58
+ throw new Error("Expected a valid pull request");
59
+ const repo = getGitRepositoryReference(pr);
60
+ const repository = setGitThreadRepository(repo);
61
+ return async (draft) => {
62
+ const next = await repository(draft);
63
+ return modifyPublicTags((tags) => {
64
+ const oldAuthor = tags.find((t) => t[0] === "P")?.[1];
65
+ const result = tags.filter((t) => t[0] !== "E" && t[0] !== "P" && t[0] !== "r" && !(t[0] === "p" && t[1] === oldAuthor && t[1] !== repo.pubkey));
66
+ const euc = pr.tags.find((t) => t[0] === "r")?.[1];
67
+ if (euc)
68
+ result.push(["r", euc]);
69
+ if (!result.some((t) => t[0] === "p" && t[1] === pr.pubkey))
70
+ result.push(["p", pr.pubkey]);
71
+ return [...result, ["E", pr.id, relay], ["P", pr.pubkey]];
72
+ })(next);
73
+ };
74
+ }
@@ -1,6 +1,6 @@
1
1
  import { getReplaceableAddressFromPointer } from "applesauce-core/helpers/pointers";
2
2
  import { isSafeRelayURL } from "applesauce-core/helpers/relays";
3
- import { normalizeURL } from "applesauce-core/helpers/url";
3
+ import { normalizeURL, serializeURL } from "applesauce-core/helpers/url";
4
4
  import { includeSingletonTag, modifyPublicTags } from "applesauce-core/operations/tags";
5
5
  import { removeSingletonTag, setSingletonTag } from "applesauce-core/operations/tag/common";
6
6
  import { GIT_REPOSITORY_KIND } from "../helpers/git-repository.js";
@@ -46,7 +46,7 @@ export function setGitRepositoryCloneUrls(urls) {
46
46
  /** Sets the repository relay URLs (single `relays` tag, normalized). */
47
47
  export function setGitRepositoryRelays(relays) {
48
48
  return modifyPublicTags((tags) => {
49
- const normalized = relays.map((relay) => new URL(relay).toString());
49
+ const normalized = relays.map((relay) => serializeURL(relay));
50
50
  return withFlatListTag(tags, "relays", normalized);
51
51
  });
52
52
  }
@@ -84,7 +84,7 @@ export function removeGitRepositoryCloneUrl(url) {
84
84
  }
85
85
  /** Adds a repository relay URL. */
86
86
  export function addGitRepositoryRelay(relay) {
87
- const normalized = new URL(relay).toString();
87
+ const normalized = serializeURL(relay);
88
88
  return modifyPublicTags((tags) => {
89
89
  const cur = collectFlatTagValues(tags, "relays");
90
90
  if (cur.includes(normalized))
@@ -94,7 +94,7 @@ export function addGitRepositoryRelay(relay) {
94
94
  }
95
95
  /** Removes a repository relay URL. */
96
96
  export function removeGitRepositoryRelay(relay) {
97
- const normalized = new URL(relay).toString();
97
+ const normalized = serializeURL(relay);
98
98
  return modifyPublicTags((tags) => {
99
99
  const cur = collectFlatTagValues(tags, "relays").filter((r) => r !== normalized);
100
100
  return withFlatListTag(tags, "relays", cur);
@@ -0,0 +1,28 @@
1
+ import { EventOperation } from "applesauce-core/factories";
2
+ import { NostrEvent } from "applesauce-core/helpers/event";
3
+ import { EventPointer } from "applesauce-core/helpers/pointers";
4
+ /**
5
+ * Sets the original root and removes tags belonging to a replaced target
6
+ * @throws if the target is not an issue, pull request or original root patch
7
+ */
8
+ export declare function setGitStatusRoot(root: NostrEvent, relay?: string): EventOperation;
9
+ /**
10
+ * Replaces the applied patch references, retaining relay and author hints
11
+ * @throws if a patch id is invalid
12
+ */
13
+ export declare function setGitStatusAppliedPatches(patches: (string | EventPointer)[]): EventOperation;
14
+ /**
15
+ * Sets or removes the accepted revision root and tags its author
16
+ * @throws if the event is not a revision root patch
17
+ */
18
+ export declare function setGitStatusAcceptedRevision(revision: NostrEvent | null, relay?: string): EventOperation;
19
+ /**
20
+ * Sets or removes the merge commit and its discovery tag
21
+ * @throws if the commit is not a Git object id
22
+ */
23
+ export declare function setGitStatusMergeCommit(commit: string | null): EventOperation;
24
+ /**
25
+ * Replaces the applied commit ids and their discovery tags
26
+ * @throws if a commit is not a Git object id
27
+ */
28
+ export declare function setGitStatusAppliedCommits(commits: string[]): EventOperation;
@@ -0,0 +1,116 @@
1
+ import { isHexKey } from "applesauce-core/helpers/string";
2
+ import { modifyPublicTags } from "applesauce-core/operations/tags";
3
+ import { isValidGitIssue } from "../helpers/git-issue.js";
4
+ import { isGitPatchRoot, isGitPatchRootRevision, isValidGitPatch } from "../helpers/git-patch.js";
5
+ import { isValidGitPullRequest } from "../helpers/git-pull-request.js";
6
+ import { getGitRepositoryReference } from "../helpers/git-repository.js";
7
+ import { isGitCommitId } from "../helpers/git.js";
8
+ import { createGitRepositoryTags } from "./git-thread.js";
9
+ import { replaceGitCommitReferences } from "./internal/git-commits.js";
10
+ /**
11
+ * Sets the original root and removes tags belonging to a replaced target
12
+ * @throws if the target is not an issue, pull request or original root patch
13
+ */
14
+ export function setGitStatusRoot(root, relay = "") {
15
+ if (!(isValidGitIssue(root) ||
16
+ isValidGitPullRequest(root) ||
17
+ (isValidGitPatch(root) && isGitPatchRoot(root) && !isGitPatchRootRevision(root))) ||
18
+ !isHexKey(root.id) ||
19
+ !isHexKey(root.pubkey))
20
+ throw new Error("Expected an issue, pull request or original root patch");
21
+ return modifyPublicTags((tags) => {
22
+ const oldRoot = tags.find((t) => t[0] === "e" && t[3] === "root");
23
+ const changed = !!oldRoot && oldRoot[1] !== root.id;
24
+ const oldOwner = getGitRepositoryReference({ tags })?.pubkey;
25
+ const oldAuthor = oldRoot?.[4];
26
+ const oldRevisionAuthor = tags.find((t) => t[0] === "e" && t[3] === "reply")?.[4];
27
+ const scoped = ["q", "merge-commit", "applied-as-commits"];
28
+ const next = tags.filter((t) => t[0] !== "a" &&
29
+ t[0] !== "r" &&
30
+ !(t[0] === "e" && (t[3] === "root" || (changed && t[3] === "reply"))) &&
31
+ !(changed &&
32
+ (scoped.includes(t[0]) || (t[0] === "p" && [oldOwner, oldAuthor, oldRevisionAuthor].includes(t[1])))));
33
+ // The fifth field preserves the generated author when the target is replaced later.
34
+ next.push(["e", root.id, relay, "root", root.pubkey]);
35
+ const repo = getGitRepositoryReference(root);
36
+ for (const tag of createGitRepositoryTags(repo))
37
+ if (tag[0] !== "p")
38
+ next.push(tag);
39
+ const patchCommit = root.tags.find((t) => t[0] === "commit")?.[1];
40
+ const euc = root.tags.find((t) => t[0] === "r" &&
41
+ (t[1] !== patchCommit || root.tags.filter((r) => r[0] === "r" && r[1] === patchCommit).length > 1))?.[1];
42
+ if (euc)
43
+ next.push(["r", euc]);
44
+ for (const pubkey of new Set([root.pubkey, repo.pubkey]))
45
+ if (!next.some((t) => t[0] === "p" && t[1] === pubkey))
46
+ next.push(["p", pubkey]);
47
+ for (const commit of next.filter((t) => scoped.slice(1).includes(t[0])).flatMap((t) => t.slice(1)))
48
+ next.push(["r", commit]);
49
+ return next;
50
+ });
51
+ }
52
+ /**
53
+ * Replaces the applied patch references, retaining relay and author hints
54
+ * @throws if a patch id is invalid
55
+ */
56
+ export function setGitStatusAppliedPatches(patches) {
57
+ if (patches.some((patch) => !isHexKey(typeof patch === "string" ? patch : patch.id)))
58
+ throw new Error("Invalid patch id");
59
+ return modifyPublicTags((tags) => [
60
+ ...tags.filter((t) => t[0] !== "q"),
61
+ ...patches.map((patch) => typeof patch === "string"
62
+ ? ["q", patch]
63
+ : ["q", patch.id, patch.relays?.[0] || "", ...(patch.author ? [patch.author] : [])]),
64
+ ]);
65
+ }
66
+ /**
67
+ * Sets or removes the accepted revision root and tags its author
68
+ * @throws if the event is not a revision root patch
69
+ */
70
+ export function setGitStatusAcceptedRevision(revision, relay = "") {
71
+ if (revision &&
72
+ (!isValidGitPatch(revision) ||
73
+ !isGitPatchRootRevision(revision) ||
74
+ !isHexKey(revision.id) ||
75
+ !isHexKey(revision.pubkey)))
76
+ throw new Error("Expected a revision root patch");
77
+ return modifyPublicTags((tags) => {
78
+ const root = tags.find((t) => t[0] === "e" && t[3] === "root");
79
+ const previous = revision?.tags.find((t) => t[0] === "e" && t[3] === "reply")?.[1];
80
+ if (revision && (!root || previous !== root[1]))
81
+ throw new Error("Revision must reference the status root");
82
+ const oldAuthor = tags.find((t) => t[0] === "e" && t[3] === "reply")?.[4];
83
+ const repository = getGitRepositoryReference({ tags });
84
+ const revisionRepository = revision && getGitRepositoryReference(revision);
85
+ if (revision &&
86
+ (repository?.pubkey !== revisionRepository?.pubkey || repository?.identifier !== revisionRepository?.identifier))
87
+ throw new Error("Revision must belong to the status repository");
88
+ const owner = repository?.pubkey;
89
+ const next = tags.filter((t) => !(t[0] === "e" && t[3] === "reply") &&
90
+ !(t[0] === "p" && t[1] === oldAuthor && t[1] !== root?.[4] && t[1] !== owner));
91
+ if (revision) {
92
+ next.push(["e", revision.id, relay, "reply", revision.pubkey]);
93
+ if (!next.some((t) => t[0] === "p" && t[1] === revision.pubkey))
94
+ next.push(["p", revision.pubkey]);
95
+ }
96
+ return next;
97
+ });
98
+ }
99
+ /**
100
+ * Sets or removes the merge commit and its discovery tag
101
+ * @throws if the commit is not a Git object id
102
+ */
103
+ export function setGitStatusMergeCommit(commit) {
104
+ if (commit !== null && !isGitCommitId(commit))
105
+ throw new Error("Invalid Git commit id");
106
+ return modifyPublicTags((tags) => replaceGitCommitReferences(tags, "merge-commit", commit ? [commit] : []));
107
+ }
108
+ /**
109
+ * Replaces the applied commit ids and their discovery tags
110
+ * @throws if a commit is not a Git object id
111
+ */
112
+ export function setGitStatusAppliedCommits(commits) {
113
+ if (commits.some((commit) => !isGitCommitId(commit)))
114
+ throw new Error("Invalid Git commit id");
115
+ return modifyPublicTags((tags) => replaceGitCommitReferences(tags, "applied-as-commits", commits));
116
+ }
@@ -0,0 +1,13 @@
1
+ import { EventOperation } from "applesauce-core/factories";
2
+ import { NostrEvent } from "applesauce-core/helpers/event";
3
+ import { GitRepositoryPointer } from "../helpers/git-repository.js";
4
+ /**
5
+ * Returns the tags linking a thread to a repository
6
+ * @throws if the event or pointer is not a valid repository
7
+ */
8
+ export declare function createGitRepositoryTags(repo: GitRepositoryPointer | NostrEvent): string[][];
9
+ /**
10
+ * Replaces repository tags while preserving commit references and unrelated recipients
11
+ * @throws if the event or pointer is not a valid repository
12
+ */
13
+ export declare function setGitThreadRepository(repo: GitRepositoryPointer | NostrEvent): EventOperation;
@@ -0,0 +1,39 @@
1
+ import { isEvent } from "applesauce-core/helpers/event";
2
+ import { createATagFromAddressPointer } from "applesauce-core/helpers/factory";
3
+ import { getAddressPointerForEvent } from "applesauce-core/helpers/pointers";
4
+ import { isHexKey } from "applesauce-core/helpers/string";
5
+ import { modifyPublicTags } from "applesauce-core/operations/tags";
6
+ import { GIT_REPOSITORY_KIND, getGitRepositoryEarliestUniqueCommit, getGitRepositoryReference, isValidGitRepository, } from "../helpers/git-repository.js";
7
+ /**
8
+ * Returns the tags linking a thread to a repository
9
+ * @throws if the event or pointer is not a valid repository
10
+ */
11
+ export function createGitRepositoryTags(repo) {
12
+ if (isEvent(repo) && !isValidGitRepository(repo))
13
+ throw new Error("Expected a git repository event");
14
+ const pointer = isEvent(repo) ? getAddressPointerForEvent(repo) : repo;
15
+ if (!pointer || pointer.kind !== GIT_REPOSITORY_KIND || !pointer.identifier || !isHexKey(pointer.pubkey))
16
+ throw new Error("Expected a git repository pointer");
17
+ const tags = [createATagFromAddressPointer(pointer), ["p", pointer.pubkey]];
18
+ const euc = isEvent(repo) ? getGitRepositoryEarliestUniqueCommit(repo) : undefined;
19
+ if (euc)
20
+ tags.push(["r", euc]);
21
+ return tags;
22
+ }
23
+ /**
24
+ * Replaces repository tags while preserving commit references and unrelated recipients
25
+ * @throws if the event or pointer is not a valid repository
26
+ */
27
+ export function setGitThreadRepository(repo) {
28
+ const repoTags = createGitRepositoryTags(repo);
29
+ return modifyPublicTags((tags) => {
30
+ const oldRepo = getGitRepositoryReference({ tags });
31
+ const commitTags = tags
32
+ .filter((t) => ["commit", "c", "merge-commit", "applied-as-commits"].includes(t[0]))
33
+ .flatMap((t) => [...new Set(t.slice(1))])
34
+ .filter((id) => tags.some((t) => t[0] === "r" && t[1] === id))
35
+ .map((id) => ["r", id]);
36
+ const next = tags.filter((t) => t[0] !== "a" && t[0] !== "r" && !(t[0] === "p" && (t[1] === oldRepo?.pubkey || t[1] === repoTags[1][1])));
37
+ return [...next, ...commitTags, ...repoTags];
38
+ });
39
+ }
@@ -1,4 +1,6 @@
1
1
  export * as AppData from "./app-data.js";
2
+ export * as AppHandler from "./app-handler.js";
3
+ export * as AppRecommendation from "./app-recommendation.js";
2
4
  export * as Badge from "./badge.js";
3
5
  export * as BadgeAward from "./badge-award.js";
4
6
  export * as CodeSnippet from "./code-snippet.js";
@@ -6,13 +8,21 @@ export * as Calendar from "./calendar.js";
6
8
  export * as CalendarEvent from "./calendar-event.js";
7
9
  export * as CalendarRsvp from "./calendar-rsvp.js";
8
10
  export * as Channel from "./channel.js";
11
+ export * as ChatMessage from "./chat-message.js";
12
+ export * as ForumThread from "./forum-thread.js";
9
13
  export * as Client from "./client.js";
10
14
  export * as Comment from "./comment.js";
15
+ export * as ExternalIdentities from "./external-identities.js";
11
16
  export * as FileMetadata from "./file-metadata.js";
12
17
  export * as Geohash from "./geohash.js";
13
18
  export * as GiftWrap from "./gift-wrap.js";
14
19
  export * as GitGraspList from "./git-grasp-list.js";
20
+ export * as GitIssue from "./git-issue.js";
21
+ export * as GitThread from "./git-thread.js";
22
+ export * as GitPatch from "./git-patch.js";
23
+ export * as GitPullRequest from "./git-pull-request.js";
15
24
  export * as GitRepository from "./git-repository.js";
25
+ export * as GitStatus from "./git-status.js";
16
26
  export * as Group from "./group.js";
17
27
  export * as Hashtags from "./hashtags.js";
18
28
  export * as Highlight from "./highlight.js";
@@ -20,7 +30,9 @@ export * as LegacyMessage from "./legacy-message.js";
20
30
  export * as List from "./list.js";
21
31
  export * as LiveStream from "./live-stream.js";
22
32
  export * as MediaAttachment from "./media-attachment.js";
33
+ export * as Napplet from "./napplet.js";
23
34
  export * as Note from "./note.js";
35
+ export * as NostrWebToken from "./nostr-web-token.js";
24
36
  export * as PicturePost from "./picture-post.js";
25
37
  export * as Poll from "./poll.js";
26
38
  export * as PollResponse from "./poll-response.js";
@@ -29,9 +41,13 @@ export * as ProfileBadges from "./profile-badges.js";
29
41
  export * as Stream from "./stream.js";
30
42
  export * as StreamChat from "./stream-chat.js";
31
43
  export * as Torrent from "./torrent.js";
44
+ export * as TrustedProviders from "./trusted-providers.js";
45
+ export * as UserStatus from "./user-status.js";
32
46
  export * as WrappedMessage from "./wrapped-message.js";
33
47
  export * as Zap from "./zap.js";
34
48
  export * as ZapGoal from "./zap-goal.js";
35
49
  export * as ZapRequest from "./zap-request.js";
36
50
  export * as ZapSplit from "./zap-split.js";
37
51
  export * as TagOperations from "./tag/index.js";
52
+ export * from "./nsite.js";
53
+ export * from "./report.js";