applesauce-common 6.2.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 (224) 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 +2 -0
  41. package/dist/casts/trusted-assertions.js +19 -18
  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 +22 -0
  75. package/dist/factories/index.js +22 -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/nsite-snapshot.d.ts +18 -0
  95. package/dist/factories/nsite-snapshot.js +29 -0
  96. package/dist/factories/reaction.d.ts +3 -2
  97. package/dist/factories/report.d.ts +48 -0
  98. package/dist/factories/report.js +66 -0
  99. package/dist/factories/root-napplet.d.ts +18 -0
  100. package/dist/factories/root-napplet.js +24 -0
  101. package/dist/factories/root-nsite.d.ts +23 -0
  102. package/dist/factories/root-nsite.js +44 -0
  103. package/dist/factories/torrent.d.ts +24 -10
  104. package/dist/factories/torrent.js +48 -44
  105. package/dist/factories/trusted-provider-list.d.ts +23 -0
  106. package/dist/factories/trusted-provider-list.js +39 -0
  107. package/dist/factories/user-status.d.ts +26 -0
  108. package/dist/factories/user-status.js +52 -0
  109. package/dist/helpers/app-data.js +15 -7
  110. package/dist/helpers/app-handler.d.ts +43 -6
  111. package/dist/helpers/app-handler.js +53 -3
  112. package/dist/helpers/app-recommendation.d.ts +24 -0
  113. package/dist/helpers/app-recommendation.js +30 -0
  114. package/dist/helpers/bookmark.js +5 -2
  115. package/dist/helpers/comment.d.ts +11 -5
  116. package/dist/helpers/comment.js +7 -1
  117. package/dist/helpers/content.d.ts +3 -1
  118. package/dist/helpers/emoji-pack.js +11 -6
  119. package/dist/helpers/emoji.d.ts +2 -2
  120. package/dist/helpers/encrypted-content-cache.js +18 -1
  121. package/dist/helpers/external-id.js +13 -19
  122. package/dist/helpers/external-identities.d.ts +29 -0
  123. package/dist/helpers/external-identities.js +52 -0
  124. package/dist/helpers/file-metadata.js +5 -6
  125. package/dist/helpers/forum-thread.d.ts +10 -0
  126. package/dist/helpers/forum-thread.js +10 -0
  127. package/dist/helpers/gift-wrap.d.ts +40 -15
  128. package/dist/helpers/gift-wrap.js +110 -33
  129. package/dist/helpers/git-issue.d.ts +13 -0
  130. package/dist/helpers/git-issue.js +19 -0
  131. package/dist/helpers/git-patch.d.ts +41 -0
  132. package/dist/helpers/git-patch.js +73 -0
  133. package/dist/helpers/git-pull-request.d.ts +57 -0
  134. package/dist/helpers/git-pull-request.js +111 -0
  135. package/dist/helpers/git-repository.d.ts +4 -0
  136. package/dist/helpers/git-repository.js +16 -0
  137. package/dist/helpers/git-status.d.ts +44 -0
  138. package/dist/helpers/git-status.js +93 -0
  139. package/dist/helpers/git.d.ts +2 -0
  140. package/dist/helpers/git.js +4 -0
  141. package/dist/helpers/groups.d.ts +5 -2
  142. package/dist/helpers/groups.js +40 -18
  143. package/dist/helpers/hashtag.d.ts +4 -2
  144. package/dist/helpers/index.d.ts +10 -0
  145. package/dist/helpers/index.js +10 -0
  146. package/dist/helpers/lists.js +14 -2
  147. package/dist/helpers/lnurl.js +1 -1
  148. package/dist/helpers/mute.js +18 -7
  149. package/dist/helpers/napplet.d.ts +89 -0
  150. package/dist/helpers/napplet.js +144 -0
  151. package/dist/helpers/nsite.d.ts +90 -0
  152. package/dist/helpers/nsite.js +217 -0
  153. package/dist/helpers/relay-discovery.d.ts +4 -0
  154. package/dist/helpers/relay-discovery.js +8 -0
  155. package/dist/helpers/reports.d.ts +35 -0
  156. package/dist/helpers/reports.js +36 -5
  157. package/dist/helpers/threading.d.ts +4 -2
  158. package/dist/helpers/torrent.d.ts +9 -6
  159. package/dist/helpers/torrent.js +23 -15
  160. package/dist/helpers/trusted-assertions.d.ts +7 -0
  161. package/dist/helpers/trusted-assertions.js +41 -2
  162. package/dist/helpers/user-status.d.ts +13 -1
  163. package/dist/helpers/user-status.js +15 -0
  164. package/dist/models/app-handler.d.ts +21 -0
  165. package/dist/models/app-handler.js +47 -0
  166. package/dist/models/git.d.ts +34 -0
  167. package/dist/models/git.js +144 -0
  168. package/dist/models/index.d.ts +3 -0
  169. package/dist/models/index.js +3 -0
  170. package/dist/models/nsite.d.ts +22 -0
  171. package/dist/models/nsite.js +67 -0
  172. package/dist/models/thread.d.ts +4 -1
  173. package/dist/models/thread.js +34 -5
  174. package/dist/models/user-status.d.ts +8 -4
  175. package/dist/models/user-status.js +16 -22
  176. package/dist/observable/filter-timeline-by-mutes.d.ts +1 -1
  177. package/dist/observable/filter-timeline-by-mutes.js +5 -1
  178. package/dist/operations/app-handler.d.ts +24 -0
  179. package/dist/operations/app-handler.js +58 -0
  180. package/dist/operations/app-recommendation.d.ts +13 -0
  181. package/dist/operations/app-recommendation.js +40 -0
  182. package/dist/operations/calendar-event.js +3 -2
  183. package/dist/operations/chat-message.d.ts +9 -0
  184. package/dist/operations/chat-message.js +12 -0
  185. package/dist/operations/client.d.ts +1 -4
  186. package/dist/operations/client.js +1 -23
  187. package/dist/operations/comment.d.ts +9 -3
  188. package/dist/operations/comment.js +12 -9
  189. package/dist/operations/external-identities.d.ts +8 -0
  190. package/dist/operations/external-identities.js +23 -0
  191. package/dist/operations/forum-thread.d.ts +3 -0
  192. package/dist/operations/forum-thread.js +6 -0
  193. package/dist/operations/gift-wrap.js +38 -14
  194. package/dist/operations/git-issue.d.ts +18 -0
  195. package/dist/operations/git-issue.js +31 -0
  196. package/dist/operations/git-patch.d.ts +30 -0
  197. package/dist/operations/git-patch.js +75 -0
  198. package/dist/operations/git-pull-request.d.ts +29 -0
  199. package/dist/operations/git-pull-request.js +74 -0
  200. package/dist/operations/git-repository.js +4 -4
  201. package/dist/operations/git-status.d.ts +28 -0
  202. package/dist/operations/git-status.js +116 -0
  203. package/dist/operations/git-thread.d.ts +13 -0
  204. package/dist/operations/git-thread.js +39 -0
  205. package/dist/operations/index.d.ts +15 -0
  206. package/dist/operations/index.js +15 -0
  207. package/dist/operations/internal/git-commits.d.ts +2 -0
  208. package/dist/operations/internal/git-commits.js +16 -0
  209. package/dist/operations/napplet.d.ts +51 -0
  210. package/dist/operations/napplet.js +121 -0
  211. package/dist/operations/nsite.d.ts +51 -0
  212. package/dist/operations/nsite.js +112 -0
  213. package/dist/operations/reaction.d.ts +12 -2
  214. package/dist/operations/reaction.js +1 -1
  215. package/dist/operations/report.d.ts +33 -0
  216. package/dist/operations/report.js +60 -0
  217. package/dist/operations/stream.js +5 -4
  218. package/dist/operations/torrent.d.ts +1 -4
  219. package/dist/operations/torrent.js +24 -11
  220. package/dist/operations/trusted-providers.d.ts +14 -0
  221. package/dist/operations/trusted-providers.js +33 -0
  222. package/dist/operations/user-status.d.ts +11 -0
  223. package/dist/operations/user-status.js +29 -0
  224. package/package.json +9 -9
@@ -0,0 +1,41 @@
1
+ import { KnownEvent, NostrEvent } from "applesauce-core/helpers/event";
2
+ import { EventPointer } from "applesauce-core/helpers/pointers";
3
+ /** The NIP-34 patch event kind */
4
+ export declare const GIT_PATCH_KIND = 1617;
5
+ /** A validated NIP-34 patch event */
6
+ export type GitPatchEvent = KnownEvent<typeof GIT_PATCH_KIND>;
7
+ /** The cache key for patch subjects */
8
+ export declare const GitPatchSubjectSymbol: unique symbol;
9
+ /** The cache key for patch labels */
10
+ export declare const GitPatchLabelsSymbol: unique symbol;
11
+ /** Checks if an event is a valid NIP-34 patch that references a repository */
12
+ export declare function isValidGitPatch(event?: NostrEvent): event is GitPatchEvent;
13
+ /** Checks if a patch is the first patch in a series or revision */
14
+ export declare function isGitPatchRoot(event: NostrEvent): boolean;
15
+ /** Checks if a patch is the first patch of a revision to an earlier patch series */
16
+ export declare function isGitPatchRootRevision(event: NostrEvent): boolean;
17
+ /** Returns the patch subject from the `Subject:` header of the `git format-patch` content */
18
+ export declare function getGitPatchSubject(event: NostrEvent): string | undefined;
19
+ /** Returns the patch labels from the `t` tags, excluding the `root` and `root-revision` markers */
20
+ export declare function getGitPatchLabels(event: NostrEvent): string[];
21
+ /** Returns the commit id of the patch from the `commit` tag */
22
+ export declare function getGitPatchCommit(event: NostrEvent): string | undefined;
23
+ /** Returns the parent commit id of the patch from the `parent-commit` tag */
24
+ export declare function getGitPatchParentCommit(event: NostrEvent): string | undefined;
25
+ /** Returns the previous patch, or the original root for the first patch of a revision */
26
+ export declare function getGitPatchPreviousPointer(event: NostrEvent): EventPointer | undefined;
27
+ /** Returns the commit signature, including an empty string for unsigned commits */
28
+ export declare function getGitPatchCommitSignature(event: NostrEvent): string | undefined;
29
+ /** The committer metadata needed to reproduce a patch commit */
30
+ export interface GitPatchCommitter {
31
+ /** The committer name */
32
+ name: string;
33
+ /** The committer email */
34
+ email: string;
35
+ /** The commit timestamp in seconds */
36
+ timestamp: number;
37
+ /** The timezone offset in minutes */
38
+ timezoneOffset: number;
39
+ }
40
+ /** Returns the committer metadata when its timestamp and timezone are valid */
41
+ export declare function getGitPatchCommitter(event: NostrEvent): GitPatchCommitter | undefined;
@@ -0,0 +1,73 @@
1
+ import { getOrComputeCachedValue } from "applesauce-core/helpers/cache";
2
+ import { getTagValue } from "applesauce-core/helpers/event";
3
+ import { getEventPointerFromETag } from "applesauce-core/helpers/pointers";
4
+ import { isHexKey } from "applesauce-core/helpers/string";
5
+ import { getGitRepositoryReference } from "./git-repository.js";
6
+ /** The NIP-34 patch event kind */
7
+ export const GIT_PATCH_KIND = 1617;
8
+ /** The cache key for patch subjects */
9
+ export const GitPatchSubjectSymbol = Symbol.for("git-patch-subject");
10
+ /** The cache key for patch labels */
11
+ export const GitPatchLabelsSymbol = Symbol.for("git-patch-labels");
12
+ /** Checks if an event is a valid NIP-34 patch that references a repository */
13
+ export function isValidGitPatch(event) {
14
+ return !!event && event.kind === GIT_PATCH_KIND && !!getGitRepositoryReference(event);
15
+ }
16
+ /** Checks if a patch is the first patch in a series or revision */
17
+ export function isGitPatchRoot(event) {
18
+ return event.tags.some((t) => t[0] === "t" && (t[1] === "root" || t[1] === "root-revision"));
19
+ }
20
+ /** Checks if a patch is the first patch of a revision to an earlier patch series */
21
+ export function isGitPatchRootRevision(event) {
22
+ return event.tags.some((t) => t[0] === "t" && t[1] === "root-revision");
23
+ }
24
+ /** Returns the patch subject from the `Subject:` header of the `git format-patch` content */
25
+ export function getGitPatchSubject(event) {
26
+ return getOrComputeCachedValue(event, GitPatchSubjectSymbol, () => {
27
+ // Subject headers can be folded onto multiple lines that start with whitespace
28
+ const match = event.content.match(/^Subject:[ \t]*((?:.*)(?:\r?\n[ \t]+.*)*)/m);
29
+ if (!match)
30
+ return undefined;
31
+ const subject = match[1]
32
+ .replace(/\r?\n[ \t]+/g, " ")
33
+ .replace(/^\[[^\]]*\]\s*/, "")
34
+ .trim();
35
+ return subject || undefined;
36
+ });
37
+ }
38
+ /** Returns the patch labels from the `t` tags, excluding the `root` and `root-revision` markers */
39
+ export function getGitPatchLabels(event) {
40
+ return getOrComputeCachedValue(event, GitPatchLabelsSymbol, () => event.tags.filter((t) => t[0] === "t" && t[1] && t[1] !== "root" && t[1] !== "root-revision").map((t) => t[1]));
41
+ }
42
+ /** Returns the commit id of the patch from the `commit` tag */
43
+ export function getGitPatchCommit(event) {
44
+ return getTagValue(event, "commit") || undefined;
45
+ }
46
+ /** Returns the parent commit id of the patch from the `parent-commit` tag */
47
+ export function getGitPatchParentCommit(event) {
48
+ return getTagValue(event, "parent-commit") || undefined;
49
+ }
50
+ /** Returns the previous patch, or the original root for the first patch of a revision */
51
+ export function getGitPatchPreviousPointer(event) {
52
+ const tag = event.tags.find((t) => t[0] === "e" && t[3] === "reply");
53
+ const pointer = tag && getEventPointerFromETag(tag);
54
+ if (!tag || !pointer)
55
+ return undefined;
56
+ if (tag[4] && isHexKey(tag[4]))
57
+ pointer.author = tag[4];
58
+ return pointer;
59
+ }
60
+ /** Returns the commit signature, including an empty string for unsigned commits */
61
+ export function getGitPatchCommitSignature(event) {
62
+ return getTagValue(event, "commit-pgp-sig");
63
+ }
64
+ /** Returns the committer metadata when its timestamp and timezone are valid */
65
+ export function getGitPatchCommitter(event) {
66
+ const tag = event.tags.find((t) => t[0] === "committer");
67
+ if (!tag || tag.length < 5 || !tag[3] || !tag[4])
68
+ return undefined;
69
+ const timestamp = Number(tag[3]), timezoneOffset = Number(tag[4]);
70
+ return Number.isSafeInteger(timestamp) && timestamp >= 0 && Number.isInteger(timezoneOffset)
71
+ ? { name: tag[1], email: tag[2], timestamp, timezoneOffset }
72
+ : undefined;
73
+ }
@@ -0,0 +1,57 @@
1
+ import { KnownEvent, NostrEvent } from "applesauce-core/helpers/event";
2
+ import { EventPointer } from "applesauce-core/helpers/pointers";
3
+ /** The NIP-34 pull request event kind */
4
+ export declare const GIT_PULL_REQUEST_KIND = 1618;
5
+ /** The NIP-34 pull request update event kind */
6
+ export declare const GIT_PULL_REQUEST_UPDATE_KIND = 1619;
7
+ /** A validated NIP-34 pull request event */
8
+ export type GitPullRequestEvent = KnownEvent<typeof GIT_PULL_REQUEST_KIND>;
9
+ /** A validated NIP-34 pull request update event */
10
+ export type GitPullRequestUpdateEvent = KnownEvent<typeof GIT_PULL_REQUEST_UPDATE_KIND>;
11
+ /** The cache key for pull request labels */
12
+ export declare const GitPullRequestLabelsSymbol: unique symbol;
13
+ /** The cache key for pull request clone URLs */
14
+ export declare const GitPullRequestCloneUrlsSymbol: unique symbol;
15
+ /** Checks if an event is a valid NIP-34 pull request that references a repository */
16
+ export declare function isValidGitPullRequest(event?: NostrEvent): event is GitPullRequestEvent;
17
+ /** Returns the pull request subject from the `subject` tag */
18
+ export declare function getGitPullRequestSubject(event: NostrEvent): string | undefined;
19
+ /** Returns the pull request labels from the `t` tags */
20
+ export declare function getGitPullRequestLabels(event: NostrEvent): string[];
21
+ /** Returns the commit id of the pull request branch tip from the `c` tag */
22
+ export declare function getGitPullRequestTipCommit(event: NostrEvent): string | undefined;
23
+ /** Returns the clone URLs where the pull request commits can be fetched */
24
+ export declare function getGitPullRequestCloneUrls(event: NostrEvent): string[];
25
+ /** Returns the recommended branch name from the `branch-name` tag */
26
+ export declare function getGitPullRequestBranchName(event: NostrEvent): string | undefined;
27
+ /** Returns the most recent common ancestor with the target branch from the `merge-base` tag */
28
+ export declare function getGitPullRequestMergeBase(event: NostrEvent): string | undefined;
29
+ /** Checks if an event is a valid NIP-34 pull request update that points to a pull request */
30
+ export declare function isValidGitPullRequestUpdate(event?: NostrEvent): event is GitPullRequestUpdateEvent;
31
+ /** Returns the id of the pull request an update targets from the `E` tag */
32
+ export declare function getGitPullRequestUpdateTarget(event: NostrEvent): string | undefined;
33
+ /** Returns the author of the pull request targeted by an update */
34
+ export declare function getGitPullRequestUpdateAuthor(event: NostrEvent): string | undefined;
35
+ /** Returns the original patch a pull request revises */
36
+ export declare function getGitPullRequestPatchId(event: NostrEvent): string | undefined;
37
+ /** The fetch state of a pull request or its latest valid update */
38
+ export interface GitPullRequestState {
39
+ /** The event supplying this state */
40
+ event: GitPullRequestEvent | GitPullRequestUpdateEvent;
41
+ /** The proposed branch tip commit */
42
+ tipCommit: string;
43
+ /** The clone URLs containing the proposed commit */
44
+ cloneUrls: string[];
45
+ /** The common ancestor with the target branch, when declared */
46
+ mergeBase?: string;
47
+ }
48
+ /** Returns a coherent fetch state from a validated pull request or update */
49
+ export declare function getGitPullRequestState(event: GitPullRequestEvent | GitPullRequestUpdateEvent): GitPullRequestState;
50
+ /** Returns the updated branch tip commit id from the `c` tag */
51
+ export declare function getGitPullRequestUpdateTipCommit(event: NostrEvent): string | undefined;
52
+ /** Returns the updated clone URLs of a pull request update */
53
+ export declare function getGitPullRequestUpdateCloneUrls(event: NostrEvent): string[];
54
+ /** Returns the target pull request pointer with its relay and author hints */
55
+ export declare function getGitPullRequestUpdatePointer(event: NostrEvent): EventPointer | undefined;
56
+ /** Returns the original patch pointer with its relay hint */
57
+ export declare function getGitPullRequestPatchPointer(event: NostrEvent): EventPointer | undefined;
@@ -0,0 +1,111 @@
1
+ import { getOrComputeCachedValue } from "applesauce-core/helpers/cache";
2
+ import { getTagValue } from "applesauce-core/helpers/event";
3
+ import { isHexKey } from "applesauce-core/helpers/string";
4
+ import { getEventPointerFromETag } from "applesauce-core/helpers/pointers";
5
+ import { isGitCommitId } from "./git.js";
6
+ import { getGitRepositoryReference } from "./git-repository.js";
7
+ /** The NIP-34 pull request event kind */
8
+ export const GIT_PULL_REQUEST_KIND = 1618;
9
+ /** The NIP-34 pull request update event kind */
10
+ export const GIT_PULL_REQUEST_UPDATE_KIND = 1619;
11
+ /** The cache key for pull request labels */
12
+ export const GitPullRequestLabelsSymbol = Symbol.for("git-pull-request-labels");
13
+ /** The cache key for pull request clone URLs */
14
+ export const GitPullRequestCloneUrlsSymbol = Symbol.for("git-pull-request-clone-urls");
15
+ function getCloneUrls(event) {
16
+ return getOrComputeCachedValue(event, GitPullRequestCloneUrlsSymbol, () => event.tags
17
+ .filter((t) => t[0] === "clone")
18
+ .flatMap((t) => t.slice(1))
19
+ .filter((url) => !!url.trim()));
20
+ }
21
+ /** Checks if an event is a valid NIP-34 pull request that references a repository */
22
+ export function isValidGitPullRequest(event) {
23
+ return (!!event &&
24
+ event.kind === GIT_PULL_REQUEST_KIND &&
25
+ !!getGitRepositoryReference(event) &&
26
+ isGitCommitId(getGitPullRequestTipCommit(event)) &&
27
+ getCloneUrls(event).length > 0 &&
28
+ (!getTagValue(event, "merge-base") || isGitCommitId(getTagValue(event, "merge-base"))));
29
+ }
30
+ /** Returns the pull request subject from the `subject` tag */
31
+ export function getGitPullRequestSubject(event) {
32
+ return getTagValue(event, "subject") || undefined;
33
+ }
34
+ /** Returns the pull request labels from the `t` tags */
35
+ export function getGitPullRequestLabels(event) {
36
+ return getOrComputeCachedValue(event, GitPullRequestLabelsSymbol, () => event.tags.filter((t) => t[0] === "t" && t[1]).map((t) => t[1]));
37
+ }
38
+ /** Returns the commit id of the pull request branch tip from the `c` tag */
39
+ export function getGitPullRequestTipCommit(event) {
40
+ return getTagValue(event, "c") || undefined;
41
+ }
42
+ /** Returns the clone URLs where the pull request commits can be fetched */
43
+ export function getGitPullRequestCloneUrls(event) {
44
+ return getCloneUrls(event);
45
+ }
46
+ /** Returns the recommended branch name from the `branch-name` tag */
47
+ export function getGitPullRequestBranchName(event) {
48
+ return getTagValue(event, "branch-name") || undefined;
49
+ }
50
+ /** Returns the most recent common ancestor with the target branch from the `merge-base` tag */
51
+ export function getGitPullRequestMergeBase(event) {
52
+ return getTagValue(event, "merge-base") || undefined;
53
+ }
54
+ /** Checks if an event is a valid NIP-34 pull request update that points to a pull request */
55
+ export function isValidGitPullRequestUpdate(event) {
56
+ return (!!event &&
57
+ event.kind === GIT_PULL_REQUEST_UPDATE_KIND &&
58
+ !!getGitPullRequestUpdateTarget(event) &&
59
+ !!getGitPullRequestUpdateAuthor(event) &&
60
+ isGitCommitId(getGitPullRequestUpdateTipCommit(event)) &&
61
+ getCloneUrls(event).length > 0 &&
62
+ (!getTagValue(event, "merge-base") || isGitCommitId(getTagValue(event, "merge-base"))));
63
+ }
64
+ /** Returns the id of the pull request an update targets from the `E` tag */
65
+ export function getGitPullRequestUpdateTarget(event) {
66
+ const id = getTagValue(event, "E");
67
+ return id && isHexKey(id) ? id : undefined;
68
+ }
69
+ /** Returns the author of the pull request targeted by an update */
70
+ export function getGitPullRequestUpdateAuthor(event) {
71
+ const pubkey = getTagValue(event, "P");
72
+ return pubkey && isHexKey(pubkey) ? pubkey : undefined;
73
+ }
74
+ /** Returns the original patch a pull request revises */
75
+ export function getGitPullRequestPatchId(event) {
76
+ const id = getTagValue(event, "e");
77
+ return id && isHexKey(id) ? id : undefined;
78
+ }
79
+ /** Returns a coherent fetch state from a validated pull request or update */
80
+ export function getGitPullRequestState(event) {
81
+ return {
82
+ event,
83
+ tipCommit: getTagValue(event, "c"),
84
+ cloneUrls: getCloneUrls(event),
85
+ mergeBase: getGitPullRequestMergeBase(event),
86
+ };
87
+ }
88
+ /** Returns the updated branch tip commit id from the `c` tag */
89
+ export function getGitPullRequestUpdateTipCommit(event) {
90
+ return getTagValue(event, "c") || undefined;
91
+ }
92
+ /** Returns the updated clone URLs of a pull request update */
93
+ export function getGitPullRequestUpdateCloneUrls(event) {
94
+ return getCloneUrls(event);
95
+ }
96
+ /** Returns the target pull request pointer with its relay and author hints */
97
+ export function getGitPullRequestUpdatePointer(event) {
98
+ const tag = event.tags.find((t) => t[0] === "E");
99
+ const pointer = tag && getEventPointerFromETag(tag);
100
+ if (!pointer)
101
+ return undefined;
102
+ const author = getGitPullRequestUpdateAuthor(event);
103
+ if (author)
104
+ pointer.author = author;
105
+ return pointer;
106
+ }
107
+ /** Returns the original patch pointer with its relay hint */
108
+ export function getGitPullRequestPatchPointer(event) {
109
+ const tag = event.tags.find((t) => t[0] === "e");
110
+ return (tag && getEventPointerFromETag(tag)) || undefined;
111
+ }
@@ -11,6 +11,8 @@ export declare const GitRepositoryRelaysSymbol: unique symbol;
11
11
  export declare const GitRepositoryMaintainersSymbol: unique symbol;
12
12
  export declare const GitRepositoryHashtagsSymbol: unique symbol;
13
13
  export declare const GitRepositoryUpstreamSymbol: unique symbol;
14
+ /** The cache key for repository references on thread events */
15
+ export declare const GitRepositoryReferenceSymbol: unique symbol;
14
16
  /** Checks if an event is a valid NIP-34 repository announcement. */
15
17
  export declare function isValidGitRepository(event?: NostrEvent): event is GitRepositoryEvent;
16
18
  /** Returns the repository identifier from the `d` tag. */
@@ -32,6 +34,8 @@ export declare function getGitRepositoryEarliestUniqueCommit(event?: NostrEvent)
32
34
  export declare function getGitRepositoryMaintainers(event?: NostrEvent): string[];
33
35
  /** Returns repository topic tags (NIP-34: values from each `["t", ...]` tag). */
34
36
  export declare function getGitRepositoryHashtags(event?: NostrEvent): string[];
37
+ /** Returns the repository pointer from the `a` tag of a NIP-34 issue, patch, pull request or status event */
38
+ export declare function getGitRepositoryReference(event: NostrEvent): GitRepositoryPointer | undefined;
35
39
  /**
36
40
  * Returns the upstream repository pointer (the repo this one was forked from), if declared.
37
41
  * Parsed from the `["u", "30617:<pubkey>:<identifier>", "<relay hint>"]` tag.
@@ -1,6 +1,7 @@
1
1
  import { isHexKey, relaySet } from "applesauce-core/helpers";
2
2
  import { getOrComputeCachedValue } from "applesauce-core/helpers/cache";
3
3
  import { getReplaceableIdentifier, getTagValue } from "applesauce-core/helpers/event";
4
+ import { getAddressPointerFromATag } from "applesauce-core/helpers/pointers";
4
5
  import { isSafeRelayURL } from "applesauce-core/helpers/relays";
5
6
  import { normalizeURL } from "applesauce-core/helpers/url";
6
7
  export const GIT_REPOSITORY_KIND = 30617;
@@ -10,6 +11,8 @@ export const GitRepositoryRelaysSymbol = Symbol.for("git-repository-relays");
10
11
  export const GitRepositoryMaintainersSymbol = Symbol.for("git-repository-maintainers");
11
12
  export const GitRepositoryHashtagsSymbol = Symbol.for("git-repository-hashtags");
12
13
  export const GitRepositoryUpstreamSymbol = Symbol.for("git-repository-upstream");
14
+ /** The cache key for repository references on thread events */
15
+ export const GitRepositoryReferenceSymbol = Symbol.for("git-repository-reference");
13
16
  function getTagValues(event, name) {
14
17
  return event.tags.filter((tag) => tag[0] === name && tag[1]).flatMap((tag) => tag.slice(1));
15
18
  }
@@ -73,6 +76,19 @@ export function getGitRepositoryHashtags(event) {
73
76
  return [];
74
77
  return getOrComputeCachedValue(event, GitRepositoryHashtagsSymbol, () => getTagValues(event, "t"));
75
78
  }
79
+ /** Returns the repository pointer from the `a` tag of a NIP-34 issue, patch, pull request or status event */
80
+ export function getGitRepositoryReference(event) {
81
+ return getOrComputeCachedValue(event, GitRepositoryReferenceSymbol, () => {
82
+ for (const tag of event.tags) {
83
+ if (tag[0] !== "a")
84
+ continue;
85
+ const pointer = getAddressPointerFromATag(tag);
86
+ if (pointer?.kind === GIT_REPOSITORY_KIND && pointer.identifier)
87
+ return pointer;
88
+ }
89
+ return undefined;
90
+ });
91
+ }
76
92
  /**
77
93
  * Returns the upstream repository pointer (the repo this one was forked from), if declared.
78
94
  * Parsed from the `["u", "30617:<pubkey>:<identifier>", "<relay hint>"]` tag.
@@ -0,0 +1,44 @@
1
+ import { KnownEvent, NostrEvent } from "applesauce-core/helpers/event";
2
+ /** The NIP-34 open status event kind */
3
+ export declare const GIT_STATUS_OPEN_KIND = 1630;
4
+ /** The NIP-34 applied status event kind */
5
+ export declare const GIT_STATUS_APPLIED_KIND = 1631;
6
+ /** The NIP-34 closed status event kind */
7
+ export declare const GIT_STATUS_CLOSED_KIND = 1632;
8
+ /** The NIP-34 draft status event kind */
9
+ export declare const GIT_STATUS_DRAFT_KIND = 1633;
10
+ /** All NIP-34 status event kinds */
11
+ export declare const GIT_STATUS_KINDS: number[];
12
+ /** The status of a NIP-34 issue, patch or pull request. "applied" means merged for patches and resolved for issues */
13
+ export type GitStatus = "open" | "applied" | "closed" | "draft";
14
+ /** The event kinds used for NIP-34 statuses */
15
+ export type GitStatusKind = typeof GIT_STATUS_OPEN_KIND | typeof GIT_STATUS_APPLIED_KIND | typeof GIT_STATUS_CLOSED_KIND | typeof GIT_STATUS_DRAFT_KIND;
16
+ /** A validated NIP-34 status event */
17
+ export type GitStatusEvent = KnownEvent<GitStatusKind>;
18
+ /** Map of status types to event kinds */
19
+ export declare const GIT_STATUS_KIND_MAP: Record<GitStatus, GitStatusKind>;
20
+ /** Checks if an event is a valid NIP-34 status event with a root `e` tag */
21
+ export declare function isValidGitStatus(event?: NostrEvent): event is GitStatusEvent;
22
+ /** Returns the status type of a status event */
23
+ export declare function getGitStatusType(event: GitStatusEvent): GitStatus;
24
+ export declare function getGitStatusType(event: NostrEvent): GitStatus | undefined;
25
+ /** Returns the id of the issue, pull request or root patch a status event applies to */
26
+ export declare function getGitStatusRootId(event: NostrEvent): string | undefined;
27
+ /** Returns the ids of the patches applied or merged by a status event from the `q` tags */
28
+ export declare function getGitStatusAppliedPatchIds(event: NostrEvent): string[];
29
+ /** Returns the merge commit id from the `merge-commit` tag */
30
+ export declare function getGitStatusMergeCommit(event: NostrEvent): string | undefined;
31
+ /**
32
+ * Returns the latest status event from the root author or a maintainer
33
+ * @param maintainers Pubkeys allowed to set the status in addition to the root author
34
+ */
35
+ export declare function getGitCurrentStatusEvent(root: NostrEvent, statuses: NostrEvent[], maintainers?: string[]): GitStatusEvent | undefined;
36
+ /**
37
+ * Returns the current status of an issue, patch or pull request, defaulting to "open"
38
+ * @param maintainers Pubkeys allowed to set the status in addition to the root author
39
+ */
40
+ export declare function getGitCurrentStatus(root: NostrEvent, statuses: NostrEvent[], maintainers?: string[]): GitStatus;
41
+ /** Returns the accepted revision root id from the marked reply tag */
42
+ export declare function getGitStatusAcceptedRevisionId(event: NostrEvent): string | undefined;
43
+ /** Returns the commits produced by applying the patches */
44
+ export declare function getGitStatusAppliedCommits(event: NostrEvent): string[];
@@ -0,0 +1,93 @@
1
+ import { isHexKey } from "applesauce-core/helpers/string";
2
+ import { isGitCommitId } from "./git.js";
3
+ /** The NIP-34 open status event kind */
4
+ export const GIT_STATUS_OPEN_KIND = 1630;
5
+ /** The NIP-34 applied status event kind */
6
+ export const GIT_STATUS_APPLIED_KIND = 1631;
7
+ /** The NIP-34 closed status event kind */
8
+ export const GIT_STATUS_CLOSED_KIND = 1632;
9
+ /** The NIP-34 draft status event kind */
10
+ export const GIT_STATUS_DRAFT_KIND = 1633;
11
+ /** All NIP-34 status event kinds */
12
+ export const GIT_STATUS_KINDS = [
13
+ GIT_STATUS_OPEN_KIND,
14
+ GIT_STATUS_APPLIED_KIND,
15
+ GIT_STATUS_CLOSED_KIND,
16
+ GIT_STATUS_DRAFT_KIND,
17
+ ];
18
+ /** Map of status types to event kinds */
19
+ export const GIT_STATUS_KIND_MAP = {
20
+ open: GIT_STATUS_OPEN_KIND,
21
+ applied: GIT_STATUS_APPLIED_KIND,
22
+ closed: GIT_STATUS_CLOSED_KIND,
23
+ draft: GIT_STATUS_DRAFT_KIND,
24
+ };
25
+ /** Checks if an event is a valid NIP-34 status event with a root `e` tag */
26
+ export function isValidGitStatus(event) {
27
+ return !!event && GIT_STATUS_KINDS.includes(event.kind) && !!getGitStatusRootId(event);
28
+ }
29
+ export function getGitStatusType(event) {
30
+ switch (event.kind) {
31
+ case GIT_STATUS_OPEN_KIND:
32
+ return "open";
33
+ case GIT_STATUS_APPLIED_KIND:
34
+ return "applied";
35
+ case GIT_STATUS_CLOSED_KIND:
36
+ return "closed";
37
+ case GIT_STATUS_DRAFT_KIND:
38
+ return "draft";
39
+ default:
40
+ return undefined;
41
+ }
42
+ }
43
+ /** Returns the id of the issue, pull request or root patch a status event applies to */
44
+ export function getGitStatusRootId(event) {
45
+ const tag = event.tags.find((t) => t[0] === "e" && t[3] === "root") ?? event.tags.find((t) => t[0] === "e" && !t[3]);
46
+ return tag?.[1] && isHexKey(tag[1]) ? tag[1] : undefined;
47
+ }
48
+ /** Returns the ids of the patches applied or merged by a status event from the `q` tags */
49
+ export function getGitStatusAppliedPatchIds(event) {
50
+ return event.tags.filter((t) => t[0] === "q" && t[1] && isHexKey(t[1])).map((t) => t[1]);
51
+ }
52
+ /** Returns the merge commit id from the `merge-commit` tag */
53
+ export function getGitStatusMergeCommit(event) {
54
+ return event.tags.find((t) => t[0] === "merge-commit")?.[1] || undefined;
55
+ }
56
+ /**
57
+ * Returns the latest status event from the root author or a maintainer
58
+ * @param maintainers Pubkeys allowed to set the status in addition to the root author
59
+ */
60
+ export function getGitCurrentStatusEvent(root, statuses, maintainers = []) {
61
+ let latest;
62
+ for (const status of statuses) {
63
+ if (!isValidGitStatus(status) || getGitStatusRootId(status) !== root.id)
64
+ continue;
65
+ if (status.pubkey !== root.pubkey && !maintainers.includes(status.pubkey))
66
+ continue;
67
+ if (!latest ||
68
+ status.created_at > latest.created_at ||
69
+ (status.created_at === latest.created_at && status.id < latest.id))
70
+ latest = status;
71
+ }
72
+ return latest;
73
+ }
74
+ /**
75
+ * Returns the current status of an issue, patch or pull request, defaulting to "open"
76
+ * @param maintainers Pubkeys allowed to set the status in addition to the root author
77
+ */
78
+ export function getGitCurrentStatus(root, statuses, maintainers = []) {
79
+ const latest = getGitCurrentStatusEvent(root, statuses, maintainers);
80
+ return latest ? getGitStatusType(latest) : "open";
81
+ }
82
+ /** Returns the accepted revision root id from the marked reply tag */
83
+ export function getGitStatusAcceptedRevisionId(event) {
84
+ const id = event.tags.find((t) => t[0] === "e" && t[3] === "reply")?.[1];
85
+ return id && isHexKey(id) ? id : undefined;
86
+ }
87
+ /** Returns the commits produced by applying the patches */
88
+ export function getGitStatusAppliedCommits(event) {
89
+ return event.tags
90
+ .filter((t) => t[0] === "applied-as-commits")
91
+ .flatMap((t) => t.slice(1))
92
+ .filter(isGitCommitId);
93
+ }
@@ -0,0 +1,2 @@
1
+ /** Checks if a string is a SHA-1 or SHA-256 Git object id */
2
+ export declare function isGitCommitId(value: string | undefined): value is string;
@@ -0,0 +1,4 @@
1
+ /** Checks if a string is a SHA-1 or SHA-256 Git object id */
2
+ export function isGitCommitId(value) {
3
+ return !!value && /^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i.test(value);
4
+ }
@@ -25,9 +25,12 @@ export type GroupPointer = {
25
25
  /** The name of the group */
26
26
  name?: string;
27
27
  };
28
- /** decodes a group identifier into a group pointer object */
28
+ /**
29
+ * Decodes Applesauce's apostrophe-delimited compatibility identifier.
30
+ * NIP-29 references use kind-39000 `naddr` values with relay hints instead.
31
+ */
29
32
  export declare function decodeGroupPointer(str: string): GroupPointer | null;
30
- /** Converts a group pointer into a group identifier */
33
+ /** Converts a group pointer into Applesauce's compatibility identifier. */
31
34
  export declare function encodeGroupPointer(pointer: GroupPointer): string;
32
35
  export declare const GroupsPublicSymbol: unique symbol;
33
36
  export declare const GroupsHiddenSymbol: unique symbol;
@@ -20,22 +20,42 @@ export const DELETE_EVENT_KIND = 9005;
20
20
  export const CREATE_GROUP_KIND = 9007;
21
21
  export const DELETE_GROUP_KIND = 9008;
22
22
  export const CREATE_INVITE_KIND = 9009;
23
- /** decodes a group identifier into a group pointer object */
23
+ /**
24
+ * Decodes Applesauce's apostrophe-delimited compatibility identifier.
25
+ * NIP-29 references use kind-39000 `naddr` values with relay hints instead.
26
+ */
24
27
  export function decodeGroupPointer(str) {
25
- let [relay, id] = str.split("'");
28
+ const separator = str.indexOf("'");
29
+ let relay = separator === -1 ? str : str.slice(0, separator);
30
+ const id = separator === -1 ? "" : str.slice(separator + 1);
26
31
  if (!relay)
27
32
  return null;
28
33
  // Prepend wss:// if missing
29
34
  if (!relay.match(/^wss?:/))
30
35
  relay = `wss://${relay}`;
31
- // Normalize the relay url
32
- relay = normalizeURL(relay);
36
+ try {
37
+ relay = normalizeURL(relay);
38
+ const hash = relay.indexOf("#");
39
+ if (hash !== -1 && hash < relay.length - 1)
40
+ return null;
41
+ }
42
+ catch {
43
+ return null;
44
+ }
33
45
  return { relay, id: id || "_" };
34
46
  }
35
- /** Converts a group pointer into a group identifier */
47
+ /** Converts a group pointer into Applesauce's compatibility identifier. */
36
48
  export function encodeGroupPointer(pointer) {
37
- const hostname = URL.canParse(pointer.relay) ? new URL(pointer.relay).hostname : pointer.relay;
38
- return `${hostname}'${pointer.id}`;
49
+ const normalized = decodeGroupPointer(`${pointer.relay}'_`)?.relay;
50
+ if (!normalized)
51
+ return `${pointer.relay}'${pointer.id}`;
52
+ let relay = normalized;
53
+ if (normalized.startsWith("wss://")) {
54
+ const root = /^wss:\/\/([^/?#]+)\/(?:\?)?(?:#)?$/.exec(normalized);
55
+ // Native URL.host excludes credentials, even on root URLs.
56
+ relay = root ? root[1].slice(root[1].lastIndexOf("@") + 1) : normalized.slice("wss://".length);
57
+ }
58
+ return `${relay}'${pointer.id}`;
39
59
  }
40
60
  export const GroupsPublicSymbol = Symbol.for("groups-public");
41
61
  export const GroupsHiddenSymbol = Symbol.for("groups-hidden");
@@ -60,17 +80,19 @@ export function getPublicGroups(bookmark) {
60
80
  export function getHiddenGroups(bookmark) {
61
81
  if (GroupsHiddenSymbol in bookmark)
62
82
  return bookmark[GroupsHiddenSymbol];
63
- return getOrComputeCachedValue(bookmark, GroupsHiddenSymbol, () => {
64
- //get hidden tags
65
- const tags = getHiddenTags(bookmark);
66
- if (!tags)
67
- return undefined;
68
- // parse groups from hidden tags
69
- const groups = processTags(tags.filter((t) => t[0] === "group"), getGroupPointerFromGroupTag);
70
- // set cached value
71
- Reflect.set(bookmark, GroupsHiddenSymbol, groups);
72
- return groups;
73
- });
83
+ // get hidden tags
84
+ const tags = getHiddenTags(bookmark);
85
+ // D-02/D-03: don't memoize undefined. getOrComputeCachedValue unconditionally caches whatever
86
+ // its compute callback returns, so if we called it while the hidden tags are still locked
87
+ // (tags undefined) it would permanently poison GroupsHiddenSymbol with undefined — satisfying
88
+ // isHiddenGroupsUnlocked's presence check forever, even after the tags are later unlocked by
89
+ // some other path, and letting unlockHiddenGroups's short-circuit hand back that poisoned
90
+ // undefined instead of throwing or returning real groups. Returning here, before ever calling
91
+ // getOrComputeCachedValue, guarantees its callback only ever runs (and only ever caches) when
92
+ // the result is a real, defined GroupPointer[].
93
+ if (!tags)
94
+ return undefined;
95
+ return getOrComputeCachedValue(bookmark, GroupsHiddenSymbol, () => processTags(tags.filter((t) => t[0] === "group"), getGroupPointerFromGroupTag));
74
96
  }
75
97
  /** Checks if the hidden groups are unlocked */
76
98
  export function isHiddenGroupsUnlocked(bookmark) {
@@ -1,3 +1,5 @@
1
- import { EventTemplate, NostrEvent } from "applesauce-core/helpers/event";
1
+ import { NostrEvent } from "applesauce-core/helpers/event";
2
2
  /** Returns a matching ["t", string] tag for a hashtag in an event */
3
- export declare function getHashtagTag(event: NostrEvent | EventTemplate, hashtag: string): ["t", string];
3
+ export declare function getHashtagTag<E extends {
4
+ tags: string[][];
5
+ } = NostrEvent>(event: E, hashtag: string): ["t", string];
@@ -1,5 +1,7 @@
1
1
  export * from "./app-handler.js";
2
+ export * from "./app-recommendation.js";
2
3
  export * from "./article.js";
4
+ export * from "./forum-thread.js";
3
5
  export * from "./badge-award.js";
4
6
  export * from "./badge.js";
5
7
  export * from "./blossom.js";
@@ -14,11 +16,17 @@ export * from "./content.js";
14
16
  export * from "./emoji.js";
15
17
  export * from "./emoji-pack.js";
16
18
  export * from "./encrypted-content-cache.js";
19
+ export * from "./external-identities.js";
17
20
  export * from "./file-metadata.js";
18
21
  export * from "./gift-wrap.js";
19
22
  export * from "./git-grasp-list.js";
23
+ export * from "./git-issue.js";
24
+ export * from "./git.js";
20
25
  export * from "./git-lists.js";
26
+ export * from "./git-patch.js";
27
+ export * from "./git-pull-request.js";
21
28
  export * from "./git-repository.js";
29
+ export * from "./git-status.js";
22
30
  export * from "./groups.js";
23
31
  export * from "./hashtag.js";
24
32
  export * from "./highlight.js";
@@ -27,6 +35,7 @@ export * from "./lists.js";
27
35
  export * from "./lnurl.js";
28
36
  export * from "./messages.js";
29
37
  export * from "./mute.js";
38
+ export * from "./napplet.js";
30
39
  export * from "./nostr-web-token.js";
31
40
  export * from "./picture-post.js";
32
41
  export * from "./poll.js";
@@ -45,3 +54,4 @@ export * from "./user-status.js";
45
54
  export * from "./wrapped-messages.js";
46
55
  export * from "./zap-goal.js";
47
56
  export * from "./zap.js";
57
+ export * from "./nsite.js";