@atproto/pds 0.5.15 → 0.5.16

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 (619) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/dist/account-manager/account-manager.d.ts +13 -13
  3. package/dist/account-manager/account-manager.d.ts.map +1 -1
  4. package/dist/account-manager/account-manager.js +1 -1
  5. package/dist/account-manager/account-manager.js.map +1 -1
  6. package/dist/account-manager/db/index.d.ts +1 -1
  7. package/dist/account-manager/db/index.d.ts.map +1 -1
  8. package/dist/account-manager/db/index.js.map +1 -1
  9. package/dist/account-manager/db/migrations/001-init.d.ts +1 -1
  10. package/dist/account-manager/db/migrations/001-init.d.ts.map +1 -1
  11. package/dist/account-manager/db/migrations/001-init.js.map +1 -1
  12. package/dist/account-manager/db/migrations/002-account-deactivation.d.ts +1 -1
  13. package/dist/account-manager/db/migrations/002-account-deactivation.d.ts.map +1 -1
  14. package/dist/account-manager/db/migrations/002-account-deactivation.js.map +1 -1
  15. package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts +1 -1
  16. package/dist/account-manager/db/migrations/003-privileged-app-passwords.d.ts.map +1 -1
  17. package/dist/account-manager/db/migrations/003-privileged-app-passwords.js.map +1 -1
  18. package/dist/account-manager/db/migrations/004-oauth.d.ts +1 -1
  19. package/dist/account-manager/db/migrations/004-oauth.d.ts.map +1 -1
  20. package/dist/account-manager/db/migrations/004-oauth.js.map +1 -1
  21. package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts +3 -3
  22. package/dist/account-manager/db/migrations/005-oauth-account-management.d.ts.map +1 -1
  23. package/dist/account-manager/db/migrations/005-oauth-account-management.js.map +1 -1
  24. package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts +1 -1
  25. package/dist/account-manager/db/migrations/006-oauth-permission-sets.d.ts.map +1 -1
  26. package/dist/account-manager/db/migrations/006-oauth-permission-sets.js.map +1 -1
  27. package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts +1 -1
  28. package/dist/account-manager/db/migrations/007-lexicon-failures-index.d.ts.map +1 -1
  29. package/dist/account-manager/db/migrations/007-lexicon-failures-index.js.map +1 -1
  30. package/dist/account-manager/db/schema/account-device.d.ts +2 -2
  31. package/dist/account-manager/db/schema/account-device.d.ts.map +1 -1
  32. package/dist/account-manager/db/schema/account-device.js.map +1 -1
  33. package/dist/account-manager/db/schema/account.d.ts +2 -2
  34. package/dist/account-manager/db/schema/account.d.ts.map +1 -1
  35. package/dist/account-manager/db/schema/account.js.map +1 -1
  36. package/dist/account-manager/db/schema/actor.d.ts +2 -2
  37. package/dist/account-manager/db/schema/actor.d.ts.map +1 -1
  38. package/dist/account-manager/db/schema/actor.js.map +1 -1
  39. package/dist/account-manager/db/schema/app-password.d.ts +1 -1
  40. package/dist/account-manager/db/schema/app-password.d.ts.map +1 -1
  41. package/dist/account-manager/db/schema/app-password.js.map +1 -1
  42. package/dist/account-manager/db/schema/authorization-request.d.ts +4 -4
  43. package/dist/account-manager/db/schema/authorization-request.d.ts.map +1 -1
  44. package/dist/account-manager/db/schema/authorization-request.js.map +1 -1
  45. package/dist/account-manager/db/schema/authorized-client.d.ts +4 -4
  46. package/dist/account-manager/db/schema/authorized-client.d.ts.map +1 -1
  47. package/dist/account-manager/db/schema/authorized-client.js.map +1 -1
  48. package/dist/account-manager/db/schema/device.d.ts +3 -3
  49. package/dist/account-manager/db/schema/device.d.ts.map +1 -1
  50. package/dist/account-manager/db/schema/device.js.map +1 -1
  51. package/dist/account-manager/db/schema/email-token.d.ts +1 -1
  52. package/dist/account-manager/db/schema/email-token.d.ts.map +1 -1
  53. package/dist/account-manager/db/schema/email-token.js.map +1 -1
  54. package/dist/account-manager/db/schema/index.d.ts +14 -14
  55. package/dist/account-manager/db/schema/index.d.ts.map +1 -1
  56. package/dist/account-manager/db/schema/index.js.map +1 -1
  57. package/dist/account-manager/db/schema/invite-code.d.ts +1 -1
  58. package/dist/account-manager/db/schema/invite-code.d.ts.map +1 -1
  59. package/dist/account-manager/db/schema/invite-code.js.map +1 -1
  60. package/dist/account-manager/db/schema/lexicon.d.ts +2 -2
  61. package/dist/account-manager/db/schema/lexicon.d.ts.map +1 -1
  62. package/dist/account-manager/db/schema/lexicon.js.map +1 -1
  63. package/dist/account-manager/db/schema/repo-root.d.ts +1 -1
  64. package/dist/account-manager/db/schema/repo-root.d.ts.map +1 -1
  65. package/dist/account-manager/db/schema/repo-root.js.map +1 -1
  66. package/dist/account-manager/db/schema/token.d.ts +4 -4
  67. package/dist/account-manager/db/schema/token.d.ts.map +1 -1
  68. package/dist/account-manager/db/schema/token.js.map +1 -1
  69. package/dist/account-manager/db/schema/used-refresh-token.d.ts +2 -2
  70. package/dist/account-manager/db/schema/used-refresh-token.d.ts.map +1 -1
  71. package/dist/account-manager/db/schema/used-refresh-token.js.map +1 -1
  72. package/dist/account-manager/helpers/account-device.d.ts +2 -2
  73. package/dist/account-manager/helpers/account-device.d.ts.map +1 -1
  74. package/dist/account-manager/helpers/account-device.js.map +1 -1
  75. package/dist/account-manager/helpers/account.d.ts +3 -3
  76. package/dist/account-manager/helpers/account.d.ts.map +1 -1
  77. package/dist/account-manager/helpers/account.js.map +1 -1
  78. package/dist/account-manager/helpers/auth.d.ts +3 -3
  79. package/dist/account-manager/helpers/auth.d.ts.map +1 -1
  80. package/dist/account-manager/helpers/auth.js.map +1 -1
  81. package/dist/account-manager/helpers/authorization-request.d.ts +5 -5
  82. package/dist/account-manager/helpers/authorization-request.d.ts.map +1 -1
  83. package/dist/account-manager/helpers/authorization-request.js.map +1 -1
  84. package/dist/account-manager/helpers/authorized-client.d.ts +2 -2
  85. package/dist/account-manager/helpers/authorized-client.d.ts.map +1 -1
  86. package/dist/account-manager/helpers/authorized-client.js.map +1 -1
  87. package/dist/account-manager/helpers/device.d.ts +3 -3
  88. package/dist/account-manager/helpers/device.d.ts.map +1 -1
  89. package/dist/account-manager/helpers/device.js.map +1 -1
  90. package/dist/account-manager/helpers/email-token.d.ts +2 -2
  91. package/dist/account-manager/helpers/email-token.d.ts.map +1 -1
  92. package/dist/account-manager/helpers/email-token.js.map +1 -1
  93. package/dist/account-manager/helpers/invite.d.ts +3 -3
  94. package/dist/account-manager/helpers/invite.d.ts.map +1 -1
  95. package/dist/account-manager/helpers/invite.js +1 -1
  96. package/dist/account-manager/helpers/invite.js.map +1 -1
  97. package/dist/account-manager/helpers/lexicon.d.ts +2 -2
  98. package/dist/account-manager/helpers/lexicon.d.ts.map +1 -1
  99. package/dist/account-manager/helpers/lexicon.js +1 -1
  100. package/dist/account-manager/helpers/lexicon.js.map +1 -1
  101. package/dist/account-manager/helpers/password.d.ts +3 -3
  102. package/dist/account-manager/helpers/password.d.ts.map +1 -1
  103. package/dist/account-manager/helpers/password.js.map +1 -1
  104. package/dist/account-manager/helpers/repo.d.ts +2 -2
  105. package/dist/account-manager/helpers/repo.d.ts.map +1 -1
  106. package/dist/account-manager/helpers/repo.js.map +1 -1
  107. package/dist/account-manager/helpers/token.d.ts +4 -4
  108. package/dist/account-manager/helpers/token.d.ts.map +1 -1
  109. package/dist/account-manager/helpers/token.js.map +1 -1
  110. package/dist/account-manager/helpers/used-refresh-token.d.ts +2 -2
  111. package/dist/account-manager/helpers/used-refresh-token.d.ts.map +1 -1
  112. package/dist/account-manager/helpers/used-refresh-token.js.map +1 -1
  113. package/dist/account-manager/oauth-store.d.ts +10 -10
  114. package/dist/account-manager/oauth-store.d.ts.map +1 -1
  115. package/dist/account-manager/oauth-store.js +3 -3
  116. package/dist/account-manager/oauth-store.js.map +1 -1
  117. package/dist/account-manager/scope-reference-getter.d.ts +4 -4
  118. package/dist/account-manager/scope-reference-getter.d.ts.map +1 -1
  119. package/dist/account-manager/scope-reference-getter.js +1 -1
  120. package/dist/account-manager/scope-reference-getter.js.map +1 -1
  121. package/dist/actor-store/actor-store-reader.d.ts +3 -3
  122. package/dist/actor-store/actor-store-reader.d.ts.map +1 -1
  123. package/dist/actor-store/actor-store-reader.js.map +1 -1
  124. package/dist/actor-store/actor-store-resources.d.ts +2 -2
  125. package/dist/actor-store/actor-store-resources.d.ts.map +1 -1
  126. package/dist/actor-store/actor-store-resources.js.map +1 -1
  127. package/dist/actor-store/actor-store-transactor.d.ts +3 -3
  128. package/dist/actor-store/actor-store-transactor.d.ts.map +1 -1
  129. package/dist/actor-store/actor-store-transactor.js.map +1 -1
  130. package/dist/actor-store/actor-store.d.ts +4 -4
  131. package/dist/actor-store/actor-store.d.ts.map +1 -1
  132. package/dist/actor-store/actor-store.js.map +1 -1
  133. package/dist/actor-store/blob/reader.d.ts +6 -6
  134. package/dist/actor-store/blob/reader.d.ts.map +1 -1
  135. package/dist/actor-store/blob/reader.js.map +1 -1
  136. package/dist/actor-store/blob/transactor.d.ts +8 -8
  137. package/dist/actor-store/blob/transactor.d.ts.map +1 -1
  138. package/dist/actor-store/blob/transactor.js.map +1 -1
  139. package/dist/actor-store/db/index.d.ts +1 -1
  140. package/dist/actor-store/db/index.d.ts.map +1 -1
  141. package/dist/actor-store/db/index.js.map +1 -1
  142. package/dist/actor-store/db/migrations/001-init.d.ts +1 -1
  143. package/dist/actor-store/db/migrations/001-init.d.ts.map +1 -1
  144. package/dist/actor-store/db/migrations/001-init.js.map +1 -1
  145. package/dist/actor-store/db/schema/account-pref.d.ts +1 -1
  146. package/dist/actor-store/db/schema/account-pref.d.ts.map +1 -1
  147. package/dist/actor-store/db/schema/account-pref.js.map +1 -1
  148. package/dist/actor-store/db/schema/index.d.ts +7 -7
  149. package/dist/actor-store/db/schema/index.d.ts.map +1 -1
  150. package/dist/actor-store/db/schema/index.js.map +1 -1
  151. package/dist/actor-store/migrate.d.ts +1 -1
  152. package/dist/actor-store/migrate.d.ts.map +1 -1
  153. package/dist/actor-store/migrate.js.map +1 -1
  154. package/dist/actor-store/preference/reader.d.ts +2 -2
  155. package/dist/actor-store/preference/reader.d.ts.map +1 -1
  156. package/dist/actor-store/preference/reader.js.map +1 -1
  157. package/dist/actor-store/preference/transactor.d.ts +2 -2
  158. package/dist/actor-store/preference/transactor.d.ts.map +1 -1
  159. package/dist/actor-store/preference/transactor.js.map +1 -1
  160. package/dist/actor-store/record/reader.d.ts +5 -5
  161. package/dist/actor-store/record/reader.d.ts.map +1 -1
  162. package/dist/actor-store/record/reader.js.map +1 -1
  163. package/dist/actor-store/record/transactor.d.ts +5 -5
  164. package/dist/actor-store/record/transactor.d.ts.map +1 -1
  165. package/dist/actor-store/record/transactor.js.map +1 -1
  166. package/dist/actor-store/repo/reader.d.ts +3 -3
  167. package/dist/actor-store/repo/reader.d.ts.map +1 -1
  168. package/dist/actor-store/repo/reader.js.map +1 -1
  169. package/dist/actor-store/repo/sql-repo-reader.d.ts +3 -3
  170. package/dist/actor-store/repo/sql-repo-reader.d.ts.map +1 -1
  171. package/dist/actor-store/repo/sql-repo-reader.js.map +1 -1
  172. package/dist/actor-store/repo/sql-repo-transactor.d.ts +3 -3
  173. package/dist/actor-store/repo/sql-repo-transactor.d.ts.map +1 -1
  174. package/dist/actor-store/repo/sql-repo-transactor.js.map +1 -1
  175. package/dist/actor-store/repo/transactor.d.ts +7 -7
  176. package/dist/actor-store/repo/transactor.d.ts.map +1 -1
  177. package/dist/actor-store/repo/transactor.js +1 -1
  178. package/dist/actor-store/repo/transactor.js.map +1 -1
  179. package/dist/api/app/bsky/actor/getPreferences.d.ts +2 -2
  180. package/dist/api/app/bsky/actor/getPreferences.d.ts.map +1 -1
  181. package/dist/api/app/bsky/actor/getPreferences.js.map +1 -1
  182. package/dist/api/app/bsky/actor/getProfile.d.ts +2 -2
  183. package/dist/api/app/bsky/actor/getProfile.d.ts.map +1 -1
  184. package/dist/api/app/bsky/actor/getProfile.js.map +1 -1
  185. package/dist/api/app/bsky/actor/getProfiles.d.ts +2 -2
  186. package/dist/api/app/bsky/actor/getProfiles.d.ts.map +1 -1
  187. package/dist/api/app/bsky/actor/getProfiles.js.map +1 -1
  188. package/dist/api/app/bsky/actor/index.d.ts +2 -2
  189. package/dist/api/app/bsky/actor/index.d.ts.map +1 -1
  190. package/dist/api/app/bsky/actor/index.js.map +1 -1
  191. package/dist/api/app/bsky/actor/putPreferences.d.ts +2 -2
  192. package/dist/api/app/bsky/actor/putPreferences.d.ts.map +1 -1
  193. package/dist/api/app/bsky/actor/putPreferences.js.map +1 -1
  194. package/dist/api/app/bsky/feed/getActorLikes.d.ts +2 -2
  195. package/dist/api/app/bsky/feed/getActorLikes.d.ts.map +1 -1
  196. package/dist/api/app/bsky/feed/getActorLikes.js.map +1 -1
  197. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts +2 -2
  198. package/dist/api/app/bsky/feed/getAuthorFeed.d.ts.map +1 -1
  199. package/dist/api/app/bsky/feed/getAuthorFeed.js.map +1 -1
  200. package/dist/api/app/bsky/feed/getFeed.d.ts +2 -2
  201. package/dist/api/app/bsky/feed/getFeed.d.ts.map +1 -1
  202. package/dist/api/app/bsky/feed/getFeed.js +1 -1
  203. package/dist/api/app/bsky/feed/getFeed.js.map +1 -1
  204. package/dist/api/app/bsky/feed/getPostThread.d.ts +2 -2
  205. package/dist/api/app/bsky/feed/getPostThread.d.ts.map +1 -1
  206. package/dist/api/app/bsky/feed/getPostThread.js.map +1 -1
  207. package/dist/api/app/bsky/feed/getTimeline.d.ts +2 -2
  208. package/dist/api/app/bsky/feed/getTimeline.d.ts.map +1 -1
  209. package/dist/api/app/bsky/feed/getTimeline.js.map +1 -1
  210. package/dist/api/app/bsky/feed/index.d.ts +2 -2
  211. package/dist/api/app/bsky/feed/index.d.ts.map +1 -1
  212. package/dist/api/app/bsky/feed/index.js.map +1 -1
  213. package/dist/api/app/bsky/index.d.ts +2 -2
  214. package/dist/api/app/bsky/index.d.ts.map +1 -1
  215. package/dist/api/app/bsky/index.js.map +1 -1
  216. package/dist/api/app/bsky/notification/index.d.ts +2 -2
  217. package/dist/api/app/bsky/notification/index.d.ts.map +1 -1
  218. package/dist/api/app/bsky/notification/index.js.map +1 -1
  219. package/dist/api/app/bsky/notification/registerPush.d.ts +2 -2
  220. package/dist/api/app/bsky/notification/registerPush.d.ts.map +1 -1
  221. package/dist/api/app/bsky/notification/registerPush.js.map +1 -1
  222. package/dist/api/app/bsky/notification/unregisterPush.d.ts +2 -2
  223. package/dist/api/app/bsky/notification/unregisterPush.d.ts.map +1 -1
  224. package/dist/api/app/bsky/notification/unregisterPush.js.map +1 -1
  225. package/dist/api/app/bsky/util/resolver.d.ts +1 -1
  226. package/dist/api/app/bsky/util/resolver.d.ts.map +1 -1
  227. package/dist/api/app/bsky/util/resolver.js +1 -1
  228. package/dist/api/app/bsky/util/resolver.js.map +1 -1
  229. package/dist/api/com/atproto/admin/deleteAccount.d.ts +2 -2
  230. package/dist/api/com/atproto/admin/deleteAccount.d.ts.map +1 -1
  231. package/dist/api/com/atproto/admin/deleteAccount.js.map +1 -1
  232. package/dist/api/com/atproto/admin/disableAccountInvites.d.ts +2 -2
  233. package/dist/api/com/atproto/admin/disableAccountInvites.d.ts.map +1 -1
  234. package/dist/api/com/atproto/admin/disableAccountInvites.js.map +1 -1
  235. package/dist/api/com/atproto/admin/disableInviteCodes.d.ts +2 -2
  236. package/dist/api/com/atproto/admin/disableInviteCodes.d.ts.map +1 -1
  237. package/dist/api/com/atproto/admin/disableInviteCodes.js.map +1 -1
  238. package/dist/api/com/atproto/admin/enableAccountInvites.d.ts +2 -2
  239. package/dist/api/com/atproto/admin/enableAccountInvites.d.ts.map +1 -1
  240. package/dist/api/com/atproto/admin/enableAccountInvites.js.map +1 -1
  241. package/dist/api/com/atproto/admin/getAccountInfo.d.ts +2 -2
  242. package/dist/api/com/atproto/admin/getAccountInfo.d.ts.map +1 -1
  243. package/dist/api/com/atproto/admin/getAccountInfo.js.map +1 -1
  244. package/dist/api/com/atproto/admin/getAccountInfos.d.ts +2 -2
  245. package/dist/api/com/atproto/admin/getAccountInfos.d.ts.map +1 -1
  246. package/dist/api/com/atproto/admin/getAccountInfos.js.map +1 -1
  247. package/dist/api/com/atproto/admin/getInviteCodes.d.ts +3 -3
  248. package/dist/api/com/atproto/admin/getInviteCodes.d.ts.map +1 -1
  249. package/dist/api/com/atproto/admin/getInviteCodes.js.map +1 -1
  250. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts +2 -2
  251. package/dist/api/com/atproto/admin/getSubjectStatus.d.ts.map +1 -1
  252. package/dist/api/com/atproto/admin/getSubjectStatus.js.map +1 -1
  253. package/dist/api/com/atproto/admin/index.d.ts +2 -2
  254. package/dist/api/com/atproto/admin/index.d.ts.map +1 -1
  255. package/dist/api/com/atproto/admin/index.js.map +1 -1
  256. package/dist/api/com/atproto/admin/sendEmail.d.ts +2 -2
  257. package/dist/api/com/atproto/admin/sendEmail.d.ts.map +1 -1
  258. package/dist/api/com/atproto/admin/sendEmail.js.map +1 -1
  259. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts +2 -2
  260. package/dist/api/com/atproto/admin/updateAccountEmail.d.ts.map +1 -1
  261. package/dist/api/com/atproto/admin/updateAccountEmail.js.map +1 -1
  262. package/dist/api/com/atproto/admin/updateAccountHandle.d.ts +2 -2
  263. package/dist/api/com/atproto/admin/updateAccountHandle.d.ts.map +1 -1
  264. package/dist/api/com/atproto/admin/updateAccountHandle.js.map +1 -1
  265. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts +2 -2
  266. package/dist/api/com/atproto/admin/updateAccountPassword.d.ts.map +1 -1
  267. package/dist/api/com/atproto/admin/updateAccountPassword.js.map +1 -1
  268. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts +2 -2
  269. package/dist/api/com/atproto/admin/updateSubjectStatus.d.ts.map +1 -1
  270. package/dist/api/com/atproto/admin/updateSubjectStatus.js.map +1 -1
  271. package/dist/api/com/atproto/admin/util.d.ts +4 -4
  272. package/dist/api/com/atproto/admin/util.d.ts.map +1 -1
  273. package/dist/api/com/atproto/admin/util.js.map +1 -1
  274. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts +2 -2
  275. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.d.ts.map +1 -1
  276. package/dist/api/com/atproto/identity/getRecommendedDidCredentials.js.map +1 -1
  277. package/dist/api/com/atproto/identity/index.d.ts +2 -2
  278. package/dist/api/com/atproto/identity/index.d.ts.map +1 -1
  279. package/dist/api/com/atproto/identity/index.js.map +1 -1
  280. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts +2 -2
  281. package/dist/api/com/atproto/identity/requestPlcOperationSignature.d.ts.map +1 -1
  282. package/dist/api/com/atproto/identity/requestPlcOperationSignature.js.map +1 -1
  283. package/dist/api/com/atproto/identity/resolveHandle.d.ts +2 -2
  284. package/dist/api/com/atproto/identity/resolveHandle.d.ts.map +1 -1
  285. package/dist/api/com/atproto/identity/resolveHandle.js.map +1 -1
  286. package/dist/api/com/atproto/identity/signPlcOperation.d.ts +2 -2
  287. package/dist/api/com/atproto/identity/signPlcOperation.d.ts.map +1 -1
  288. package/dist/api/com/atproto/identity/signPlcOperation.js.map +1 -1
  289. package/dist/api/com/atproto/identity/submitPlcOperation.d.ts +2 -2
  290. package/dist/api/com/atproto/identity/submitPlcOperation.d.ts.map +1 -1
  291. package/dist/api/com/atproto/identity/submitPlcOperation.js.map +1 -1
  292. package/dist/api/com/atproto/identity/updateHandle.d.ts +2 -2
  293. package/dist/api/com/atproto/identity/updateHandle.d.ts.map +1 -1
  294. package/dist/api/com/atproto/identity/updateHandle.js.map +1 -1
  295. package/dist/api/com/atproto/index.d.ts +2 -2
  296. package/dist/api/com/atproto/index.d.ts.map +1 -1
  297. package/dist/api/com/atproto/index.js.map +1 -1
  298. package/dist/api/com/atproto/moderation/createReport.d.ts +2 -2
  299. package/dist/api/com/atproto/moderation/createReport.d.ts.map +1 -1
  300. package/dist/api/com/atproto/moderation/createReport.js.map +1 -1
  301. package/dist/api/com/atproto/moderation/index.d.ts +2 -2
  302. package/dist/api/com/atproto/moderation/index.d.ts.map +1 -1
  303. package/dist/api/com/atproto/moderation/index.js.map +1 -1
  304. package/dist/api/com/atproto/repo/applyWrites.d.ts +2 -2
  305. package/dist/api/com/atproto/repo/applyWrites.d.ts.map +1 -1
  306. package/dist/api/com/atproto/repo/applyWrites.js.map +1 -1
  307. package/dist/api/com/atproto/repo/createRecord.d.ts +2 -2
  308. package/dist/api/com/atproto/repo/createRecord.d.ts.map +1 -1
  309. package/dist/api/com/atproto/repo/createRecord.js.map +1 -1
  310. package/dist/api/com/atproto/repo/deleteRecord.d.ts +2 -2
  311. package/dist/api/com/atproto/repo/deleteRecord.d.ts.map +1 -1
  312. package/dist/api/com/atproto/repo/deleteRecord.js.map +1 -1
  313. package/dist/api/com/atproto/repo/describeRepo.d.ts +2 -2
  314. package/dist/api/com/atproto/repo/describeRepo.d.ts.map +1 -1
  315. package/dist/api/com/atproto/repo/describeRepo.js.map +1 -1
  316. package/dist/api/com/atproto/repo/getRecord.d.ts +2 -2
  317. package/dist/api/com/atproto/repo/getRecord.d.ts.map +1 -1
  318. package/dist/api/com/atproto/repo/getRecord.js.map +1 -1
  319. package/dist/api/com/atproto/repo/importRepo.d.ts +2 -2
  320. package/dist/api/com/atproto/repo/importRepo.d.ts.map +1 -1
  321. package/dist/api/com/atproto/repo/importRepo.js.map +1 -1
  322. package/dist/api/com/atproto/repo/index.d.ts +2 -2
  323. package/dist/api/com/atproto/repo/index.d.ts.map +1 -1
  324. package/dist/api/com/atproto/repo/index.js.map +1 -1
  325. package/dist/api/com/atproto/repo/listMissingBlobs.d.ts +2 -2
  326. package/dist/api/com/atproto/repo/listMissingBlobs.d.ts.map +1 -1
  327. package/dist/api/com/atproto/repo/listMissingBlobs.js.map +1 -1
  328. package/dist/api/com/atproto/repo/listRecords.d.ts +2 -2
  329. package/dist/api/com/atproto/repo/listRecords.d.ts.map +1 -1
  330. package/dist/api/com/atproto/repo/listRecords.js.map +1 -1
  331. package/dist/api/com/atproto/repo/putRecord.d.ts +2 -2
  332. package/dist/api/com/atproto/repo/putRecord.d.ts.map +1 -1
  333. package/dist/api/com/atproto/repo/putRecord.js.map +1 -1
  334. package/dist/api/com/atproto/repo/uploadBlob.d.ts +2 -2
  335. package/dist/api/com/atproto/repo/uploadBlob.d.ts.map +1 -1
  336. package/dist/api/com/atproto/repo/uploadBlob.js +9 -2
  337. package/dist/api/com/atproto/repo/uploadBlob.js.map +1 -1
  338. package/dist/api/com/atproto/server/activateAccount.d.ts +2 -2
  339. package/dist/api/com/atproto/server/activateAccount.d.ts.map +1 -1
  340. package/dist/api/com/atproto/server/activateAccount.js.map +1 -1
  341. package/dist/api/com/atproto/server/checkAccountStatus.d.ts +2 -2
  342. package/dist/api/com/atproto/server/checkAccountStatus.d.ts.map +1 -1
  343. package/dist/api/com/atproto/server/checkAccountStatus.js.map +1 -1
  344. package/dist/api/com/atproto/server/confirmEmail.d.ts +2 -2
  345. package/dist/api/com/atproto/server/confirmEmail.d.ts.map +1 -1
  346. package/dist/api/com/atproto/server/confirmEmail.js.map +1 -1
  347. package/dist/api/com/atproto/server/createAccount.d.ts +2 -2
  348. package/dist/api/com/atproto/server/createAccount.d.ts.map +1 -1
  349. package/dist/api/com/atproto/server/createAccount.js +1 -1
  350. package/dist/api/com/atproto/server/createAccount.js.map +1 -1
  351. package/dist/api/com/atproto/server/createAppPassword.d.ts +2 -2
  352. package/dist/api/com/atproto/server/createAppPassword.d.ts.map +1 -1
  353. package/dist/api/com/atproto/server/createAppPassword.js.map +1 -1
  354. package/dist/api/com/atproto/server/createInviteCode.d.ts +2 -2
  355. package/dist/api/com/atproto/server/createInviteCode.d.ts.map +1 -1
  356. package/dist/api/com/atproto/server/createInviteCode.js.map +1 -1
  357. package/dist/api/com/atproto/server/createInviteCodes.d.ts +2 -2
  358. package/dist/api/com/atproto/server/createInviteCodes.d.ts.map +1 -1
  359. package/dist/api/com/atproto/server/createInviteCodes.js.map +1 -1
  360. package/dist/api/com/atproto/server/createSession.d.ts +2 -2
  361. package/dist/api/com/atproto/server/createSession.d.ts.map +1 -1
  362. package/dist/api/com/atproto/server/createSession.js +1 -1
  363. package/dist/api/com/atproto/server/createSession.js.map +1 -1
  364. package/dist/api/com/atproto/server/deactivateAccount.d.ts +2 -2
  365. package/dist/api/com/atproto/server/deactivateAccount.d.ts.map +1 -1
  366. package/dist/api/com/atproto/server/deactivateAccount.js.map +1 -1
  367. package/dist/api/com/atproto/server/deleteAccount.d.ts +2 -2
  368. package/dist/api/com/atproto/server/deleteAccount.d.ts.map +1 -1
  369. package/dist/api/com/atproto/server/deleteAccount.js.map +1 -1
  370. package/dist/api/com/atproto/server/deleteSession.d.ts +2 -2
  371. package/dist/api/com/atproto/server/deleteSession.d.ts.map +1 -1
  372. package/dist/api/com/atproto/server/deleteSession.js.map +1 -1
  373. package/dist/api/com/atproto/server/describeServer.d.ts +2 -2
  374. package/dist/api/com/atproto/server/describeServer.d.ts.map +1 -1
  375. package/dist/api/com/atproto/server/describeServer.js.map +1 -1
  376. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts +2 -2
  377. package/dist/api/com/atproto/server/getAccountInviteCodes.d.ts.map +1 -1
  378. package/dist/api/com/atproto/server/getAccountInviteCodes.js.map +1 -1
  379. package/dist/api/com/atproto/server/getServiceAuth.d.ts +2 -2
  380. package/dist/api/com/atproto/server/getServiceAuth.d.ts.map +1 -1
  381. package/dist/api/com/atproto/server/getServiceAuth.js.map +1 -1
  382. package/dist/api/com/atproto/server/getSession.d.ts +2 -2
  383. package/dist/api/com/atproto/server/getSession.d.ts.map +1 -1
  384. package/dist/api/com/atproto/server/getSession.js +1 -1
  385. package/dist/api/com/atproto/server/getSession.js.map +1 -1
  386. package/dist/api/com/atproto/server/index.d.ts +2 -2
  387. package/dist/api/com/atproto/server/index.d.ts.map +1 -1
  388. package/dist/api/com/atproto/server/index.js.map +1 -1
  389. package/dist/api/com/atproto/server/listAppPasswords.d.ts +2 -2
  390. package/dist/api/com/atproto/server/listAppPasswords.d.ts.map +1 -1
  391. package/dist/api/com/atproto/server/listAppPasswords.js.map +1 -1
  392. package/dist/api/com/atproto/server/refreshSession.d.ts +2 -2
  393. package/dist/api/com/atproto/server/refreshSession.d.ts.map +1 -1
  394. package/dist/api/com/atproto/server/refreshSession.js +1 -1
  395. package/dist/api/com/atproto/server/refreshSession.js.map +1 -1
  396. package/dist/api/com/atproto/server/requestAccountDelete.d.ts +2 -2
  397. package/dist/api/com/atproto/server/requestAccountDelete.d.ts.map +1 -1
  398. package/dist/api/com/atproto/server/requestAccountDelete.js.map +1 -1
  399. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts +3 -3
  400. package/dist/api/com/atproto/server/requestEmailConfirmation.d.ts.map +1 -1
  401. package/dist/api/com/atproto/server/requestEmailConfirmation.js.map +1 -1
  402. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts +3 -3
  403. package/dist/api/com/atproto/server/requestEmailUpdate.d.ts.map +1 -1
  404. package/dist/api/com/atproto/server/requestEmailUpdate.js.map +1 -1
  405. package/dist/api/com/atproto/server/requestPasswordReset.d.ts +2 -2
  406. package/dist/api/com/atproto/server/requestPasswordReset.d.ts.map +1 -1
  407. package/dist/api/com/atproto/server/requestPasswordReset.js.map +1 -1
  408. package/dist/api/com/atproto/server/reserveSigningKey.d.ts +2 -2
  409. package/dist/api/com/atproto/server/reserveSigningKey.d.ts.map +1 -1
  410. package/dist/api/com/atproto/server/reserveSigningKey.js.map +1 -1
  411. package/dist/api/com/atproto/server/resetPassword.d.ts +2 -2
  412. package/dist/api/com/atproto/server/resetPassword.d.ts.map +1 -1
  413. package/dist/api/com/atproto/server/resetPassword.js.map +1 -1
  414. package/dist/api/com/atproto/server/revokeAppPassword.d.ts +2 -2
  415. package/dist/api/com/atproto/server/revokeAppPassword.d.ts.map +1 -1
  416. package/dist/api/com/atproto/server/revokeAppPassword.js.map +1 -1
  417. package/dist/api/com/atproto/server/updateEmail.d.ts +2 -2
  418. package/dist/api/com/atproto/server/updateEmail.d.ts.map +1 -1
  419. package/dist/api/com/atproto/server/updateEmail.js.map +1 -1
  420. package/dist/api/com/atproto/server/util.d.ts +4 -4
  421. package/dist/api/com/atproto/server/util.d.ts.map +1 -1
  422. package/dist/api/com/atproto/server/util.js.map +1 -1
  423. package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts +2 -2
  424. package/dist/api/com/atproto/sync/deprecated/getCheckout.d.ts.map +1 -1
  425. package/dist/api/com/atproto/sync/deprecated/getCheckout.js.map +1 -1
  426. package/dist/api/com/atproto/sync/deprecated/getHead.d.ts +2 -2
  427. package/dist/api/com/atproto/sync/deprecated/getHead.d.ts.map +1 -1
  428. package/dist/api/com/atproto/sync/deprecated/getHead.js.map +1 -1
  429. package/dist/api/com/atproto/sync/getBlob.d.ts +2 -2
  430. package/dist/api/com/atproto/sync/getBlob.d.ts.map +1 -1
  431. package/dist/api/com/atproto/sync/getBlob.js.map +1 -1
  432. package/dist/api/com/atproto/sync/getBlocks.d.ts +2 -2
  433. package/dist/api/com/atproto/sync/getBlocks.d.ts.map +1 -1
  434. package/dist/api/com/atproto/sync/getBlocks.js.map +1 -1
  435. package/dist/api/com/atproto/sync/getLatestCommit.d.ts +2 -2
  436. package/dist/api/com/atproto/sync/getLatestCommit.d.ts.map +1 -1
  437. package/dist/api/com/atproto/sync/getLatestCommit.js.map +1 -1
  438. package/dist/api/com/atproto/sync/getRecord.d.ts +2 -2
  439. package/dist/api/com/atproto/sync/getRecord.d.ts.map +1 -1
  440. package/dist/api/com/atproto/sync/getRecord.js.map +1 -1
  441. package/dist/api/com/atproto/sync/getRepo.d.ts +3 -3
  442. package/dist/api/com/atproto/sync/getRepo.d.ts.map +1 -1
  443. package/dist/api/com/atproto/sync/getRepo.js.map +1 -1
  444. package/dist/api/com/atproto/sync/getRepoStatus.d.ts +2 -2
  445. package/dist/api/com/atproto/sync/getRepoStatus.d.ts.map +1 -1
  446. package/dist/api/com/atproto/sync/getRepoStatus.js.map +1 -1
  447. package/dist/api/com/atproto/sync/index.d.ts +2 -2
  448. package/dist/api/com/atproto/sync/index.d.ts.map +1 -1
  449. package/dist/api/com/atproto/sync/index.js.map +1 -1
  450. package/dist/api/com/atproto/sync/listBlobs.d.ts +2 -2
  451. package/dist/api/com/atproto/sync/listBlobs.d.ts.map +1 -1
  452. package/dist/api/com/atproto/sync/listBlobs.js.map +1 -1
  453. package/dist/api/com/atproto/sync/listRepos.d.ts +3 -3
  454. package/dist/api/com/atproto/sync/listRepos.d.ts.map +1 -1
  455. package/dist/api/com/atproto/sync/listRepos.js +1 -1
  456. package/dist/api/com/atproto/sync/listRepos.js.map +1 -1
  457. package/dist/api/com/atproto/sync/subscribeRepos.d.ts +2 -2
  458. package/dist/api/com/atproto/sync/subscribeRepos.d.ts.map +1 -1
  459. package/dist/api/com/atproto/sync/subscribeRepos.js.map +1 -1
  460. package/dist/api/com/atproto/sync/util.d.ts +3 -3
  461. package/dist/api/com/atproto/sync/util.d.ts.map +1 -1
  462. package/dist/api/com/atproto/sync/util.js.map +1 -1
  463. package/dist/api/com/atproto/temp/checkSignupQueue.d.ts +2 -2
  464. package/dist/api/com/atproto/temp/checkSignupQueue.d.ts.map +1 -1
  465. package/dist/api/com/atproto/temp/checkSignupQueue.js.map +1 -1
  466. package/dist/api/com/atproto/temp/index.d.ts +2 -2
  467. package/dist/api/com/atproto/temp/index.d.ts.map +1 -1
  468. package/dist/api/com/atproto/temp/index.js.map +1 -1
  469. package/dist/api/index.d.ts +2 -2
  470. package/dist/api/index.d.ts.map +1 -1
  471. package/dist/api/index.js.map +1 -1
  472. package/dist/api/proxy.d.ts +2 -2
  473. package/dist/api/proxy.d.ts.map +1 -1
  474. package/dist/api/proxy.js.map +1 -1
  475. package/dist/auth-output.d.ts +3 -3
  476. package/dist/auth-output.d.ts.map +1 -1
  477. package/dist/auth-output.js.map +1 -1
  478. package/dist/auth-routes.d.ts +1 -1
  479. package/dist/auth-routes.d.ts.map +1 -1
  480. package/dist/auth-routes.js +4 -2
  481. package/dist/auth-routes.js.map +1 -1
  482. package/dist/auth-verifier.d.ts +11 -11
  483. package/dist/auth-verifier.d.ts.map +1 -1
  484. package/dist/auth-verifier.js +2 -2
  485. package/dist/auth-verifier.js.map +1 -1
  486. package/dist/basic-routes.d.ts +1 -1
  487. package/dist/basic-routes.d.ts.map +1 -1
  488. package/dist/basic-routes.js.map +1 -1
  489. package/dist/config/config.d.ts +4 -3
  490. package/dist/config/config.d.ts.map +1 -1
  491. package/dist/config/config.js +1 -0
  492. package/dist/config/config.js.map +1 -1
  493. package/dist/config/env.d.ts +1 -0
  494. package/dist/config/env.d.ts.map +1 -1
  495. package/dist/config/env.js +1 -0
  496. package/dist/config/env.js.map +1 -1
  497. package/dist/config/secrets.d.ts +1 -1
  498. package/dist/config/secrets.d.ts.map +1 -1
  499. package/dist/config/secrets.js.map +1 -1
  500. package/dist/context.d.ts +8 -8
  501. package/dist/context.d.ts.map +1 -1
  502. package/dist/context.js +4 -2
  503. package/dist/context.js.map +1 -1
  504. package/dist/crawlers.d.ts +1 -1
  505. package/dist/crawlers.d.ts.map +1 -1
  506. package/dist/crawlers.js.map +1 -1
  507. package/dist/db/db.js.map +1 -1
  508. package/dist/db/migrator.d.ts +2 -2
  509. package/dist/db/migrator.d.ts.map +1 -1
  510. package/dist/db/migrator.js.map +1 -1
  511. package/dist/db/pagination.d.ts +2 -2
  512. package/dist/db/pagination.d.ts.map +1 -1
  513. package/dist/db/pagination.js.map +1 -1
  514. package/dist/db/tables/moderation.d.ts +2 -2
  515. package/dist/db/tables/moderation.d.ts.map +1 -1
  516. package/dist/db/tables/moderation.js.map +1 -1
  517. package/dist/db/util.d.ts +1 -1
  518. package/dist/db/util.d.ts.map +1 -1
  519. package/dist/db/util.js.map +1 -1
  520. package/dist/did-cache/db/index.d.ts +1 -1
  521. package/dist/did-cache/db/index.d.ts.map +1 -1
  522. package/dist/did-cache/db/index.js.map +1 -1
  523. package/dist/did-cache/db/migrations.d.ts +1 -1
  524. package/dist/did-cache/db/migrations.d.ts.map +1 -1
  525. package/dist/did-cache/db/migrations.js.map +1 -1
  526. package/dist/did-cache/index.d.ts +2 -2
  527. package/dist/did-cache/index.d.ts.map +1 -1
  528. package/dist/did-cache/index.js.map +1 -1
  529. package/dist/disk-blobstore.d.ts +3 -3
  530. package/dist/disk-blobstore.d.ts.map +1 -1
  531. package/dist/disk-blobstore.js.map +1 -1
  532. package/dist/error.d.ts +1 -1
  533. package/dist/error.d.ts.map +1 -1
  534. package/dist/error.js +1 -1
  535. package/dist/error.js.map +1 -1
  536. package/dist/image/image-url-builder.d.ts +1 -1
  537. package/dist/image/image-url-builder.d.ts.map +1 -1
  538. package/dist/image/image-url-builder.js.map +1 -1
  539. package/dist/index.d.ts +5 -5
  540. package/dist/index.d.ts.map +1 -1
  541. package/dist/index.js +1 -0
  542. package/dist/index.js.map +1 -1
  543. package/dist/lexicons/app/bsky/actor/defs.defs.d.ts +1 -1
  544. package/dist/lexicons/app/bsky/actor/defs.defs.js.map +1 -1
  545. package/dist/logger.d.ts +1 -1
  546. package/dist/logger.d.ts.map +1 -1
  547. package/dist/logger.js.map +1 -1
  548. package/dist/mailer/index.d.ts +2 -2
  549. package/dist/mailer/index.d.ts.map +1 -1
  550. package/dist/mailer/index.js.map +1 -1
  551. package/dist/mailer/moderation.d.ts +2 -2
  552. package/dist/mailer/moderation.d.ts.map +1 -1
  553. package/dist/mailer/moderation.js.map +1 -1
  554. package/dist/pipethrough.d.ts +7 -7
  555. package/dist/pipethrough.d.ts.map +1 -1
  556. package/dist/pipethrough.js.map +1 -1
  557. package/dist/read-after-write/types.d.ts +4 -4
  558. package/dist/read-after-write/types.d.ts.map +1 -1
  559. package/dist/read-after-write/types.js.map +1 -1
  560. package/dist/read-after-write/util.d.ts +5 -5
  561. package/dist/read-after-write/util.d.ts.map +1 -1
  562. package/dist/read-after-write/util.js.map +1 -1
  563. package/dist/read-after-write/viewer.d.ts +7 -7
  564. package/dist/read-after-write/viewer.d.ts.map +1 -1
  565. package/dist/read-after-write/viewer.js +1 -1
  566. package/dist/read-after-write/viewer.js.map +1 -1
  567. package/dist/repo/prepare.d.ts +4 -4
  568. package/dist/repo/prepare.d.ts.map +1 -1
  569. package/dist/repo/prepare.js.map +1 -1
  570. package/dist/repo/types.d.ts +3 -3
  571. package/dist/repo/types.d.ts.map +1 -1
  572. package/dist/repo/types.js.map +1 -1
  573. package/dist/scripts/publish-identity.d.ts +2 -2
  574. package/dist/scripts/publish-identity.d.ts.map +1 -1
  575. package/dist/scripts/publish-identity.js.map +1 -1
  576. package/dist/scripts/rebuild-repo.d.ts +4 -4
  577. package/dist/scripts/rebuild-repo.d.ts.map +1 -1
  578. package/dist/scripts/rebuild-repo.js.map +1 -1
  579. package/dist/scripts/rotate-keys.d.ts +6 -6
  580. package/dist/scripts/rotate-keys.d.ts.map +1 -1
  581. package/dist/scripts/rotate-keys.js.map +1 -1
  582. package/dist/scripts/sequencer-recovery/index.d.ts +1 -1
  583. package/dist/scripts/sequencer-recovery/index.d.ts.map +1 -1
  584. package/dist/scripts/sequencer-recovery/index.js.map +1 -1
  585. package/dist/scripts/sequencer-recovery/recoverer.d.ts +4 -4
  586. package/dist/scripts/sequencer-recovery/recoverer.d.ts.map +1 -1
  587. package/dist/scripts/sequencer-recovery/recoverer.js.map +1 -1
  588. package/dist/scripts/sequencer-recovery/recovery-db.d.ts +1 -1
  589. package/dist/scripts/sequencer-recovery/recovery-db.d.ts.map +1 -1
  590. package/dist/scripts/sequencer-recovery/recovery-db.js.map +1 -1
  591. package/dist/scripts/sequencer-recovery/repair-repos.d.ts +1 -1
  592. package/dist/scripts/sequencer-recovery/repair-repos.d.ts.map +1 -1
  593. package/dist/scripts/sequencer-recovery/repair-repos.js.map +1 -1
  594. package/dist/sequencer/db/index.d.ts +1 -1
  595. package/dist/sequencer/db/index.d.ts.map +1 -1
  596. package/dist/sequencer/db/index.js.map +1 -1
  597. package/dist/sequencer/db/migrations/001-init.d.ts +1 -1
  598. package/dist/sequencer/db/migrations/001-init.d.ts.map +1 -1
  599. package/dist/sequencer/db/migrations/001-init.js.map +1 -1
  600. package/dist/sequencer/db/schema.d.ts +1 -1
  601. package/dist/sequencer/db/schema.d.ts.map +1 -1
  602. package/dist/sequencer/db/schema.js.map +1 -1
  603. package/dist/sequencer/events.d.ts +3 -3
  604. package/dist/sequencer/events.d.ts.map +1 -1
  605. package/dist/sequencer/events.js.map +1 -1
  606. package/dist/sequencer/outbox.d.ts +1 -1
  607. package/dist/sequencer/outbox.d.ts.map +1 -1
  608. package/dist/sequencer/outbox.js.map +1 -1
  609. package/dist/sequencer/sequencer.d.ts +5 -5
  610. package/dist/sequencer/sequencer.d.ts.map +1 -1
  611. package/dist/sequencer/sequencer.js.map +1 -1
  612. package/dist/util/compression.js.map +1 -1
  613. package/dist/util/http.d.ts +1 -1
  614. package/dist/util/http.d.ts.map +1 -1
  615. package/dist/util/http.js.map +1 -1
  616. package/dist/well-known.d.ts +1 -1
  617. package/dist/well-known.d.ts.map +1 -1
  618. package/dist/well-known.js.map +1 -1
  619. package/package.json +25 -25
@@ -1 +1 @@
1
- {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;IAE9B,qEAAqE;IACrE,MAAM,IAAI,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAExC,IAAI,cAAc,EAAE,CAAC;QACnB,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE;YACzC,IAAI;YACJ,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAA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serAlreadyExistsError } from '../../../../account-manager/helpers/account.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { requestEmailUpdateAuth } from './requestEmailUpdate.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n // @NOTE Ensure that both endpoints use the same authentication logic\n const auth = requestEmailUpdateAuth(ctx)\n\n if (entrywayClient) {\n server.add(com.atproto.server.updateEmail, {\n auth,\n handler: async ({ auth, input: { body }, req }) => {\n const { headers } = await ctx.entrywayAuthHeaders(\n req,\n auth.credentials.did,\n com.atproto.server.updateEmail.$lxm,\n )\n\n await entrywayClient.xrpc(com.atproto.server.updateEmail, {\n headers,\n body,\n })\n },\n })\n } else {\n server.add(com.atproto.server.updateEmail, {\n auth,\n handler: async ({ auth, input: { body } }) => {\n const did = auth.credentials.did\n const { token, email } = body\n\n // @TODO get the locale somehow (either by adding a field in the request\n // body, or by using the `Accept-Language` header).\n const locale = undefined\n\n try {\n await ctx.accountManager.updateEmail(did, email, token, { locale })\n } catch (cause) {\n if (cause instanceof UserAlreadyExistsError) {\n throw new InvalidRequestError(cause.message, undefined, { cause })\n }\n\n throw cause\n }\n },\n })\n }\n}\n"]}
1
+ {"version":3,"file":"updateEmail.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/updateEmail.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAA;AAEvF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,EAAE,cAAc,EAAE,GAAG,GAAG,CAAA;IAE9B,qEAAqE;IACrE,MAAM,IAAI,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAExC,IAAI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AAO,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;oBACpE,CAAC;oBAED,MAAM,KAAK,CAAA;gBACb,CAAC;YACH,CAAC;SACF,CAAC,CAAA;IACJ,CAAC;AACH,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { UserAlreadyExistsError } from '../../../../account-manager/helpers/account.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { requestEmailUpdateAuth } from './requestEmailUpdate.js'\n\nexport default function (server: Server, ctx: AppContext) {\n const { entrywayClient } = ctx\n\n // @NOTE Ensure that both endpoints use the same authentication logic\n const auth = requestEmailUpdateAuth(ctx)\n\n if (entrywayClient) {\n server.add(com.atproto.server.updateEmail, {\n auth,\n handler: async ({ auth, input: { body }, req }) => {\n const { headers } = await ctx.entrywayAuthHeaders(\n req,\n auth.credentials.did,\n com.atproto.server.updateEmail.$lxm,\n )\n\n await entrywayClient.xrpc(com.atproto.server.updateEmail, {\n headers,\n body,\n })\n },\n })\n } else {\n server.add(com.atproto.server.updateEmail, {\n auth,\n handler: async ({ auth, input: { body } }) => {\n const did = auth.credentials.did\n const { token, email } = body\n\n // @TODO get the locale somehow (either by adding a field in the request\n // body, or by using the `Accept-Language` header).\n const locale = undefined\n\n try {\n await ctx.accountManager.updateEmail(did, email, token, { locale })\n } catch (cause) {\n if (cause instanceof UserAlreadyExistsError) {\n throw new InvalidRequestError(cause.message, undefined, { cause })\n }\n\n throw cause\n }\n },\n })\n }\n}\n"]}
@@ -1,8 +1,8 @@
1
- import * as plc from '@did-plc/lib';
1
+ import type * as plc from '@did-plc/lib';
2
2
  import * as crypto from '@atproto/crypto';
3
- import { DidDocument, IdResolver } from '@atproto/identity';
4
- import { ActorStore } from '../../../../actor-store/actor-store.js';
5
- import { ServerConfig } from '../../../../config/index.js';
3
+ import type { DidDocument, IdResolver } from '@atproto/identity';
4
+ import type { ActorStore } from '../../../../actor-store/actor-store.js';
5
+ import type { ServerConfig } from '../../../../config/index.js';
6
6
  export declare const genInvCode: (cfg: ServerConfig) => string;
7
7
  export declare const genInvCodes: (cfg: ServerConfig, count: number) => string[];
8
8
  export declare const getRandomToken: () => string;
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,cAAc,CAAA;AAEnC,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAA;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAO1D,eAAO,MAAM,UAAU,QAAS,YAAY,KAAG,MAE9C,CAAA;AAED,eAAO,MAAM,WAAW,QAAS,YAAY,SAAS,MAAM,KAAG,MAAM,EAMpE,CAAA;AAGD,eAAO,MAAM,cAAc,cAG1B,CAAA;AAED,eAAO,MAAM,iBAAiB,QACvB;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,OAC1B,MAAM,iBACI,OAAO,KACrB,OAAO,CAAC,WAAW,GAAG,SAAS,CAOjC,CAAA;AAED,eAAO,MAAM,gBAAgB,QACtB;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,YAAY,CAAA;CAAE,OAC7C,MAAM,iBACI,OAAO,KACrB,OAAO,CAAC,WAAW,GAAG,SAAS,CAGjC,CAAA;AAED,eAAO,MAAM,uBAAuB,QAC7B;IACH,SAAS,EAAE,GAAG,CAAC,MAAM,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,YAAY,CAAA;IACjB,cAAc,EAAE,MAAM,CAAC,OAAO,CAAA;IAC9B,UAAU,EAAE,UAAU,CAAA;CACvB,OACI,MAAM,KACV,OAAO,CAAC,OAAO,CAOjB,CAAA;AAED,e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c,CAAC,EAAE,CAAC;QACzE,MAAM,IAAI,mBAAmB,CAC3B,kDAAkD,CACnD,CAAA;IACH,CAAC;IAED,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAC9D,MAAM,IAAI,mBAAmB,CAC3B,yEAAyE,CAC1E,CAAA;IACH,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACjD,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,mBAAmB,CAC3B,sEAAsE,CACvE,CAAA;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import * as plc from '@did-plc/lib'\nimport { getPdsEndpoint, getSigningDidKey } from '@atproto/common'\nimport * as crypto from '@atproto/crypto'\nimport { DidDocument, IdResolver } from '@atproto/identity'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport { ActorStore } from '../../../../actor-store/actor-store.js'\nimport { ServerConfig } from '../../../../config/index.js'\nimport { httpLogger } from '../../../../logger.js'\n\n// generate an invite code preceded by the hostname\n// with '.'s replaced by '-'s so it is not mistakable for a link\n// ex: bsky-app-abc23-567xy\n// regex: bsky-app-[a-z2-7]{5}-[a-z2-7]{5}\nexport const genInvCode = (cfg: ServerConfig): string => {\n return cfg.service.hostname.replaceAll('.', '-') + '-' + getRandomToken()\n}\n\nexport const genInvCodes = (cfg: ServerConfig, count: number): string[] => {\n const codes: string[] = []\n for (let i = 0; i < count; i++) {\n codes.push(genInvCode(cfg))\n }\n return codes\n}\n\n// Formatted xxxxx-xxxxx where digits are in base32\nexport const getRandomToken = () => {\n const token = crypto.randomStr(8, 'base32').slice(0, 10)\n return token.slice(0, 5) + '-' + token.slice(5, 10)\n}\n\nexport const safeResolveDidDoc = async (\n ctx: { idResolver: IdResolver },\n did: string,\n forceRefresh?: boolean,\n): Promise<DidDocument | undefined> => {\n try {\n const didDoc = await ctx.idResolver.did.resolve(did, forceRefresh)\n return didDoc ?? undefined\n } catch (err) {\n httpLogger.warn({ err, did }, 'failed to resolve did doc')\n }\n}\n\nexport const didDocForSession = async (\n ctx: { idResolver: IdResolver; cfg: ServerConfig },\n did: string,\n forceRefresh?: boolean,\n): Promise<DidDocument | undefined> => {\n if (!ctx.cfg.identity.enableDidDocWithSession) return\n return safeResolveDidDoc(ctx, did, forceRefresh)\n}\n\nexport const isValidDidDocForService = async (\n ctx: {\n plcClient: plc.Client\n idResolver: IdResolver\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n): Promise<boolean> => {\n try {\n await assertValidDidDocumentForService(ctx, did)\n return true\n } catch {\n return false\n }\n}\n\nexport const assertValidDidDocumentForService = async (\n ctx: {\n plcClient: plc.Client\n idResolver: IdResolver\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n) => {\n if (did.startsWith('did:plc')) {\n const resolved = await ctx.plcClient.getDocumentData(did)\n await assertValidDocContents(ctx, did, {\n pdsEndpoint: resolved.services['atproto_pds']?.endpoint,\n signingKey: resolved.verificationMethods['atproto'],\n rotationKeys: resolved.rotationKeys,\n })\n } else {\n const resolved = await ctx.idResolver.did.resolve(did, true)\n if (!resolved) {\n throw new InvalidRequestError('Could not resolve DID')\n }\n await assertValidDocContents(ctx, did, {\n pdsEndpoint: getPdsEndpoint(resolved),\n signingKey: getSigningDidKey(resolved),\n })\n }\n}\n\nconst assertValidDocContents = async (\n ctx: {\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n contents: {\n signingKey?: string\n pdsEndpoint?: string\n rotationKeys?: string[]\n },\n) => {\n const { signingKey, pdsEndpoint, rotationKeys } = contents\n\n const plcRotationKey =\n ctx.cfg.entryway?.plcRotationKey ?? ctx.plcRotationKey.did()\n if (rotationKeys !== undefined && !rotationKeys.includes(plcRotationKey)) {\n throw new InvalidRequestError(\n 'Server rotation key not included in PLC DID data',\n )\n }\n\n if (!pdsEndpoint || pdsEndpoint !== ctx.cfg.service.publicUrl) {\n throw new InvalidRequestError(\n 'DID document atproto_pds service endpoint does not match PDS public url',\n )\n }\n\n const keypair = await ctx.actorStore.keypair(did)\n if (!signingKey || signingKey !== keypair.did()) {\n throw new InvalidRequestError(\n 'DID document verification method does not match expected signing key',\n )\n }\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/server/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAA;AAEzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAElD,mDAAmD;AACnD,gEAAgE;AAChE,2BAA2B;AAC3B,0CAA0C;AAC1C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAiB,EAAU,EAAE;IACtD,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,cAAc,EAAE,CAAA;AAC3E,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAiB,EAAE,KAAa,EAAY,EAAE;IACxE,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;IAC7B,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,cAAc,GAAG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B,CAC3B,kDAAkD,CACnD,CAAA;IACH,CAAC;IAED,IAAI,CAAC,WAAW,IAAI,WAAW,KAAK,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC;QAC9D,MAAM,IAAI,mBAAmB,CAC3B,yEAAyE,CAC1E,CAAA;IACH,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACjD,IAAI,CAAC,UAAU,IAAI,UAAU,KAAK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,mBAAmB,CAC3B,sEAAsE,CACvE,CAAA;IACH,CAAC;AACH,CAAC,CAAA","sourcesContent":["import type * as plc from '@did-plc/lib'\nimport { getPdsEndpoint, getSigningDidKey } from '@atproto/common'\nimport * as crypto from '@atproto/crypto'\nimport type { DidDocument, IdResolver } from '@atproto/identity'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport type { ActorStore } from '../../../../actor-store/actor-store.js'\nimport type { ServerConfig } from '../../../../config/index.js'\nimport { httpLogger } from '../../../../logger.js'\n\n// generate an invite code preceded by the hostname\n// with '.'s replaced by '-'s so it is not mistakable for a link\n// ex: bsky-app-abc23-567xy\n// regex: bsky-app-[a-z2-7]{5}-[a-z2-7]{5}\nexport const genInvCode = (cfg: ServerConfig): string => {\n return cfg.service.hostname.replaceAll('.', '-') + '-' + getRandomToken()\n}\n\nexport const genInvCodes = (cfg: ServerConfig, count: number): string[] => {\n const codes: string[] = []\n for (let i = 0; i < count; i++) {\n codes.push(genInvCode(cfg))\n }\n return codes\n}\n\n// Formatted xxxxx-xxxxx where digits are in base32\nexport const getRandomToken = () => {\n const token = crypto.randomStr(8, 'base32').slice(0, 10)\n return token.slice(0, 5) + '-' + token.slice(5, 10)\n}\n\nexport const safeResolveDidDoc = async (\n ctx: { idResolver: IdResolver },\n did: string,\n forceRefresh?: boolean,\n): Promise<DidDocument | undefined> => {\n try {\n const didDoc = await ctx.idResolver.did.resolve(did, forceRefresh)\n return didDoc ?? undefined\n } catch (err) {\n httpLogger.warn({ err, did }, 'failed to resolve did doc')\n }\n}\n\nexport const didDocForSession = async (\n ctx: { idResolver: IdResolver; cfg: ServerConfig },\n did: string,\n forceRefresh?: boolean,\n): Promise<DidDocument | undefined> => {\n if (!ctx.cfg.identity.enableDidDocWithSession) return\n return safeResolveDidDoc(ctx, did, forceRefresh)\n}\n\nexport const isValidDidDocForService = async (\n ctx: {\n plcClient: plc.Client\n idResolver: IdResolver\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n): Promise<boolean> => {\n try {\n await assertValidDidDocumentForService(ctx, did)\n return true\n } catch {\n return false\n }\n}\n\nexport const assertValidDidDocumentForService = async (\n ctx: {\n plcClient: plc.Client\n idResolver: IdResolver\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n) => {\n if (did.startsWith('did:plc')) {\n const resolved = await ctx.plcClient.getDocumentData(did)\n await assertValidDocContents(ctx, did, {\n pdsEndpoint: resolved.services['atproto_pds']?.endpoint,\n signingKey: resolved.verificationMethods['atproto'],\n rotationKeys: resolved.rotationKeys,\n })\n } else {\n const resolved = await ctx.idResolver.did.resolve(did, true)\n if (!resolved) {\n throw new InvalidRequestError('Could not resolve DID')\n }\n await assertValidDocContents(ctx, did, {\n pdsEndpoint: getPdsEndpoint(resolved),\n signingKey: getSigningDidKey(resolved),\n })\n }\n}\n\nconst assertValidDocContents = async (\n ctx: {\n cfg: ServerConfig\n plcRotationKey: crypto.Keypair\n actorStore: ActorStore\n },\n did: string,\n contents: {\n signingKey?: string\n pdsEndpoint?: string\n rotationKeys?: string[]\n },\n) => {\n const { signingKey, pdsEndpoint, rotationKeys } = contents\n\n const plcRotationKey =\n ctx.cfg.entryway?.plcRotationKey ?? ctx.plcRotationKey.did()\n if (rotationKeys !== undefined && !rotationKeys.includes(plcRotationKey)) {\n throw new InvalidRequestError(\n 'Server rotation key not included in PLC DID data',\n )\n }\n\n if (!pdsEndpoint || pdsEndpoint !== ctx.cfg.service.publicUrl) {\n throw new InvalidRequestError(\n 'DID document atproto_pds service endpoint does not match PDS public url',\n )\n }\n\n const keypair = await ctx.actorStore.keypair(did)\n if (!signingKey || signingKey !== keypair.did()) {\n throw new InvalidRequestError(\n 'DID document verification method does not match expected signing key',\n )\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getCheckout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckout.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAKtD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmBvD"}
1
+ {"version":3,"file":"getCheckout.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAK3D,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getCheckout.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;QACvC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAE9C,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../../auth-verifier.js'\nimport { AppContext } from '../../../../../context.js'\nimport { com } from '../../../../../lexicons/index.js'\nimport { getCarStream } from '../getRepo.js'\nimport { assertRepoAvailability } from '../util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getCheckout, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const carStream = await getCarStream(ctx, did)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: carStream,\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getCheckout.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getCheckout.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE;QACvC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;YAE9C,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../../context.js'\nimport { com } from '../../../../../lexicons/index.js'\nimport { getCarStream } from '../getRepo.js'\nimport { assertRepoAvailability } from '../util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getCheckout, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const carStream = await getCarStream(ctx, did)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: carStream,\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getHead.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getHead.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAItD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
1
+ {"version":3,"file":"getHead.d.ts","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAI3D,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getHead.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAC7B,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../../auth-verifier.js'\nimport { AppContext } from '../../../../../context.js'\nimport { com } from '../../../../../lexicons/index.js'\nimport { assertRepoAvailability } from '../util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getHead, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRoot(),\n )\n if (root === null) {\n throw new InvalidRequestError(\n `Could not find root for DID: ${did}`,\n 'HeadNotFound',\n )\n }\n return {\n encoding: 'application/json' as const,\n body: { root: root.toString() },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getHead.js","sourceRoot":"","sources":["../../../../../../src/api/com/atproto/sync/deprecated/getHead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAE/D,OAAO,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAA;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAC7B,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,EAAE;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../../context.js'\nimport { com } from '../../../../../lexicons/index.js'\nimport { assertRepoAvailability } from '../util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getHead, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRoot(),\n )\n if (root === null) {\n throw new InvalidRequestError(\n `Could not find root for DID: ${did}`,\n 'HeadNotFound',\n )\n }\n return {\n encoding: 'application/json' as const,\n body: { root: root.toString() },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getBlob.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmDvD"}
1
+ {"version":3,"file":"getBlob.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAmDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBlob.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE;QACnC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,UAAU,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC;YACjC,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE;YACvC,MAAM,EAAE,GAA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AoC;gBACjE,IAAI,EAAE,KAAK,CAAC,MAAM;aACnB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { parseCid } from '@atproto/lex-data'\nimport { BlobNotFoundError } from '@atproto/repo'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getBlob, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, res, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const cid = parseCid(params.cid)\n const found = await ctx.actorStore.read(params.did, async (store) => {\n try {\n return await store.repo.blob.getBlob(cid)\n } catch (err) {\n if (err instanceof BlobNotFoundError) {\n throw new InvalidRequestError('Blob not found')\n } else {\n throw err\n }\n }\n })\n if (!found) {\n throw new InvalidRequestError('Blob not found')\n }\n res.setHeader('content-length', found.size)\n\n // Important Security headers\n\n // This prevents the browser from trying to guess the content type\n // and potentially loading the blob as executable code, or rendering it\n // in some other unsafe way.\n res.setHeader('x-content-type-options', 'nosniff')\n\n // This forces the browser to download the blob instead of trying to\n // render it when visiting the URL. This is important to prevent XSS\n // attacks if the blob happens to be HTML. Even if JS is disabled via the\n // CSP header below, a blob could still contain malicious HTML links.\n res.setHeader('content-disposition', `attachment; filename=\"${cid}\"`)\n\n // This should prevent the browser from executing the blob in any way\n res.setHeader('content-security-policy', `default-src 'none'; sandbox`)\n\n return {\n encoding: found.mimeType || ('application/octet-stream' as const),\n body: found.stream,\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getBlob.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync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AAG,EAAE,CAAC;oBACb,IAAI,GAAG,YAAY,iBAAiB,EAAE,CAAC;wBACrC,MAAM,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;oBACjD,CAAC;yBAAM,CAAC;wBACN,MAAM,GAAG,CAAA;oBACX,CAAC;gBACH,CAAC;YACH,CAAC,CAAC,CAAA;YACF,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;YACjD,CAAC;YACD,GAAG,CAAC,SAAS,CAAC,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;YAE3C,6BAA6B;YAE7B,kEAAkE;YAClE,uEAAuE;YACvE,4BAA4B;YAC5B,GAAG,CAAC,SAAS,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAA;YAElD,oEAAoE;YACpE,oEAAoE;YACpE,yEAAyE;YACzE,qEAAqE;YACrE,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,yBAAyB,GAAG,GAAG,CAAC,CAAA;YAErE,qEAAqE;YACrE,GAAG,CAAC,SAAS,CAAC,yBAAyB,EAAE,6BAA6B,CAAC,CAAA;YAEvE,OAAO;gBACL,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAK,0BAAoC;gBACjE,IAAI,EAAE,KAAK,CAAC,MAAM;aACnB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { parseCid } from '@atproto/lex-data'\nimport { BlobNotFoundError } from '@atproto/repo'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getBlob, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, res, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const cid = parseCid(params.cid)\n const found = await ctx.actorStore.read(params.did, async (store) => {\n try {\n return await store.repo.blob.getBlob(cid)\n } catch (err) {\n if (err instanceof BlobNotFoundError) {\n throw new InvalidRequestError('Blob not found')\n } else {\n throw err\n }\n }\n })\n if (!found) {\n throw new InvalidRequestError('Blob not found')\n }\n res.setHeader('content-length', found.size)\n\n // Important Security headers\n\n // This prevents the browser from trying to guess the content type\n // and potentially loading the blob as executable code, or rendering it\n // in some other unsafe way.\n res.setHeader('x-content-type-options', 'nosniff')\n\n // This forces the browser to download the blob instead of trying to\n // render it when visiting the URL. This is important to prevent XSS\n // attacks if the blob happens to be HTML. Even if JS is disabled via the\n // CSP header below, a blob could still contain malicious HTML links.\n res.setHeader('content-disposition', `attachment; filename=\"${cid}\"`)\n\n // This should prevent the browser from executing the blob in any way\n res.setHeader('content-security-policy', `default-src 'none'; sandbox`)\n\n return {\n encoding: found.mimeType || ('application/octet-stream' as const),\n body: found.stream,\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getBlocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
1
+ {"version":3,"file":"getBlocks.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getBlocks.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;QACrC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YACtC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACnD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CACnC,CAAA;YACD,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;gBACvD,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,UAAU,EAAE,CAAC,CAAA;YACrE,CAAC;YACD,MAAM,GAAG,GAAG,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;YAE/C,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,oBAAoB,CAAC,GAAG,CAAC;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { byteIterableToStream } from '@atproto/common'\nimport { parseCid } from '@atproto/lex-data'\nimport { blocksToCarStream } from '@atproto/repo'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getBlocks, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const cids = params.cids.map(parseCid)\n const got = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getBlocks(cids),\n )\n if (got.missing.length > 0) {\n const missingStr = got.missing.map((c) => c.toString())\n throw new InvalidRequestError(`Could not find cids: ${missingStr}`)\n }\n const car = blocksToCarStream(null, got.blocks)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: byteIterableToStream(car),\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getBlocks.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getBlocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;QACrC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;YACtC,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACnD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CACnC,CAAA;YACD,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC3B,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAA;gBACvD,MAAM,IAAI,mBAAmB,CAAC,wBAAwB,UAAU,EAAE,CAAC,CAAA;YACrE,CAAC;YACD,MAAM,GAAG,GAAG,iBAAiB,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;YAE/C,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,oBAAoB,CAAC,GAAG,CAAC;aAChC,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { byteIterableToStream } from '@atproto/common'\nimport { parseCid } from '@atproto/lex-data'\nimport { blocksToCarStream } from '@atproto/repo'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getBlocks, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const cids = params.cids.map(parseCid)\n const got = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getBlocks(cids),\n )\n if (got.missing.length > 0) {\n const missingStr = got.missing.map((c) => c.toString())\n throw new InvalidRequestError(`Could not find cids: ${missingStr}`)\n }\n const car = blocksToCarStream(null, got.blocks)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: byteIterableToStream(car),\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getLatestCommit.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLatestCommit.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
1
+ {"version":3,"file":"getLatestCommit.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA0BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getLatestCommit.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAClD,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getLatestCommit, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRootDetailed(),\n )\n if (root === null) {\n throw new InvalidRequestError(\n `Could not find root for DID: ${did}`,\n 'RepoNotFound',\n )\n }\n return {\n encoding: 'application/json' as const,\n body: { cid: root.cid.toString(), rev: root.rev },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getLatestCommit.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getLatestCommit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE;QAC3C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;YACD,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;gBAClB,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,GAAG,EAAE,EACrC,cAAc,CACf,CAAA;YACH,CAAC;YACD,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE;aAClD,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getLatestCommit, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRootDetailed(),\n )\n if (root === null) {\n throw new InvalidRequestError(\n `Could not find root for DID: ${did}`,\n 'RepoNotFound',\n )\n }\n return {\n encoding: 'application/json' as const,\n body: { cid: root.cid.toString(), rev: root.rev },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getRecord.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD"}
1
+ {"version":3,"file":"getRecord.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAsCvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;QACrC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;YACxC,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,+GAA+G;YAC/G,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YAEhD,IAAI,SAA0B,CAAA;YAC9B,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;gBAC1C,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,CAAA;gBAEtC,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;gBACtE,CAAC;gBACD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,CAAA;gBACxE,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;YAC3C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO,CAAC,KAAK,EAAE,CAAA;gBACf,MAAM,GAAG,CAAA;YACX,CAAC;YACD,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;YACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAE9B,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import stream from 'node:stream'\nimport { byteIterableToStream } from '@atproto/common'\nimport * as repo from '@atproto/repo'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { SqlRepoReader } from '../../../../actor-store/repo/sql-repo-reader.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRecord, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did, collection, rkey } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n // must open up the db outside of store interface so that we can close the file handle after finished streaming\n const actorDb = await ctx.actorStore.openDb(did)\n\n let carStream: stream.Readable\n try {\n const storage = new SqlRepoReader(actorDb)\n const commit = await storage.getRoot()\n\n if (!commit) {\n throw new InvalidRequestError(`Could not find repo for DID: ${did}`)\n }\n const carIter = repo.getRecords(storage, commit, [{ collection, rkey }])\n carStream = byteIterableToStream(carIter)\n } catch (err) {\n actorDb.close()\n throw err\n }\n const closeDb = () => actorDb.close()\n carStream.on('error', closeDb)\n carStream.on('close', closeDb)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: carStream,\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getRecord.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRecord.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAA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AAA;YAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;YAE9B,OAAO;gBACL,QAAQ,EAAE,0BAAmC;gBAC7C,IAAI,EAAE,SAAS;aAChB,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type stream from 'node:stream'\nimport { byteIterableToStream } from '@atproto/common'\nimport * as repo from '@atproto/repo'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { SqlRepoReader } from '../../../../actor-store/repo/sql-repo-reader.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRecord, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did, collection, rkey } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n // must open up the db outside of store interface so that we can close the file handle after finished streaming\n const actorDb = await ctx.actorStore.openDb(did)\n\n let carStream: stream.Readable\n try {\n const storage = new SqlRepoReader(actorDb)\n const commit = await storage.getRoot()\n\n if (!commit) {\n throw new InvalidRequestError(`Could not find repo for DID: ${did}`)\n }\n const carIter = repo.getRecords(storage, commit, [{ collection, rkey }])\n carStream = byteIterableToStream(carIter)\n } catch (err) {\n actorDb.close()\n throw err\n }\n const closeDb = () => actorDb.close()\n carStream.on('error', closeDb)\n carStream.on('close', closeDb)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n body: carStream,\n }\n },\n })\n}\n"]}
@@ -1,6 +1,6 @@
1
- import stream from 'node:stream';
2
- import { Server } from '@atproto/xrpc-server';
3
- import { AppContext } from '../../../../context.js';
1
+ import type stream from 'node:stream';
2
+ import { type Server } from '@atproto/xrpc-server';
3
+ import type { AppContext } from '../../../../context.js';
4
4
  export default function (server: Server, ctx: AppContext): void;
5
5
  export declare const getCarStream: (ctx: AppContext, did: string, since?: string) => Promise<stream.Readable>;
6
6
  //# sourceMappingURL=getRepo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAA;AAMhC,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOlE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAMnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAgCvD;AAED,eAAO,MAAM,YAAY,QAClB,UAAU,OACV,MAAM,UACH,MAAM,KACb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAiBzB,CAAA"}
1
+ {"version":3,"file":"getRepo.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AAMrC,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAOvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAMxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAgCvD;AAED,eAAO,MAAM,YAAY,QAClB,UAAU,OACV,MAAM,UACH,MAAM,KACb,OAAO,CAAC,MAAM,CAAC,QAAQ,CAiBzB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRepo.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,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C,SAAS,EAAE,qBAAqB,CAAC;oBACtD,CAAC,CAAC,SAAS;aACd,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,GAAe,EACf,GAAW,EACX,KAAc,EACY,EAAE;IAC5B,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAChD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;QAC1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACjD,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;QAC/C,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC9B,OAAO,SAAS,CAAA;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;QACrB,IAAI,GAAG,YAAY,qBAAqB,EAAE,CAAC;YACzC,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC,CAAA","sourcesContent":["import stream from 'node:stream'\nimport {\n MINUTE,\n byteIterableToStream,\n coalesceByteStream,\n} from '@atproto/common'\nimport { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport {\n RepoRootNotFoundError,\n SqlRepoReader,\n} from '../../../../actor-store/repo/sql-repo-reader.js'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nconst CAR_STREAM_CHUNK_SIZE = 64 * 1024\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRepo, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n rateLimit: {\n durationMs: 5 * MINUTE,\n points: 6000,\n },\n handler: async ({ req, params, auth }) => {\n const { did, since } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const carStream = await getCarStream(ctx, did, since)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n // @NOTE If the client asked for compression (via \"accept-encoding\"), we\n // coalesce the CAR stream into larger chunks to improve compression\n // efficiency. See https://github.com/bluesky-social/atproto/pull/5078\n //\n // @TODO This would be better handled by xrpc-server and/or the\n // compression middleware instead of manually coalescing the stream.\n body: req.headers['accept-encoding']\n ? coalesceByteStream(carStream, CAR_STREAM_CHUNK_SIZE)\n : carStream,\n }\n },\n })\n}\n\nexport const getCarStream = async (\n ctx: AppContext,\n did: string,\n since?: string,\n): Promise<stream.Readable> => {\n const actorDb = await ctx.actorStore.openDb(did)\n try {\n const storage = new SqlRepoReader(actorDb)\n const carIter = await storage.getCarStream(since)\n const carStream = byteIterableToStream(carIter)\n const closeDb = () => actorDb.close()\n carStream.on('error', closeDb)\n carStream.on('close', closeDb)\n return carStream\n } catch (err) {\n await actorDb.close()\n if (err instanceof RepoRootNotFoundError) {\n throw new InvalidRequestError(`Could not find repo for DID: ${did}`)\n }\n throw err\n }\n}\n"]}
1
+ {"version":3,"file":"getRepo.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepo.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,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B,CAAC,SAAS,EAAE,qBAAqB,CAAC;oBACtD,CAAC,CAAC,SAAS;aACd,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAC/B,GAAe,EACf,GAAW,EACX,KAAc,EACY,EAAE;IAC5B,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAChD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,OAAO,CAAC,CAAA;QAC1C,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACjD,MAAM,SAAS,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAA;QAC/C,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;QACrC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC9B,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QAC9B,OAAO,SAAS,CAAA;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;QACrB,IAAI,GAAG,YAAY,qBAAqB,EAAE,CAAC;YACzC,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,GAAG,EAAE,CAAC,CAAA;QACtE,CAAC;QACD,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC,CAAA","sourcesContent":["import type stream from 'node:stream'\nimport {\n MINUTE,\n byteIterableToStream,\n coalesceByteStream,\n} from '@atproto/common'\nimport { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport {\n RepoRootNotFoundError,\n SqlRepoReader,\n} from '../../../../actor-store/repo/sql-repo-reader.js'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nconst CAR_STREAM_CHUNK_SIZE = 64 * 1024\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRepo, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n rateLimit: {\n durationMs: 5 * MINUTE,\n points: 6000,\n },\n handler: async ({ req, params, auth }) => {\n const { did, since } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const carStream = await getCarStream(ctx, did, since)\n\n return {\n encoding: 'application/vnd.ipld.car' as const,\n // @NOTE If the client asked for compression (via \"accept-encoding\"), we\n // coalesce the CAR stream into larger chunks to improve compression\n // efficiency. See https://github.com/bluesky-social/atproto/pull/5078\n //\n // @TODO This would be better handled by xrpc-server and/or the\n // compression middleware instead of manually coalescing the stream.\n body: req.headers['accept-encoding']\n ? coalesceByteStream(carStream, CAR_STREAM_CHUNK_SIZE)\n : carStream,\n }\n },\n })\n}\n\nexport const getCarStream = async (\n ctx: AppContext,\n did: string,\n since?: string,\n): Promise<stream.Readable> => {\n const actorDb = await ctx.actorStore.openDb(did)\n try {\n const storage = new SqlRepoReader(actorDb)\n const carIter = await storage.getCarStream(since)\n const carStream = byteIterableToStream(carIter)\n const closeDb = () => actorDb.close()\n carStream.on('error', closeDb)\n carStream.on('close', closeDb)\n return carStream\n } catch (err) {\n await actorDb.close()\n if (err instanceof RepoRootNotFoundError) {\n throw new InvalidRequestError(`Could not find repo for DID: ${did}`)\n }\n throw err\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=getRepoStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
1
+ {"version":3,"file":"getRepoStatus.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"getRepoStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AAEpF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;QACzC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,OAAO,GAAG,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;YAE5D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;YAEvD,IAAI,GAAG,GAAuB,SAAS,CAAA;YACvC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;gBACD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;YAChB,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,GAAG;oBACH,MAAM;oBACN,MAAM;oBACN,GAAG;iBACJ;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { formatAccountStatus } from '../../../../account-manager/account-manager.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRepoStatus, {\n handler: async ({ params }) => {\n const { did } = params\n const account = await assertRepoAvailability(ctx, did, true)\n\n const { active, status } = formatAccountStatus(account)\n\n let rev: string | undefined = undefined\n if (active) {\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRootDetailed(),\n )\n rev = root.rev\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n did,\n active,\n status,\n rev,\n },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"getRepoStatus.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/getRepoStatus.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AAEpF,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE;QACzC,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;YAC5B,MAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAA;YACtB,MAAM,OAAO,GAAG,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAA;YAE5D,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAA;YAEvD,IAAI,GAAG,GAAuB,SAAS,CAAA;YACvC,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACpD,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,CACrC,CAAA;gBACD,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;YAChB,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,GAAG;oBACH,MAAM;oBACN,MAAM;oBACN,GAAG;iBACJ;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport { formatAccountStatus } from '../../../../account-manager/account-manager.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.getRepoStatus, {\n handler: async ({ params }) => {\n const { did } = params\n const account = await assertRepoAvailability(ctx, did, true)\n\n const { active, status } = formatAccountStatus(account)\n\n let rev: string | undefined = undefined\n if (active) {\n const root = await ctx.actorStore.read(did, (store) =>\n store.repo.storage.getRootDetailed(),\n )\n rev = root.rev\n }\n\n return {\n encoding: 'application/json' as const,\n body: {\n did,\n active,\n status,\n rev,\n },\n }\n },\n })\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAanD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAYvD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAaxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAYvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAC7C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACtB,CAAC","sourcesContent":["import { Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport getCheckout from './deprecated/getCheckout.js'\nimport getHead from './deprecated/getHead.js'\nimport getBlob from './getBlob.js'\nimport getBlocks from './getBlocks.js'\nimport getLatestCommit from './getLatestCommit.js'\nimport getRecord from './getRecord.js'\nimport getRepo from './getRepo.js'\nimport getRepoStatus from './getRepoStatus.js'\nimport listBlobs from './listBlobs.js'\nimport listRepos from './listRepos.js'\nimport subscribeRepos from './subscribeRepos.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getBlob(server, ctx)\n getBlocks(server, ctx)\n getLatestCommit(server, ctx)\n getRepoStatus(server, ctx)\n getRecord(server, ctx)\n getRepo(server, ctx)\n subscribeRepos(server, ctx)\n listBlobs(server, ctx)\n listRepos(server, ctx)\n getCheckout(server, ctx)\n getHead(server, ctx)\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/index.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAC7C,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,eAAe,MAAM,sBAAsB,CAAA;AAClD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,aAAa,MAAM,oBAAoB,CAAA;AAC9C,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,SAAS,MAAM,gBAAgB,CAAA;AACtC,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,eAAe,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC5B,aAAa,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC1B,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACpB,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,SAAS,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACtB,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACxB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;AACtB,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport getCheckout from './deprecated/getCheckout.js'\nimport getHead from './deprecated/getHead.js'\nimport getBlob from './getBlob.js'\nimport getBlocks from './getBlocks.js'\nimport getLatestCommit from './getLatestCommit.js'\nimport getRecord from './getRecord.js'\nimport getRepo from './getRepo.js'\nimport getRepoStatus from './getRepoStatus.js'\nimport listBlobs from './listBlobs.js'\nimport listRepos from './listRepos.js'\nimport subscribeRepos from './subscribeRepos.js'\n\nexport default function (server: Server, ctx: AppContext) {\n getBlob(server, ctx)\n getBlocks(server, ctx)\n getLatestCommit(server, ctx)\n getRepoStatus(server, ctx)\n getRecord(server, ctx)\n getRepo(server, ctx)\n subscribeRepos(server, ctx)\n listBlobs(server, ctx)\n listRepos(server, ctx)\n getCheckout(server, ctx)\n getHead(server, ctx)\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import type { Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=listBlobs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAG7C,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyBvD"}
1
+ {"version":3,"file":"listBlobs.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAGlD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAyBvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"listBlobs.js","sourceRoot":"","sources":["../../../../../src/api/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proto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.listBlobs, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did, since, limit, cursor } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const blobCids = await ctx.actorStore.read(did, (store) =>\n store.repo.blob.listBlobs({ since, limit, cursor }),\n )\n\n return {\n encoding: 'application/json' as const,\n body: {\n cursor: blobCids.at(-1),\n cids: blobCids,\n },\n }\n },\n })\n}\n"]}
1
+ {"version":3,"file":"listBlobs.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listBlobs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAE5D,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAA;AAElD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE;QACrC,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,iCAAiC,CAAC;YACvD,UAAU,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC;YACjC,SAAS,EAAE,GAAG,EAAE;gBACd,eAAe;YACjB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE;YAClC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;YAC5C,MAAM,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;YAEhE,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,EAAE,EAAE,CACxD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CACpD,CAAA;YAED,OAAO;gBACL,QAAQ,EAAE,kBAA2B;gBACrC,IAAI,EAAE;oBACJ,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;oBACvB,IAAI,EAAE,QAAQ;iBACf;aACF,CAAA;QACH,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import type { Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { isUserOrAdmin } from '../../../../auth-verifier.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { assertRepoAvailability } from './util.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.listBlobs, {\n auth: ctx.authVerifier.authorizationOrAdminTokenOptional({\n additional: [AuthScope.Takendown],\n authorize: () => {\n // always allow\n },\n }),\n handler: async ({ params, auth }) => {\n const { did, since, limit, cursor } = params\n await assertRepoAvailability(ctx, did, isUserOrAdmin(auth, did))\n\n const blobCids = await ctx.actorStore.read(did, (store) =>\n store.repo.blob.listBlobs({ since, limit, cursor }),\n )\n\n return {\n encoding: 'application/json' as const,\n body: {\n cursor: blobCids.at(-1),\n cids: blobCids,\n },\n }\n },\n })\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
3
- import { Cursor, GenericKeyset } from '../../../../db/pagination.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
+ import { type Cursor, GenericKeyset } from '../../../../db/pagination.js';
4
4
  export default function (server: Server, ctx: AppContext): void;
5
5
  type TimeDidResult = {
6
6
  createdAt: string;
@@ -1 +1 @@
1
- {"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,aAAa,EAAY,MAAM,8BAA8B,CAAA;AAG9E,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2CvD;AAED,KAAK,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,qBAAa,aAAc,SAAQ,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC;IACrE,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAEzC;IACD,qBAAqB,CAAC,OAAO,EAAE,MAAM;QAEjC,OAAO;QACP,SAAS;MAEZ;IACD,qBAAqB,CAAC,MAAM,EAAE,MAAM;QAMhC,OAAO;QACP,SAAS;MAEZ;CACF"}
1
+ {"version":3,"file":"listRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,KAAK,MAAM,EACX,aAAa,EAEd,MAAM,8BAA8B,CAAA;AAGrC,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2CvD;AAED,KAAK,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,qBAAa,aAAc,SAAQ,aAAa,CAAC,aAAa,EAAE,MAAM,CAAC;IACrE,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAEzC;IACD,qBAAqB,CAAC,OAAO,EAAE,MAAM;QAEjC,OAAO;QACP,SAAS;MAEZ;IACD,qBAAqB,CAAC,MAAM,EAAE,MAAM;QAMhC,OAAO;QACP,SAAS;MAEZ;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { InvalidRequestError } from '@atproto/xrpc-server';
2
2
  import { formatAccountStatus } from '../../../../account-manager/account-manager.js';
3
- import { GenericKeyset, paginate } from '../../../../db/pagination.js';
3
+ import { GenericKeyset, paginate, } from '../../../../db/pagination.js';
4
4
  import { com } from '../../../../lexicons/index.js';
5
5
  export default function (server, ctx) {
6
6
  server.add(com.atproto.sync.listRepos, async ({ params }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AAEpF,OAAO,EAAU,aAAa,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QAChC,MAAM,EAAE,GAAG,GAAG,CAAC,cAAc,CAAC,EAA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C/B,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,CAAA;IAC7D,CAAC;IACD,qBAAqB,CAAC,OAAe;QACnC,OAAO;YACL,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YACvD,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAA;IACH,CAAC;IACD,qBAAqB,CAAC,MAAc;QAClC,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;QAC1D,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;QACnD,CAAC;QACD,OAAO;YACL,OAAO,EAAE,WAAW,CAAC,WAAW,EAAE;YAClC,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAA;IACH,CAAC;CACF","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { formatAccountStatus } from '../../../../account-manager/account-manager.js'\nimport { AppContext } from '../../../../context.js'\nimport { Cursor, GenericKeyset, paginate } from '../../../../db/pagination.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.listRepos, async ({ params }) => {\n const { limit, cursor } = params\n const db = ctx.accountManager.db\n const { ref } = db.db.dynamic\n let builder = db.db\n .selectFrom('actor')\n .innerJoin('repo_root', 'repo_root.did', 'actor.did')\n .select([\n 'actor.did as did',\n 'repo_root.cid as head',\n 'repo_root.rev as rev',\n 'actor.createdAt as createdAt',\n 'actor.deactivatedAt as deactivatedAt',\n 'actor.takedownRef as takedownRef',\n ])\n const keyset = new TimeDidKeyset(ref('actor.createdAt'), ref('actor.did'))\n builder = paginate(builder, {\n limit,\n cursor,\n keyset,\n direction: 'asc',\n tryIndex: true,\n })\n const res = await builder.execute()\n const repos = res.map((row): com.atproto.sync.listRepos.Repo => {\n const { active, status } = formatAccountStatus(row)\n return {\n did: row.did,\n head: row.head,\n rev: row.rev ?? '',\n active,\n status,\n }\n })\n return {\n encoding: 'application/json' as const,\n body: {\n cursor: keyset.packFromResult(res),\n repos,\n },\n }\n })\n}\n\ntype TimeDidResult = { createdAt: string; did: string }\n\nexport class TimeDidKeyset extends GenericKeyset<TimeDidResult, Cursor> {\n labelResult(result: TimeDidResult): Cursor {\n return { primary: result.createdAt, secondary: result.did }\n }\n labeledResultToCursor(labeled: Cursor) {\n return {\n primary: new Date(labeled.primary).getTime().toString(),\n secondary: labeled.secondary,\n }\n }\n cursorToLabeledResult(cursor: Cursor) {\n const primaryDate = new Date(parseInt(cursor.primary, 10))\n if (isNaN(primaryDate.getTime())) {\n throw new InvalidRequestError('Malformed cursor')\n }\n return {\n primary: primaryDate.toISOString(),\n secondary: cursor.secondary,\n }\n }\n}\n"]}
1
+ {"version":3,"file":"listRepos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/listRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAA;AAEpF,OAAO,EAEL,aAAa,EACb,QAAQ,GACT,MAAM,8BAA8B,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC1D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QAChC,MAAM,EAAE,GAAG,GAAG,CAAC,cAAc,CAAC,EAA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C/B,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,CAAA;IAC7D,CAAC;IACD,qBAAqB,CAAC,OAAe;QACnC,OAAO;YACL,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;YACvD,SAAS,EAAE,OAAO,CAAC,SAAS;SAC7B,CAAA;IACH,CAAC;IACD,qBAAqB,CAAC,MAAc;QAClC,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;QAC1D,IAAI,KAAK,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAAA;QACnD,CAAC;QACD,OAAO;YACL,OAAO,EAAE,WAAW,CAAC,WAAW,EAAE;YAClC,SAAS,EAAE,MAAM,CAAC,SAAS;SAC5B,CAAA;IACH,CAAC;CACF","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport { formatAccountStatus } from '../../../../account-manager/account-manager.js'\nimport type { AppContext } from '../../../../context.js'\nimport {\n type Cursor,\n GenericKeyset,\n paginate,\n} from '../../../../db/pagination.js'\nimport { com } from '../../../../lexicons/index.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.sync.listRepos, async ({ params }) => {\n const { limit, cursor } = params\n const db = ctx.accountManager.db\n const { ref } = db.db.dynamic\n let builder = db.db\n .selectFrom('actor')\n .innerJoin('repo_root', 'repo_root.did', 'actor.did')\n .select([\n 'actor.did as did',\n 'repo_root.cid as head',\n 'repo_root.rev as rev',\n 'actor.createdAt as createdAt',\n 'actor.deactivatedAt as deactivatedAt',\n 'actor.takedownRef as takedownRef',\n ])\n const keyset = new TimeDidKeyset(ref('actor.createdAt'), ref('actor.did'))\n builder = paginate(builder, {\n limit,\n cursor,\n keyset,\n direction: 'asc',\n tryIndex: true,\n })\n const res = await builder.execute()\n const repos = res.map((row): com.atproto.sync.listRepos.Repo => {\n const { active, status } = formatAccountStatus(row)\n return {\n did: row.did,\n head: row.head,\n rev: row.rev ?? '',\n active,\n status,\n }\n })\n return {\n encoding: 'application/json' as const,\n body: {\n cursor: keyset.packFromResult(res),\n repos,\n },\n }\n })\n}\n\ntype TimeDidResult = { createdAt: string; did: string }\n\nexport class TimeDidKeyset extends GenericKeyset<TimeDidResult, Cursor> {\n labelResult(result: TimeDidResult): Cursor {\n return { primary: result.createdAt, secondary: result.did }\n }\n labeledResultToCursor(labeled: Cursor) {\n return {\n primary: new Date(labeled.primary).getTime().toString(),\n secondary: labeled.secondary,\n }\n }\n cursorToLabeledResult(cursor: Cursor) {\n const primaryDate = new Date(parseInt(cursor.primary, 10))\n if (isNaN(primaryDate.getTime())) {\n throw new InvalidRequestError('Malformed cursor')\n }\n return {\n primary: primaryDate.toISOString(),\n secondary: cursor.secondary,\n }\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=subscribeRepos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKnD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAkEvD"}
1
+ {"version":3,"file":"subscribeRepos.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QAkEvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAU,MAAM,sBAAsB,CAAA;AAElE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;AAExD,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CACR,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAC/B,KAAK,SAAS,CAAC,EAAE,EACf,MAAM,EACN,MAAM,GACP;QACC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;QACzB,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE;YACvC,aAAa,EAAE,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS;SAC9C,CAAC,CAAA;QACF,UAAU,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,4CAA4C,CAAC,CAAA;QAEzE,MAAM,YAAY,GAAG,IAAI,IAAI,CAC3B,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,GAAG,CAAC,YAAY,CAAC,mBAAmB,CACtD,CAAC,WAAW,EAAE,CAAA;QACf,IAAI,YAAY,GAAuB,SAAS,CAAA;QAChD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,EAAE,IA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G,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC/B,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC;oBAChD,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAC,CAAA;YACJ,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC;oBACpD,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAC,CAAA;YACJ,CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBAClC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC;oBACnD,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC,CACF,CAAA;AACH,CAAC","sourcesContent":["import { InvalidRequestError, Server } from '@atproto/xrpc-server'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { httpLogger } from '../../../../logger.js'\nimport { Outbox } from '../../../../sequencer/outbox.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(\n com.atproto.sync.subscribeRepos,\n async function* ({\n params,\n signal,\n }): AsyncGenerator<com.atproto.sync.subscribeRepos.$Message> {\n const { cursor } = params\n const outbox = new Outbox(ctx.sequencer, {\n maxBufferSize: ctx.cfg.subscription.maxBuffer,\n })\n httpLogger.info({ cursor }, 'request to com.atproto.sync.subscribeRepos')\n\n const backfillTime = new Date(\n Date.now() - ctx.cfg.subscription.repoBackfillLimitMs,\n ).toISOString()\n let outboxCursor: number | undefined = undefined\n if (cursor !== undefined) {\n const [next, curr] = await Promise.all([\n ctx.sequencer.next(cursor),\n ctx.sequencer.curr(),\n ])\n if (cursor > (curr ?? 0)) {\n throw new InvalidRequestError('Cursor in the future.', 'FutureCursor')\n } else if (next && next.sequencedAt < backfillTime) {\n // if cursor is before backfill time, find earliest cursor from backfill window\n yield com.atproto.sync.subscribeRepos.info.$build({\n name: 'OutdatedCursor',\n message: 'Requested cursor exceeded limit. Possibly missing events',\n })\n const startEvt = await ctx.sequencer.earliestAfterTime(backfillTime)\n outboxCursor = startEvt?.seq ? startEvt.seq - 1 : undefined\n } else {\n outboxCursor = cursor\n }\n }\n\n for await (const evt of outbox.events(outboxCursor, signal)) {\n if (evt.type === 'commit') {\n yield com.atproto.sync.subscribeRepos.commit.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'sync') {\n yield com.atproto.sync.subscribeRepos.sync.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'identity') {\n yield com.atproto.sync.subscribeRepos.identity.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'account') {\n yield com.atproto.sync.subscribeRepos.account.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n }\n }\n },\n )\n}\n"]}
1
+ {"version":3,"file":"subscribeRepos.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/subscribeRepos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAe,MAAM,sBAAsB,CAAA;AAEvE,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAA;A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CAAC;iBAAM,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBAClC,MAAM,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,MAAM,CAAC;oBACnD,GAAG,EAAE,GAAG,CAAC,GAAG;oBACZ,IAAI,EAAE,GAAG,CAAC,IAAI;oBACd,GAAG,GAAG,CAAC,GAAG;iBACX,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;IACH,CAAC,CACF,CAAA;AACH,CAAC","sourcesContent":["import { InvalidRequestError, type Server } from '@atproto/xrpc-server'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\nimport { httpLogger } from '../../../../logger.js'\nimport { Outbox } from '../../../../sequencer/outbox.js'\n\nexport default function (server: Server, ctx: AppContext) {\n server.add(\n com.atproto.sync.subscribeRepos,\n async function* ({\n params,\n signal,\n }): AsyncGenerator<com.atproto.sync.subscribeRepos.$Message> {\n const { cursor } = params\n const outbox = new Outbox(ctx.sequencer, {\n maxBufferSize: ctx.cfg.subscription.maxBuffer,\n })\n httpLogger.info({ cursor }, 'request to com.atproto.sync.subscribeRepos')\n\n const backfillTime = new Date(\n Date.now() - ctx.cfg.subscription.repoBackfillLimitMs,\n ).toISOString()\n let outboxCursor: number | undefined = undefined\n if (cursor !== undefined) {\n const [next, curr] = await Promise.all([\n ctx.sequencer.next(cursor),\n ctx.sequencer.curr(),\n ])\n if (cursor > (curr ?? 0)) {\n throw new InvalidRequestError('Cursor in the future.', 'FutureCursor')\n } else if (next && next.sequencedAt < backfillTime) {\n // if cursor is before backfill time, find earliest cursor from backfill window\n yield com.atproto.sync.subscribeRepos.info.$build({\n name: 'OutdatedCursor',\n message: 'Requested cursor exceeded limit. Possibly missing events',\n })\n const startEvt = await ctx.sequencer.earliestAfterTime(backfillTime)\n outboxCursor = startEvt?.seq ? startEvt.seq - 1 : undefined\n } else {\n outboxCursor = cursor\n }\n }\n\n for await (const evt of outbox.events(outboxCursor, signal)) {\n if (evt.type === 'commit') {\n yield com.atproto.sync.subscribeRepos.commit.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'sync') {\n yield com.atproto.sync.subscribeRepos.sync.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'identity') {\n yield com.atproto.sync.subscribeRepos.identity.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n } else if (evt.type === 'account') {\n yield com.atproto.sync.subscribeRepos.account.$build({\n seq: evt.seq,\n time: evt.time,\n ...evt.evt,\n })\n }\n }\n },\n )\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { AtIdentifierString } from '@atproto/syntax';
2
- import { ActorAccount } from '../../../../account-manager/helpers/account.js';
3
- import { AppContext } from '../../../../context.js';
1
+ import type { AtIdentifierString } from '@atproto/syntax';
2
+ import type { ActorAccount } from '../../../../account-manager/helpers/account.js';
3
+ import type { AppContext } from '../../../../context.js';
4
4
  export declare const assertRepoAvailability: (ctx: AppContext, handleOrDid: AtIdentifierString, isAdminOrSelf: boolean) => Promise<ActorAccount>;
5
5
  //# sourceMappingURL=util.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAEnD,eAAO,MAAM,sBAAsB,QAC5B,UAAU,eACF,kBAAkB,iBAChB,OAAO,KACrB,OAAO,CAAC,YAAY,CA2BtB,CAAA"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD,eAAO,MAAM,sBAAsB,QAC5B,UAAU,eACF,kBAAkB,iBAChB,OAAO,KACrB,OAAO,CAAC,YAAY,CA2BtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,GAAe,EACf,WAA+B,EAC/B,aAAsB,EACC,EAAE;IACzB,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,EAAE;QAC/D,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAA;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,WAAW,EAAE,EAC7C,cAAc,CACf,CAAA;IACH,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,OAAO,CAAA;IAChB,CAAC;IACD,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,WAAW,EAAE,EACzC,eAAe,CAChB,CAAA;IACH,CAAC;IACD,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,MAAM,IAAI,mBAAmB,CAC3B,8BAA8B,WAAW,EAAE,EAC3C,iBAAiB,CAClB,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import { AtIdentifierString } from '@atproto/syntax'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport { ActorAccount } from '../../../../account-manager/helpers/account.js'\nimport { AppContext } from '../../../../context.js'\n\nexport const assertRepoAvailability = async (\n ctx: AppContext,\n handleOrDid: AtIdentifierString,\n isAdminOrSelf: boolean,\n): Promise<ActorAccount> => {\n const account = await ctx.accountManager.getAccount(handleOrDid, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n throw new InvalidRequestError(\n `Could not find repo for DID: ${handleOrDid}`,\n 'RepoNotFound',\n )\n }\n if (isAdminOrSelf) {\n return account\n }\n if (account.takedownRef) {\n throw new InvalidRequestError(\n `Repo has been takendown: ${handleOrDid}`,\n 'RepoTakendown',\n )\n }\n if (account.deactivatedAt) {\n throw new InvalidRequestError(\n `Repo has been deactivated: ${handleOrDid}`,\n 'RepoDeactivated',\n )\n }\n return account\n}\n"]}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/sync/util.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI1D,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACzC,GAAe,EACf,WAA+B,EAC/B,aAAsB,EACC,EAAE;IACzB,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,WAAW,EAAE;QAC/D,kBAAkB,EAAE,IAAI;QACxB,gBAAgB,EAAE,IAAI;KACvB,CAAC,CAAA;IACF,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,mBAAmB,CAC3B,gCAAgC,WAAW,EAAE,EAC7C,cAAc,CACf,CAAA;IACH,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,OAAO,CAAA;IAChB,CAAC;IACD,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACxB,MAAM,IAAI,mBAAmB,CAC3B,4BAA4B,WAAW,EAAE,EACzC,eAAe,CAChB,CAAA;IACH,CAAC;IACD,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC1B,MAAM,IAAI,mBAAmB,CAC3B,8BAA8B,WAAW,EAAE,EAC3C,iBAAiB,CAClB,CAAA;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA","sourcesContent":["import type { AtIdentifierString } from '@atproto/syntax'\nimport { InvalidRequestError } from '@atproto/xrpc-server'\nimport type { ActorAccount } from '../../../../account-manager/helpers/account.js'\nimport type { AppContext } from '../../../../context.js'\n\nexport const assertRepoAvailability = async (\n ctx: AppContext,\n handleOrDid: AtIdentifierString,\n isAdminOrSelf: boolean,\n): Promise<ActorAccount> => {\n const account = await ctx.accountManager.getAccount(handleOrDid, {\n includeDeactivated: true,\n includeTakenDown: true,\n })\n if (!account) {\n throw new InvalidRequestError(\n `Could not find repo for DID: ${handleOrDid}`,\n 'RepoNotFound',\n )\n }\n if (isAdminOrSelf) {\n return account\n }\n if (account.takedownRef) {\n throw new InvalidRequestError(\n `Repo has been takendown: ${handleOrDid}`,\n 'RepoTakendown',\n )\n }\n if (account.deactivatedAt) {\n throw new InvalidRequestError(\n `Repo has been deactivated: ${handleOrDid}`,\n 'RepoDeactivated',\n )\n }\n return account\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Server } from '@atproto/xrpc-server';
2
- import { AppContext } from '../../../../context.js';
1
+ import { type Server } from '@atproto/xrpc-server';
2
+ import type { AppContext } from '../../../../context.js';
3
3
  export default function (server: Server, ctx: AppContext): void;
4
4
  //# sourceMappingURL=checkSignupQueue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkSignupQueue.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAInD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
1
+ {"version":3,"file":"checkSignupQueue.d.ts","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAIxD,MAAM,CAAC,OAAO,WAAW,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,QA2BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkSignupQueue.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAU,MAAM,sBAAsB,CAAA;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,sCAAsC;AACtC,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,UAAU,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC;YACpC,SAAS,EAAE,GAAG,EAAE;gBACd,MAAM,IAAI,cAAc,CACtB,uDAAuD,CACxD,CAAA;YACH,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;gBACxB,OAAO;oBACL,QAAQ,EAAE,kBAA2B;oBACrC,IAAI,EAAE;wBACJ,SAAS,EAAE,IAAI;qBAChB;iBACF,CAAA;YACH,CAAC;YAED,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;YAEpD,OAAO,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;gBAChE,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { ForbiddenError, Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\n// THIS IS A TEMPORARY UNSPECCED ROUTE\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.temp.checkSignupQueue, {\n auth: ctx.authVerifier.authorization({\n additional: [AuthScope.SignupQueued],\n authorize: () => {\n throw new ForbiddenError(\n 'OAuth credentials are not supported for this endpoint',\n )\n },\n }),\n handler: async ({ req }) => {\n if (!ctx.entrywayClient) {\n return {\n encoding: 'application/json' as const,\n body: {\n activated: true,\n },\n }\n }\n\n const { headers } = ctx.entrywayPassthruHeaders(req)\n\n return ctx.entrywayClient.xrpc(com.atproto.temp.checkSignupQueue, {\n headers,\n })\n },\n })\n}\n"]}
1
+ {"version":3,"file":"checkSignupQueue.js","sourceRoot":"","sources":["../../../../../src/api/com/atproto/temp/checkSignupQueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAe,MAAM,sBAAsB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,+BAA+B,CAAA;AAEnD,sCAAsC;AACtC,MAAM,CAAC,OAAO,WAAW,MAAc,EAAE,GAAe;IACtD,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;QAC5C,IAAI,EAAE,GAAG,CAAC,YAAY,CAAC,aAAa,CAAC;YACnC,UAAU,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC;YACpC,SAAS,EAAE,GAAG,EAAE;gBACd,MAAM,IAAI,cAAc,CACtB,uDAAuD,CACxD,CAAA;YACH,CAAC;SACF,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE;YACzB,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC;gBACxB,OAAO;oBACL,QAAQ,EAAE,kBAA2B;oBACrC,IAAI,EAAE;wBACJ,SAAS,EAAE,IAAI;qBAChB;iBACF,CAAA;YACH,CAAC;YAED,MAAM,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAA;YAEpD,OAAO,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE;gBAChE,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { ForbiddenError, type Server } from '@atproto/xrpc-server'\nimport { AuthScope } from '../../../../auth-scope.js'\nimport type { AppContext } from '../../../../context.js'\nimport { com } from '../../../../lexicons/index.js'\n\n// THIS IS A TEMPORARY UNSPECCED ROUTE\nexport default function (server: Server, ctx: AppContext) {\n server.add(com.atproto.temp.checkSignupQueue, {\n auth: ctx.authVerifier.authorization({\n additional: [AuthScope.SignupQueued],\n authorize: () => {\n throw new ForbiddenError(\n 'OAuth credentials are not supported for this endpoint',\n )\n },\n }),\n handler: async ({ req }) => {\n if (!ctx.entrywayClient) {\n return {\n encoding: 'application/json' as const,\n body: {\n activated: true,\n },\n }\n }\n\n const { headers } = ctx.entrywayPassthruHeaders(req)\n\n return ctx.entrywayClient.xrpc(com.atproto.temp.checkSignupQueue, {\n headers,\n })\n },\n })\n}\n"]}