fedipod-server 0.29.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/README.md +16 -6
  2. package/dist/claims.d.ts +2 -0
  3. package/dist/claims.js +13 -4
  4. package/dist/door.d.ts +4 -0
  5. package/dist/door.js +31 -0
  6. package/dist/fedipod.d.ts +15 -0
  7. package/dist/fedipod.js +13 -0
  8. package/dist/front.d.ts +3 -0
  9. package/dist/front.js +92 -0
  10. package/dist/handler.d.ts +36 -101
  11. package/dist/handler.js +93 -644
  12. package/dist/handler.jsonld +2 -30
  13. package/dist/identities.d.ts +71 -0
  14. package/dist/identities.js +236 -0
  15. package/dist/mounts.d.ts +43 -0
  16. package/dist/mounts.js +123 -0
  17. package/dist/opt-in.d.ts +46 -0
  18. package/dist/opt-in.js +176 -0
  19. package/dist/private-read.d.ts +4 -0
  20. package/dist/private-read.js +34 -0
  21. package/package.json +12 -20
  22. package/lib/client/c2s.mjs +0 -636
  23. package/lib/client/localapi.mjs +0 -87
  24. package/lib/client/masto/accounts.mjs +0 -310
  25. package/lib/client/masto/body.mjs +0 -156
  26. package/lib/client/masto/index.mjs +0 -206
  27. package/lib/client/masto/instance.mjs +0 -112
  28. package/lib/client/masto/media.mjs +0 -79
  29. package/lib/client/masto/oauth.mjs +0 -656
  30. package/lib/client/masto/render.mjs +0 -518
  31. package/lib/client/masto/statuses.mjs +0 -372
  32. package/lib/client/masto/timelines.mjs +0 -438
  33. package/lib/client/oidc-auth.mjs +0 -62
  34. package/lib/client/streaming.mjs +0 -154
  35. package/lib/client/webpush.mjs +0 -98
  36. package/lib/connections/acctfeed.mjs +0 -257
  37. package/lib/connections/atproto.mjs +0 -309
  38. package/lib/connections/bskyfeed.mjs +0 -243
  39. package/lib/connections/bskygroup.mjs +0 -162
  40. package/lib/connections/fediacct.mjs +0 -253
  41. package/lib/connections/import.mjs +0 -357
  42. package/lib/connections/tagfeed.mjs +0 -212
  43. package/lib/connections/vault.mjs +0 -114
  44. package/lib/core/as2.mjs +0 -206
  45. package/lib/core/contexts/activitystreams.json +0 -379
  46. package/lib/core/contexts/anno.json +0 -126
  47. package/lib/core/contexts/did-v1.json +0 -57
  48. package/lib/core/contexts/fep-5711.json +0 -36
  49. package/lib/core/contexts/gotosocial.json +0 -86
  50. package/lib/core/contexts/identity-v1.json +0 -152
  51. package/lib/core/contexts/index.mjs +0 -63
  52. package/lib/core/contexts/join-lemmy.json +0 -33
  53. package/lib/core/contexts/joinmastodon.json +0 -28
  54. package/lib/core/contexts/litepub-0.1.json +0 -60
  55. package/lib/core/contexts/map.json +0 -19
  56. package/lib/core/contexts/miscellany.json +0 -19
  57. package/lib/core/contexts/quotes.json +0 -18
  58. package/lib/core/contexts/schemaorg.json +0 -8845
  59. package/lib/core/contexts/security-data-integrity-v1.json +0 -78
  60. package/lib/core/contexts/security-data-integrity-v2.json +0 -81
  61. package/lib/core/contexts/security-multikey-v1.json +0 -35
  62. package/lib/core/contexts/security-v1.json +0 -74
  63. package/lib/core/contexts/webfinger.json +0 -10
  64. package/lib/core/deliver.mjs +0 -387
  65. package/lib/core/graphview.mjs +0 -327
  66. package/lib/core/intake/activities.mjs +0 -649
  67. package/lib/core/intake/activity.mjs +0 -318
  68. package/lib/core/intake/channel.mjs +0 -144
  69. package/lib/core/intake/group.mjs +0 -258
  70. package/lib/core/intake/index.mjs +0 -732
  71. package/lib/core/intake/notes.mjs +0 -367
  72. package/lib/core/intake/verify.mjs +0 -142
  73. package/lib/core/keys.mjs +0 -153
  74. package/lib/core/lease.mjs +0 -206
  75. package/lib/core/place.mjs +0 -82
  76. package/lib/core/polls.mjs +0 -105
  77. package/lib/core/profile-page.mjs +0 -104
  78. package/lib/core/proof.mjs +0 -79
  79. package/lib/core/publisher/collections.mjs +0 -272
  80. package/lib/core/publisher/index.mjs +0 -522
  81. package/lib/core/publisher/notes.mjs +0 -519
  82. package/lib/core/publisher/own.mjs +0 -143
  83. package/lib/core/publisher/questions.mjs +0 -241
  84. package/lib/core/publisher/restore.mjs +0 -224
  85. package/lib/core/shapes/activitystreams.ttl +0 -157
  86. package/lib/core/shapes/index.mjs +0 -132
  87. package/lib/core/shapes/shapes-text.mjs +0 -13
  88. package/lib/core/social.mjs +0 -561
  89. package/lib/core/storage.mjs +0 -176
  90. package/lib/core/store.mjs +0 -578
  91. package/lib/core/wire-quotes.mjs +0 -71
  92. package/lib/core/wire.mjs +0 -925
  93. package/lib/device/account.mjs +0 -87
  94. package/lib/device/admin/index.mjs +0 -13
  95. package/lib/device/admin/origins.mjs +0 -35
  96. package/lib/device/admin/routes/connections.mjs +0 -144
  97. package/lib/device/admin/routes/gateway.mjs +0 -199
  98. package/lib/device/admin/routes/lifecycle.mjs +0 -200
  99. package/lib/device/admin/routes/owner.mjs +0 -322
  100. package/lib/device/admin/routes/setup.mjs +0 -428
  101. package/lib/device/admin/routes/social.mjs +0 -188
  102. package/lib/device/admin/server.mjs +0 -95
  103. package/lib/device/admin/static.mjs +0 -247
  104. package/lib/device/admin/surface.mjs +0 -315
  105. package/lib/device/certs.mjs +0 -281
  106. package/lib/device/cli/commands/account.mjs +0 -586
  107. package/lib/device/cli/commands/run.mjs +0 -278
  108. package/lib/device/cli/commands/service.mjs +0 -221
  109. package/lib/device/cli/commands/setup.mjs +0 -489
  110. package/lib/device/cli/commands/state.mjs +0 -561
  111. package/lib/device/cli/context.mjs +0 -288
  112. package/lib/device/export-collections.mjs +0 -161
  113. package/lib/device/gateway-move.mjs +0 -58
  114. package/lib/device/home.mjs +0 -161
  115. package/lib/device/migrate.mjs +0 -115
  116. package/lib/device/ports.mjs +0 -27
  117. package/lib/device/remote.mjs +0 -54
  118. package/lib/device/setup.mjs +0 -496
  119. package/lib/device/update.mjs +0 -96
  120. package/lib/gateway/caches.mjs +0 -36
  121. package/lib/gateway/directory.mjs +0 -90
  122. package/lib/gateway/front-core.mjs +0 -966
  123. package/lib/gateway/gateway-core.mjs +0 -244
  124. package/lib/gateway/headers.mjs +0 -49
  125. package/lib/gateway/httpsig.mjs +0 -159
  126. package/lib/gateway/notices.mjs +0 -84
  127. package/lib/gateway/quiet.mjs +0 -189
  128. package/lib/gateway/relay-extras.mjs +0 -89
  129. package/lib/gateway/token-claims.mjs +0 -16
  130. package/lib/pod/README.md +0 -61
  131. package/lib/pod/actor.mjs +0 -96
  132. package/lib/pod/collection.mjs +0 -77
  133. package/lib/pod/containers.mjs +0 -140
  134. package/lib/pod/discovery.mjs +0 -46
  135. package/lib/pod/featured.mjs +0 -18
  136. package/lib/pod/followers.mjs +0 -24
  137. package/lib/pod/following.mjs +0 -10
  138. package/lib/pod/http.mjs +0 -74
  139. package/lib/pod/inbox.mjs +0 -166
  140. package/lib/pod/links.mjs +0 -35
  141. package/lib/pod/location.mjs +0 -52
  142. package/lib/pod/media.mjs +0 -27
  143. package/lib/pod/notes.mjs +0 -78
  144. package/lib/pod/notifications.mjs +0 -89
  145. package/lib/pod/outbox.mjs +0 -18
  146. package/lib/pod/package.json +0 -19
  147. package/lib/pod/policy.mjs +0 -58
  148. package/lib/pod/private.mjs +0 -19
  149. package/lib/pod/root.mjs +0 -104
  150. package/lib/pod/state.mjs +0 -40
  151. package/lib/pod/transport.mjs +0 -674
  152. package/lib/pod/type-index.mjs +0 -101
  153. package/lib/pod/urls.mjs +0 -91
  154. package/lib/server/embed.mjs +0 -424
  155. package/lib/session/README.md +0 -137
  156. package/lib/session/demo.html +0 -94
  157. package/lib/session/fedi-account.mjs +0 -417
  158. package/lib/session/fedi-login.mjs +0 -123
  159. package/lib/session/oidc-session.mjs +0 -233
  160. package/lib/session/package.json +0 -49
  161. package/lib/shared/guard.mjs +0 -213
  162. package/lib/shared/links.mjs +0 -9
  163. package/lib/shared/safefetch.mjs +0 -235
  164. package/lib/shared/ua.mjs +0 -29
  165. package/phanpy/dist/404.html +0 -40
  166. package/phanpy/dist/_headers +0 -2
  167. package/phanpy/dist/apple-touch-icon.png +0 -0
  168. package/phanpy/dist/assets/ICONS-DIPJeU0C.js +0 -2
  169. package/phanpy/dist/assets/ICONS-DIPJeU0C.js.map +0 -1
  170. package/phanpy/dist/assets/ScheduledAtField-D-Abfo4J.js +0 -183
  171. package/phanpy/dist/assets/ScheduledAtField-D-Abfo4J.js.map +0 -1
  172. package/phanpy/dist/assets/Temml-CCjoacWt.woff2 +0 -0
  173. package/phanpy/dist/assets/__vite-browser-external-C7iut881.js +0 -2
  174. package/phanpy/dist/assets/__vite-browser-external-C7iut881.js.map +0 -1
  175. package/phanpy/dist/assets/boosts-carousel-BiOaNdMT.jpg +0 -0
  176. package/phanpy/dist/assets/catch-up-O5q5C75Z.png +0 -0
  177. package/phanpy/dist/assets/chunk-aKtaBQYM.js +0 -1
  178. package/phanpy/dist/assets/compose-CFEx7wb4.js +0 -2
  179. package/phanpy/dist/assets/compose-CFEx7wb4.js.map +0 -1
  180. package/phanpy/dist/assets/compose-ZJN5xSb4.js +0 -35
  181. package/phanpy/dist/assets/compose-ZJN5xSb4.js.map +0 -1
  182. package/phanpy/dist/assets/debug.module-YFQgwnIr.js +0 -52
  183. package/phanpy/dist/assets/debug.module-YFQgwnIr.js.map +0 -1
  184. package/phanpy/dist/assets/dom-p1YcJ5Rw.js +0 -2
  185. package/phanpy/dist/assets/dom-p1YcJ5Rw.js.map +0 -1
  186. package/phanpy/dist/assets/home-mobile-dark@2x-Dc-J8-SM.png +0 -0
  187. package/phanpy/dist/assets/home-mobile-light@2x-Bd3fod8m.png +0 -0
  188. package/phanpy/dist/assets/home-tablet-dark@2x-BgcNI8le.png +0 -0
  189. package/phanpy/dist/assets/home-tablet-light@2x-BW2RV9T6.png +0 -0
  190. package/phanpy/dist/assets/icons/add-circle-line-WD0mwORD.js +0 -1
  191. package/phanpy/dist/assets/icons/alert-line-CpFUMf9s.js +0 -1
  192. package/phanpy/dist/assets/icons/android-2-line-Bzxnrd3S.js +0 -1
  193. package/phanpy/dist/assets/icons/announcement-line-5nwaJFJm.js +0 -1
  194. package/phanpy/dist/assets/icons/arrow-down-circle-line-a7Id9-Iv.js +0 -1
  195. package/phanpy/dist/assets/icons/arrow-down-line-B8uzXzq6.js +0 -1
  196. package/phanpy/dist/assets/icons/arrow-left-line-CGrGT9C-.js +0 -1
  197. package/phanpy/dist/assets/icons/arrow-right-line-CE-HERfX.js +0 -1
  198. package/phanpy/dist/assets/icons/arrow-to-up-line-CvdQjmcy.js +0 -1
  199. package/phanpy/dist/assets/icons/arrow-up-circle-line-DEparSNF.js +0 -1
  200. package/phanpy/dist/assets/icons/arrow-up-line-C7yBeugc.js +0 -1
  201. package/phanpy/dist/assets/icons/arrows-right-line-BtbXmJGP.js +0 -1
  202. package/phanpy/dist/assets/icons/at-line-CF66Bznk.js +0 -1
  203. package/phanpy/dist/assets/icons/attachment-line-BY8It-l9.js +0 -1
  204. package/phanpy/dist/assets/icons/blockquote-line-BS6pU_hm.js +0 -1
  205. package/phanpy/dist/assets/icons/board-line-C0UWXyA6.js +0 -1
  206. package/phanpy/dist/assets/icons/bookmark-line-1CtX5JLF.js +0 -1
  207. package/phanpy/dist/assets/icons/building-5-line-Dd59MzbO.js +0 -1
  208. package/phanpy/dist/assets/icons/bus-2-line-6_dvA0GG.js +0 -1
  209. package/phanpy/dist/assets/icons/calendar-day-line-Crpl_fmu.js +0 -1
  210. package/phanpy/dist/assets/icons/calendar-month-line-vommts2C.js +0 -1
  211. package/phanpy/dist/assets/icons/calendar-time-add-line-BU_DTlQk.js +0 -1
  212. package/phanpy/dist/assets/icons/camera-line-Cv69MEei.js +0 -1
  213. package/phanpy/dist/assets/icons/celebrate-line-B8DvIoi0.js +0 -1
  214. package/phanpy/dist/assets/icons/chart-bar-line-FK-QOmtF.js +0 -1
  215. package/phanpy/dist/assets/icons/chart-line-line-BGcJAFWw.js +0 -1
  216. package/phanpy/dist/assets/icons/chat-3-line-YFK2-hwz.js +0 -1
  217. package/phanpy/dist/assets/icons/check-circle-line-DsAxFr5-.js +0 -1
  218. package/phanpy/dist/assets/icons/clipboard-line-BBp364gJ.js +0 -1
  219. package/phanpy/dist/assets/icons/close-circle-line-CICdiuGz.js +0 -1
  220. package/phanpy/dist/assets/icons/close-line-DYrFWcjv.js +0 -1
  221. package/phanpy/dist/assets/icons/cloud-line-tiQAbah8.js +0 -1
  222. package/phanpy/dist/assets/icons/code-line-fAl8iiV3.js +0 -1
  223. package/phanpy/dist/assets/icons/comment-2-line-CR3g7WeB.js +0 -1
  224. package/phanpy/dist/assets/icons/copy-2-line-CLW69yF5.js +0 -1
  225. package/phanpy/dist/assets/icons/delete-2-line-B8xmbr4n.js +0 -1
  226. package/phanpy/dist/assets/icons/document-3-line-DBGNhAg2.js +0 -1
  227. package/phanpy/dist/assets/icons/document-line-C7mb9sb7.js +0 -1
  228. package/phanpy/dist/assets/icons/down-line-BGqSSThd.js +0 -1
  229. package/phanpy/dist/assets/icons/edit-4-line-DcgGaEhx.js +0 -1
  230. package/phanpy/dist/assets/icons/emoji-2-line-D8YgnM-y.js +0 -1
  231. package/phanpy/dist/assets/icons/exit-line-Dc07BS-x.js +0 -1
  232. package/phanpy/dist/assets/icons/external-link-line-BvpSkmjO.js +0 -1
  233. package/phanpy/dist/assets/icons/eye-2-line-CiWXx-f_.js +0 -1
  234. package/phanpy/dist/assets/icons/eye-close-line-BgTaSJ4P.js +0 -1
  235. package/phanpy/dist/assets/icons/filter-2-line-B_mR2usy.js +0 -1
  236. package/phanpy/dist/assets/icons/filter-line-C_nm-3cU.js +0 -1
  237. package/phanpy/dist/assets/icons/flag-1-line-C2HB05I0.js +0 -1
  238. package/phanpy/dist/assets/icons/forbid-circle-line-D3LTT9yd.js +0 -1
  239. package/phanpy/dist/assets/icons/formula-line-DLrt2d6j.js +0 -1
  240. package/phanpy/dist/assets/icons/grid-line-CgUmEikf.js +0 -1
  241. package/phanpy/dist/assets/icons/group-line-C5fnX0wU.js +0 -1
  242. package/phanpy/dist/assets/icons/hand-finger-2-line-BGgxbuL9.js +0 -1
  243. package/phanpy/dist/assets/icons/hashtag-line-CyTEEXBb.js +0 -1
  244. package/phanpy/dist/assets/icons/heart-crack-line-BZddbO2C.js +0 -1
  245. package/phanpy/dist/assets/icons/heart-line-CJ7K47J4.js +0 -1
  246. package/phanpy/dist/assets/icons/history-2-line-kWWvFzqv.js +0 -1
  247. package/phanpy/dist/assets/icons/history-line-bGQiwbTH.js +0 -1
  248. package/phanpy/dist/assets/icons/home-3-line-fRU1zeLG.js +0 -1
  249. package/phanpy/dist/assets/icons/information-line-iNk6-sOY.js +0 -1
  250. package/phanpy/dist/assets/icons/keyboard-line-DsCyuQNz.js +0 -1
  251. package/phanpy/dist/assets/icons/layout-4-line-CZkOX52Z.js +0 -1
  252. package/phanpy/dist/assets/icons/layout-5-line-B_znt5wO.js +0 -1
  253. package/phanpy/dist/assets/icons/left-line-eUw0tya4.js +0 -1
  254. package/phanpy/dist/assets/icons/lightning-line-DaKoDdix.js +0 -1
  255. package/phanpy/dist/assets/icons/link-2-line-DCqLmMA7.js +0 -1
  256. package/phanpy/dist/assets/icons/list-check-line-BAxosBh9.js +0 -1
  257. package/phanpy/dist/assets/icons/lock-line-CPoaXeUW.js +0 -1
  258. package/phanpy/dist/assets/icons/mail-line-B0P8aa1L.js +0 -1
  259. package/phanpy/dist/assets/icons/moon-line-CEqNAToP.js +0 -1
  260. package/phanpy/dist/assets/icons/more-1-fill-Dw2e5xab.js +0 -1
  261. package/phanpy/dist/assets/icons/more-3-line-BIiVjYTz.js +0 -1
  262. package/phanpy/dist/assets/icons/notification-line-BZZq2Gtu.js +0 -1
  263. package/phanpy/dist/assets/icons/pencil-line-CKh8-A1v.js +0 -1
  264. package/phanpy/dist/assets/icons/photo-album-line-Bnfg2u40.js +0 -1
  265. package/phanpy/dist/assets/icons/pin-line-DpTolyhs.js +0 -1
  266. package/phanpy/dist/assets/icons/play-fill-B0-G_8lX.js +0 -1
  267. package/phanpy/dist/assets/icons/qrcode-2-line-B6SPCaHn.js +0 -1
  268. package/phanpy/dist/assets/icons/quill-pen-line-B6LUrnCP.js +0 -1
  269. package/phanpy/dist/assets/icons/quote-left-fill-hQZ1cj_6.js +0 -1
  270. package/phanpy/dist/assets/icons/radar-line-CKyroTth.js +0 -1
  271. package/phanpy/dist/assets/icons/react-line-CoIKhhtK.js +0 -1
  272. package/phanpy/dist/assets/icons/refresh-2-line-D0mTF97S.js +0 -1
  273. package/phanpy/dist/assets/icons/right-line-B3KWJaqc.js +0 -1
  274. package/phanpy/dist/assets/icons/rocket-line-4KZl537D.js +0 -1
  275. package/phanpy/dist/assets/icons/round-fill-C69NTrZ0.js +0 -1
  276. package/phanpy/dist/assets/icons/round-line-B9k_1uo-.js +0 -1
  277. package/phanpy/dist/assets/icons/route-line-B28ReHcE.js +0 -1
  278. package/phanpy/dist/assets/icons/rows-4-line-CrBniagM.js +0 -1
  279. package/phanpy/dist/assets/icons/scan-line-DSf74YdP.js +0 -1
  280. package/phanpy/dist/assets/icons/search-2-line-B6geIU1z.js +0 -1
  281. package/phanpy/dist/assets/icons/settings-3-line-azJwK47w.js +0 -1
  282. package/phanpy/dist/assets/icons/settings-6-line-C_5zc5YR.js +0 -1
  283. package/phanpy/dist/assets/icons/share-2-line-D5MxWjrm.js +0 -1
  284. package/phanpy/dist/assets/icons/share-forward-line-Cp61fZzZ.js +0 -1
  285. package/phanpy/dist/assets/icons/sparkles-2-line-DYYyXTaW.js +0 -1
  286. package/phanpy/dist/assets/icons/sparkles-line-C2hY1s6I.js +0 -1
  287. package/phanpy/dist/assets/icons/time-line-BF3eet1v.js +0 -1
  288. package/phanpy/dist/assets/icons/transfer-4-line-oisfvTBw.js +0 -1
  289. package/phanpy/dist/assets/icons/translate-line-BFWol2Ce.js +0 -1
  290. package/phanpy/dist/assets/icons/unlock-line-X_x5vwv3.js +0 -1
  291. package/phanpy/dist/assets/icons/upload-3-line-DgzwUJeW.js +0 -1
  292. package/phanpy/dist/assets/icons/user-4-line-BVSynZCp.js +0 -1
  293. package/phanpy/dist/assets/icons/user-add-2-line-BlGS5Q8q.js +0 -1
  294. package/phanpy/dist/assets/icons/user-add-line-BbXdHG4z.js +0 -1
  295. package/phanpy/dist/assets/icons/user-edit-line-BFAHOV0X.js +0 -1
  296. package/phanpy/dist/assets/icons/user-follow-line-BXux0wSd.js +0 -1
  297. package/phanpy/dist/assets/icons/user-star-line-DdYlpHLU.js +0 -1
  298. package/phanpy/dist/assets/icons/user-warning-line-Cj43j0_E.js +0 -1
  299. package/phanpy/dist/assets/icons/user-x-line-DIDgNlPH.js +0 -1
  300. package/phanpy/dist/assets/icons/volume-line-Bs390KQt.js +0 -1
  301. package/phanpy/dist/assets/icons/volume-mute-line-DzlzIqFZ.js +0 -1
  302. package/phanpy/dist/assets/icons/walk-line-yNXfB-md.js +0 -1
  303. package/phanpy/dist/assets/icons/world-2-line-CenkGIwj.js +0 -1
  304. package/phanpy/dist/assets/icons/zoom-in-line-CaENUphf.js +0 -1
  305. package/phanpy/dist/assets/icons/zoom-out-line-BDNk0EWo.js +0 -1
  306. package/phanpy/dist/assets/instances-BNPptnn-.json +0 -333
  307. package/phanpy/dist/assets/locales/ar-SA-CfheRbCu.js +0 -1
  308. package/phanpy/dist/assets/locales/ca-ES-DHRW86Tz.js +0 -1
  309. package/phanpy/dist/assets/locales/cs-CZ-CKoqEuA1.js +0 -1
  310. package/phanpy/dist/assets/locales/de-DE-ByRPMRFy.js +0 -1
  311. package/phanpy/dist/assets/locales/eo-UY-CPC7wLCS.js +0 -1
  312. package/phanpy/dist/assets/locales/es-ES-dJa0Fd9t.js +0 -1
  313. package/phanpy/dist/assets/locales/eu-ES-C3djlPR2.js +0 -1
  314. package/phanpy/dist/assets/locales/fa-IR-DTT490Ck.js +0 -1
  315. package/phanpy/dist/assets/locales/fi-FI-B23MCPuz.js +0 -1
  316. package/phanpy/dist/assets/locales/fr-FR-BcaQsO5C.js +0 -1
  317. package/phanpy/dist/assets/locales/gl-ES-BR-CVKBN.js +0 -1
  318. package/phanpy/dist/assets/locales/he-IL-CfheRbCu.js +0 -1
  319. package/phanpy/dist/assets/locales/hu-HU-CfheRbCu.js +0 -1
  320. package/phanpy/dist/assets/locales/it-IT-C1136UFV.js +0 -1
  321. package/phanpy/dist/assets/locales/ja-JP-CRZmRAhD.js +0 -1
  322. package/phanpy/dist/assets/locales/kab-Cz8xH_TT.js +0 -1
  323. package/phanpy/dist/assets/locales/ko-KR-CG9UiY4o.js +0 -1
  324. package/phanpy/dist/assets/locales/lt-LT-CJcI6sHZ.js +0 -1
  325. package/phanpy/dist/assets/locales/nb-NO-CfheRbCu.js +0 -1
  326. package/phanpy/dist/assets/locales/nl-NL-DxN4Yc1t.js +0 -1
  327. package/phanpy/dist/assets/locales/oc-FR-CfheRbCu.js +0 -1
  328. package/phanpy/dist/assets/locales/pl-PL-DkwGXf6P.js +0 -1
  329. package/phanpy/dist/assets/locales/pseudo-LOCALE-CQ4XxkQ0.js +0 -1
  330. package/phanpy/dist/assets/locales/pt-BR-nGL0HdFS.js +0 -1
  331. package/phanpy/dist/assets/locales/pt-PT-Cp17aj2z.js +0 -1
  332. package/phanpy/dist/assets/locales/ru-RU-0Y8cIoaK.js +0 -1
  333. package/phanpy/dist/assets/locales/th-TH-CfheRbCu.js +0 -1
  334. package/phanpy/dist/assets/locales/tok-CfheRbCu.js +0 -1
  335. package/phanpy/dist/assets/locales/tr-TR-CfheRbCu.js +0 -1
  336. package/phanpy/dist/assets/locales/uk-UA-C5E3dFBf.js +0 -1
  337. package/phanpy/dist/assets/locales/zh-CN-BHJi7_et.js +0 -1
  338. package/phanpy/dist/assets/locales/zh-TW-CfheRbCu.js +0 -1
  339. package/phanpy/dist/assets/main-BdqNbG-a.js +0 -26
  340. package/phanpy/dist/assets/main-BdqNbG-a.js.map +0 -1
  341. package/phanpy/dist/assets/mock-home-DGhR__He.js +0 -2
  342. package/phanpy/dist/assets/mock-home-DGhR__He.js.map +0 -1
  343. package/phanpy/dist/assets/multi-column-ROck0NVt.jpg +0 -0
  344. package/phanpy/dist/assets/multi-hashtag-timeline-DH5INVHi.jpg +0 -0
  345. package/phanpy/dist/assets/nested-comments-thread-hv59kZLc.jpg +0 -0
  346. package/phanpy/dist/assets/polyfill-force-H8sUkLGp.js +0 -2
  347. package/phanpy/dist/assets/polyfill-force-H8sUkLGp.js.map +0 -1
  348. package/phanpy/dist/assets/pwa-viewport-ogKbF51K.js +0 -20
  349. package/phanpy/dist/assets/pwa-viewport-ogKbF51K.js.map +0 -1
  350. package/phanpy/dist/assets/style-B1iLPTPR.css +0 -2
  351. package/phanpy/dist/assets/temml-DuyIQMei.js +0 -97
  352. package/phanpy/dist/assets/temml-DuyIQMei.js.map +0 -1
  353. package/phanpy/dist/assets/tinyld.light.node-DtbBhLYC.js +0 -2
  354. package/phanpy/dist/assets/tinyld.light.node-DtbBhLYC.js.map +0 -1
  355. package/phanpy/dist/assets/year-in-posts-B2lywqdx.png +0 -0
  356. package/phanpy/dist/assets/year-in-posts-DJv_star.js +0 -3
  357. package/phanpy/dist/assets/year-in-posts-DJv_star.js.map +0 -1
  358. package/phanpy/dist/compose/index.html +0 -20
  359. package/phanpy/dist/favicon.ico +0 -0
  360. package/phanpy/dist/index.html +0 -73
  361. package/phanpy/dist/logo-192.png +0 -0
  362. package/phanpy/dist/logo-512.png +0 -0
  363. package/phanpy/dist/logo-badge-72.png +0 -0
  364. package/phanpy/dist/logo-maskable-512.png +0 -0
  365. package/phanpy/dist/logo-monochrome-512.png +0 -0
  366. package/phanpy/dist/logo-monochrome-maskable-512.png +0 -0
  367. package/phanpy/dist/manifest.webmanifest +0 -1
  368. package/phanpy/dist/og-image-2.jpg +0 -0
  369. package/phanpy/dist/og-image.png +0 -0
  370. package/phanpy/dist/robots.txt +0 -2
  371. package/phanpy/dist/sw.js +0 -2
  372. package/phanpy/dist/sw.js.map +0 -1
  373. package/phanpy/dist/version.json +0 -1
  374. package/run-agent.mjs +0 -899
  375. package/vendor/gate.cjs +0 -138
  376. package/vendor/idp-grant.cjs +0 -394
  377. package/vendor/jfetch.cjs +0 -16
  378. package/web/admin/actors.js +0 -147
  379. package/web/admin/bar.css +0 -126
  380. package/web/admin/bar.js +0 -99
  381. package/web/admin/client/client.js +0 -66
  382. package/web/admin/client/index.html +0 -69
  383. package/web/admin/client-pick.js +0 -79
  384. package/web/admin/common.js +0 -23
  385. package/web/admin/connections.js +0 -112
  386. package/web/admin/gateway.js +0 -133
  387. package/web/admin/group.js +0 -258
  388. package/web/admin/index.html +0 -612
  389. package/web/admin/notices-bar.js +0 -90
  390. package/web/admin/oauth-signin.mjs +0 -37
  391. package/web/admin/record.js +0 -393
  392. package/web/admin/setup/index.html +0 -257
  393. package/web/admin/setup/setup.js +0 -339
  394. package/web/admin/tokens.css +0 -68
  395. package/web/admin/upkeep.js +0 -177
  396. package/web/admin/window.css +0 -55
  397. package/web/admin/window.js +0 -136
  398. package/web/app/README.md +0 -81
  399. package/web/app/admin-facade.mjs +0 -588
  400. package/web/app/agent.mjs +0 -672
  401. package/web/app/atproto-browser.mjs +0 -86
  402. package/web/app/authorize_interaction.html +0 -56
  403. package/web/app/authorize_interaction.js +0 -69
  404. package/web/app/boot.mjs +0 -616
  405. package/web/app/deliver-relay.mjs +0 -129
  406. package/web/app/dist/boot.js +0 -34562
  407. package/web/app/dist/boot.js.map +0 -7
  408. package/web/app/dist/sw.js +0 -73456
  409. package/web/app/dist/sw.js.map +0 -7
  410. package/web/app/fediacct-browser.mjs +0 -146
  411. package/web/app/gateway-move.mjs +0 -60
  412. package/web/app/idb-kv.mjs +0 -35
  413. package/web/app/index.html +0 -258
  414. package/web/app/keys-browser.mjs +0 -71
  415. package/web/app/keystore.mjs +0 -82
  416. package/web/app/oidc-session.mjs +0 -6
  417. package/web/app/pod-auth.mjs +0 -248
  418. package/web/app/pod-remote.mjs +0 -84
  419. package/web/app/shims/_globals.mjs +0 -2
  420. package/web/app/shims/fedify-sig.mjs +0 -77
  421. package/web/app/shims/node-crypto.mjs +0 -113
  422. package/web/app/shims/node-fs.mjs +0 -17
  423. package/web/app/shims/node-path.mjs +0 -19
  424. package/web/app/shims/node-url.mjs +0 -7
  425. package/web/app/shims/prelude.js +0 -58
  426. package/web/app/shims/safefetch.mjs +0 -58
  427. package/web/app/shims/shapes-text.mjs +0 -8
  428. package/web/app/shims/web-push.mjs +0 -14
  429. package/web/app/signup.mjs +0 -357
  430. package/web/app/sw-src.mjs +0 -220
  431. package/web/app/update.js +0 -70
  432. package/web/front/admin.html +0 -55
  433. package/web/front/admin.js +0 -89
  434. package/web/front/install.sh +0 -69
  435. package/web/front/new-account.html +0 -35
  436. package/web/front/new-account.js +0 -13
  437. package/web/front/notices.html +0 -69
  438. package/web/front/notices.js +0 -107
  439. package/web/front/run.html +0 -64
  440. package/web/front/run.js +0 -221
  441. package/web/front/solid-oidc-client.js +0 -6
  442. package/web/icons/forum.svg +0 -11
  443. package/web/icons/gateway.svg +0 -14
  444. package/web/icons/local.svg +0 -11
@@ -1,257 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <title>FediPod — setup</title>
7
- <link rel="icon" href="/icons/local.svg" type="image/svg+xml">
8
- <link rel="stylesheet" href="../tokens.css">
9
- <style>
10
- /* 20px on the root, not on body, so every rem below scales with it. */
11
- :root { color-scheme: light dark; font-size: 125%; --heading: #1a4f8a; }
12
- body { font: 1rem/1.5 Arial, Helvetica, sans-serif; margin: 0; }
13
- /* The bar spans the window; the form stays in a centred column under it. */
14
- /* The same 960 column the bar and the record use, so the three pages line up. */
15
- #page { max-width: 960px; margin: 0 auto; padding: 1.75rem 1rem 4rem; box-sizing: border-box; }
16
- h1, h2, h3 { color: var(--heading); }
17
- h1 { font-size: 1.5rem; margin: 0 0 .25rem; }
18
- h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
19
- p { margin: .5rem 0; }
20
- .sub { color: #666; margin-top: 0; }
21
- fieldset { border: 1px solid #bbb; border-radius: .4rem; margin: 1rem 0; padding: .75rem 1rem 1rem; }
22
- legend { padding: 0 .3rem; font-weight: 600; }
23
- label { display: block; margin: .75rem 0 .2rem; }
24
- .hint { color: #666; font-size: .9rem; margin: .15rem 0 0; }
25
- input[type=text], input[type=email], input[type=url], input[type=password], select, textarea {
26
- font: inherit; width: 100%; padding: .5rem; box-sizing: border-box;
27
- border: 1px solid #767676; border-radius: .3rem; background: Field; color: FieldText;
28
- }
29
- .choice { display: block; margin: .35rem 0; font-weight: normal; }
30
- .choice input { margin-right: .4rem; }
31
- button { font: inherit; padding: .6rem 1.2rem; border-radius: .3rem; border: 1px solid #666;
32
- background: ButtonFace; color: ButtonText; cursor: pointer; }
33
- button.primary { font-weight: 600; }
34
- button:disabled { opacity: .5; cursor: default; }
35
- .address { font-size: 1.2rem; font-weight: 600; word-break: break-all; }
36
- .warn { border-left: .25rem solid #c60; padding-left: .75rem; }
37
- .err { border-left: .25rem solid #b00020; padding-left: .75rem; color: #b00020; }
38
- /* Announced, not shown: the step list beside it already says this visually. */
39
- /* In the accessibility tree from load, hidden by being empty: a live region
40
- added to the tree in the same task as its text does not announce. */
41
- #form-error:empty, #run-error:empty { display: none; }
42
- .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
43
- overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
44
- .steps { list-style: none; padding: 0; }
45
- .steps li { padding: .3rem 0; }
46
- .steps .state { display: inline-block; width: 1.6rem; }
47
- .note { color: #666; font-size: .9rem; word-break: break-all; }
48
- .origins { font-family: ui-monospace, monospace; font-size: .95rem; word-break: break-all; }
49
- @media (prefers-color-scheme: dark) { :root { --heading: #7fb3e8; }
50
- .sub, .hint, .note { color: #aaa; } fieldset { border-color: #555; }
51
- /* 2.40:1 without this — the record page has always had the override and
52
- this page, where an error IS the whole message, did not. */
53
- .err { color: #ff8a8a; border-left-color: #ff8a8a; } }
54
- </style>
55
- <link rel="stylesheet" href="../bar.css">
56
- </head>
57
- <body>
58
-
59
- <nav id="bar" aria-label="Site">
60
- <h1 class="name">FediPod</h1>
61
- <span id="bar-handle"></span>
62
- <!-- The account group, styled like the client group beside it: one label,
63
- then the places to go. The browser build adds "sign out" to it. -->
64
- <span id="account-pick"><span id="account-now">account:</span>
65
- <a id="bar-fediverse" href="../client/" title=" Open the client and read your timeline">visit</a>
66
- <a id="bar-manage" href="../" title=" The record: what this actor is, and what you can do to it">manage</a>
67
- </span>
68
- <!-- Notices from whoever runs this site. Shown only when the site has any
69
- (notices-bar.js asks /api/notices); the count is how many are new here. -->
70
- <button type="button" id="bar-notices" hidden aria-haspopup="dialog" aria-controls="notices-list"
71
- title=" Notices from the operator of this site">&#128276;<span id="bar-notices-count" aria-live="polite"></span></button>
72
- <a id="bar-add" href="../?new=1" title=" Set up another actor on this machine, with its own pod" aria-current="page">add new account</a>
73
- </nav>
74
- <main id="page">
75
- <p class="sub" id="strap">setting up…</p>
76
-
77
- <!-- Nothing here is wired up by hand: setup.js reads /setup/state and shows
78
- exactly one of these. -->
79
-
80
- <section id="pane-loading">
81
- <p>Reading this agent's state…</p>
82
- </section>
83
-
84
- <section id="pane-done" hidden>
85
- <h2>Ready</h2>
86
- <p class="address" id="done-address"></p>
87
- <p id="done-note"></p>
88
- <p id="done-links"></p>
89
- </section>
90
-
91
- <section id="pane-configured" hidden>
92
- <h2>This agent is already set up</h2>
93
- <p class="address" id="configured-address"></p>
94
- <p>
95
- <a href="../">Edit the record</a>
96
- &nbsp;·&nbsp;
97
- <a href="../../" id="configured-client">Open the client</a>
98
- </p>
99
- <p class="hint">For another actor, use <strong>add new account</strong> above.</p>
100
- </section>
101
-
102
- <section id="pane-run" hidden>
103
- <h2 id="run-title">Setting up</h2>
104
- <ul class="steps" id="run-steps"></ul>
105
- <p class="sr-only" id="run-say" role="status"></p>
106
- <p class="err" id="run-error" role="alert"></p>
107
- <p><button id="run-again" title=" Try the step that failed again" hidden>Try again</button>
108
- <button id="run-reenter" title=" Discard the credential and enter the account and pod again" hidden>Re-enter credentials</button></p>
109
- </section>
110
-
111
- <section id="pane-form" hidden>
112
- <form id="form">
113
-
114
- <fieldset>
115
- <legend>What kind of Actor?</legend>
116
- <label class="choice"><input type="radio" name="kind" value="person" checked>
117
- A <strong>person</strong> — an account you read and post from</label>
118
- <label class="choice"><input type="radio" name="kind" value="group">
119
- A <strong>group</strong> of fediverse users you manage</label>
120
- </fieldset>
121
-
122
- <fieldset>
123
- <legend>Actor's Handle</legend>
124
- <input type="text" id="handle" name="handle" autocomplete="off" autofocus
125
- placeholder="handle part of fediverse address: @HANDLE@server"
126
- aria-label="Actor's Handle" aria-describedby="handle-hint">
127
- <p class="hint" id="handle-hint">The name in your fediverse address. This is permanent. Letters, digits,
128
- hyphens, and underscores only.</p>
129
- </fieldset>
130
-
131
- <fieldset id="fs-pod">
132
- <legend>Actor's Pod</legend>
133
- <label class="choice"><input type="radio" name="mode" value="new" checked>
134
- Create a Solid account and pod for the Actor</label>
135
- <label class="choice"><input type="radio" name="mode" value="existing">
136
- Use a pod I already have</label>
137
-
138
- <div id="row-issuer-new">
139
- <label for="issuer-new">Solid pod provider</label>
140
- <select id="issuer-new" name="issuerNew" aria-describedby="issuer-new-hint">
141
- <option value="https://solidcommunity.net">solidcommunity.net</option>
142
- <option value="https://privatedatapod.com">privatedatapod.com</option>
143
- <option value="https://solid.redpencil.io">redpencil.io</option>
144
- <option value="https://pods.solidcommunity.au">solidcommunity.au</option>
145
- <option value="https://solidweb.me">solidweb.me</option>
146
- <option value="https://teamid.live">teamid.live</option>
147
- <option value="">Other…</option>
148
- </select>
149
- <div id="row-issuer-other" hidden>
150
- <label for="issuerOther">Provider address</label>
151
- <input type="url" id="issuerOther" name="issuerOther" autocomplete="url" placeholder="https://pods.example.org">
152
- </div>
153
- <p class="hint" id="issuer-new-hint">The Community Solid Server providers from
154
- solidproject.org. A provider that makes suffixed pods gives your address at a
155
- gateway instead.</p>
156
- </div>
157
-
158
- <div id="row-issuer-existing" hidden>
159
- <label for="issuer">Solid identity provider</label>
160
- <input type="url" id="issuer" name="issuer" value="https://solidcommunity.net" autocomplete="url">
161
- </div>
162
-
163
- <label for="email">Solid Account email/username</label>
164
- <input type="email" id="email" name="email" autocomplete="email" placeholder="you@example.org">
165
-
166
- <div id="row-password">
167
- <label for="password">Solid Account password</label>
168
- <input type="password" id="password" name="password" autocomplete="current-password"
169
- aria-describedby="password-hint">
170
- <p class="hint" id="password-hint">Password is sent once in return for a credential which is stored locally.
171
- The password itself is never stored. You may revoke the credential without changing the
172
- password.</p>
173
- </div>
174
-
175
- <div id="row-podname">
176
- <label for="podName">Pod name</label>
177
- <input type="text" id="podName" name="podName" autocomplete="off"
178
- aria-describedby="podname-hint">
179
- <p class="hint" id="podname-hint">The subdomain of your pod address, it will become
180
- https://YOUR-POD-NAME.your-identity-provider</p>
181
- </div>
182
-
183
- <div id="row-pod" hidden>
184
- <label for="pod">Pod address</label>
185
- <input type="url" id="pod" name="pod" autocomplete="url" placeholder="https://you.solidcommunity.net/">
186
- </div>
187
-
188
- <div id="row-container">
189
- <label for="container">Store your data in a container named fedipod, inside this container</label>
190
- <input type="text" id="container" name="container" autocomplete="off" spellcheck="false"
191
- placeholder="/" aria-describedby="container-hint">
192
- <p class="hint" id="container-hint">Leave it empty for your pod's root. This is permanent.
193
- <span id="place"></span></p>
194
- </div>
195
-
196
- <div id="row-typeindex" hidden>
197
- <p id="typeindex-text">Your pod has no public type index, the list Solid apps use to find your
198
- things. FediPod needs one to record where your account lives. It will be readable by anyone,
199
- like your profile.</p>
200
- <label class="choice"><input type="checkbox" id="createIndex" name="createIndex"
201
- aria-describedby="typeindex-text"> Create a public type index on my pod</label>
202
- </div>
203
- </fieldset>
204
-
205
- <p id="row-reenter" class="warn" hidden>Finishing a setup that already has an account credential.
206
- Wrong account or pod?
207
- <button type="button" id="form-reenter" title=" Discard the credential and enter the account and pod again">Re-enter credentials</button></p>
208
-
209
- <fieldset id="fs-shape" hidden>
210
- <legend>Where your address lives</legend>
211
- <label class="choice"><input type="radio" name="shape" value="pod" checked> On your pod</label>
212
- <label class="choice"><input type="radio" name="shape" value="front"> At a gateway</label>
213
- <div id="row-gateway" hidden>
214
- <label for="gatewayOrigin">Gateway</label>
215
- <input type="url" id="gatewayOrigin" name="gatewayOrigin" value="https://fedipod.net" autocomplete="url">
216
- <p class="hint">The gateway answers your address and forwards your mail to your pod.</p>
217
- </div>
218
- <p class="hint" id="shape-note" hidden></p>
219
- </fieldset>
220
-
221
- <h2>You will be</h2>
222
- <p class="address" id="preview">…</p>
223
- <div id="preview-notes"></div>
224
- <p>The handle and the pod cannot be changed afterwards. Everything else — display
225
- name, bio, pictures — you set in the client.</p>
226
-
227
- <p class="err" id="form-error" role="alert"></p>
228
- <p><button type="submit" class="primary" id="submit" title=" Create it">Create it</button></p>
229
- </form>
230
- </section>
231
-
232
- </main>
233
-
234
- <script src="../bar.js"></script>
235
- <script src="../common.js"></script>
236
- <script src="setup.js"></script>
237
-
238
- <!-- The notices: the list, and one notice open. Declared here and filled by
239
- notices-bar.js from /api/notices; nothing in them is markup from a notice. -->
240
- <dialog id="notices-list" aria-labelledby="notices-title">
241
- <section>
242
- <h2 id="notices-title">Notices</h2>
243
- <ul id="notices-items"></ul>
244
- <p class="row"><button type="button" id="notices-close" class="primary" title=" Close the list of notices">Close</button></p>
245
- </section>
246
- </dialog>
247
- <dialog id="notice-view" aria-labelledby="notice-view-title">
248
- <section>
249
- <h2 id="notice-view-title"></h2>
250
- <p class="when" id="notice-view-when"></p>
251
- <div id="notice-view-body"></div>
252
- <p class="row"><button type="button" id="notice-view-close" class="primary" title=" Back to the list of notices">Close</button></p>
253
- </section>
254
- </dialog>
255
- <script src="../notices-bar.js"></script>
256
- </body>
257
- </html>
@@ -1,339 +0,0 @@
1
- // setup.js — the questions the CLI used to ask, asked here instead. Every
2
- // request is relative, so the page behaves identically whether it was reached
3
- // at localhost:<port> or at <handle>.localhost:<port>.
4
- //
5
- // External file, not an inline script: the CSP allows 'self' plus the hashes
6
- // of Phanpy's own inline bootstrap, and nothing else. `$`, `BASE`, `api` and
7
- // `postJson` come from ../common.js, loaded first.
8
-
9
- // Empty means gone, not a blank line where a sentence used to be.
10
- const strap = (t) => { const el = $('strap'); el.textContent = t || ''; el.hidden = !t; };
11
- // By id, not by position: these were `body > section` until a wrapper went
12
- // round them for layout, and the selector then matched nothing — every pane
13
- // kept whatever it started as and the page sat on "Reading this agent's state".
14
- const show = (id) => { for (const s of document.querySelectorAll('section[id^="pane-"]')) s.hidden = s.id !== id; };
15
-
16
- let state = null;
17
-
18
- // ---- what the agent needs from us ----
19
-
20
- async function start() {
21
- const { json } = await api('/setup/state');
22
- state = json || {};
23
- if (state.phase === 'running' || state.phase === 'done' || state.phase === 'error') return watchRun();
24
- if (state.configured) return paneConfigured();
25
- return paneForm();
26
- }
27
-
28
- function paneConfigured() {
29
- strap('already set up');
30
- $('configured-address').textContent = state.handle ? `@${state.handle}` : '';
31
- $('configured-client').hidden = state.kind === 'group';
32
- show('pane-configured');
33
- // The address needs the pod host, which only /config knows.
34
- api('/config').then(({ json }) => {
35
- if (json?.address) $('configured-address').textContent = json.address;
36
- });
37
- }
38
-
39
- // ---- the form ----
40
-
41
- function paneForm() {
42
- // Nothing is asked in a terminal any more — every question is on this page.
43
- // A fresh run needs no strap at all; a resumed one has something to say.
44
- strap(state.resumable ? 'finishing a setup that did not complete' : '');
45
- if (state.handle) $('handle').value = state.handle;
46
- // A signup page's carry-over: the form opens with its answers already in.
47
- const fr = state.firstRun;
48
- if (fr && !state.resumable) {
49
- if (fr.kind) $('form').elements.kind.value = fr.kind;
50
- if (fr.handle) $('handle').value = fr.handle;
51
- if (fr.pod) { $('form').elements.mode.value = 'existing'; $('pod').value = fr.pod; }
52
- // A gateway-arranged signup names its own provider; give the dropdown that
53
- // choice too, so the carried-over answer survives the narrower control.
54
- if (fr.issuer) {
55
- $('issuer').value = fr.issuer;
56
- const sel = $('issuer-new');
57
- if (![...sel.options].some(o => o.value === fr.issuer)) {
58
- const o = document.createElement('option');
59
- o.value = fr.issuer;
60
- o.textContent = host(fr.issuer);
61
- sel.appendChild(o);
62
- }
63
- sel.value = fr.issuer;
64
- }
65
- if (fr.gatewayHost) strap(`finishing your ${fr.gatewayHost} signup — enter your Solid account details`);
66
- }
67
- // Resuming: the account exists and the credential is minted. Asking for a
68
- // password again would mint a second one and orphan the first, which cannot
69
- // be recovered.
70
- // Set both ways, not just hidden-when-resuming: re-entering credentials
71
- // re-renders this in the other mode, and a one-way hide would strand the
72
- // account and pod fields off-screen. Resuming settles the account and the
73
- // credential, so those fields go; a fresh run shows them.
74
- $('row-reenter').hidden = !state.resumable;
75
- $('fs-pod').hidden = state.resumable;
76
- // The password field also goes when AP_PASSWORD supplied it in the environment.
77
- $('row-password').hidden = state.resumable || state.passwordSupplied;
78
- $('submit').textContent = state.resumable ? 'Finish setting up' : 'Create it';
79
- if (state.resumable) $('form-reenter').onclick = reEnter; // the escape from a wrong credential
80
- show('pane-form');
81
- // The markup's autofocus was set while this pane was still hidden, so it
82
- // never fired — move focus to the first field now that the pane is showing.
83
- $('handle').focus();
84
- for (const el of $('form').elements) {
85
- el.addEventListener('input', onEdit);
86
- el.addEventListener('change', onEdit);
87
- }
88
- $('form').addEventListener('submit', onSubmit);
89
- onEdit();
90
- }
91
-
92
- function answers() {
93
- const f = $('form').elements;
94
- const kind = f.kind.value;
95
- const mode = state.resumable ? 'existing' : f.mode.value;
96
- const issuer = mode === 'new'
97
- ? (f.issuerNew.value || (f.issuerOther ? f.issuerOther.value : '')).trim()
98
- : f.issuer.value.trim();
99
- const a = {
100
- kind,
101
- mode,
102
- handle: f.handle.value.trim(),
103
- issuer,
104
- email: f.email.value.trim(),
105
- // Where the address lives; a group cannot front (yet), so it stays 'pod'.
106
- shape: (kind === 'group') ? 'pod' : (f.shape ? f.shape.value : 'pod'),
107
- gatewayOrigin: (f.gatewayOrigin ? f.gatewayOrigin.value.trim() : '') || 'https://fedipod.net',
108
- };
109
- if (mode === 'new') a.podName = f.podName.value.trim() || a.handle;
110
- else a.pod = f.pod.value.trim();
111
- // The container that holds fedipod/, and the yes to a new public type index.
112
- a.container = f.container.value.trim();
113
- a.createIndex = f.createIndex.checked;
114
- if (!state.resumable && !state.passwordSupplied) a.password = f.password.value;
115
- return a;
116
- }
117
-
118
- // Every warning the CLI printed before it asked "create pod and fediverse
119
- // account?", in the same words, as you type.
120
- const NOTES = {
121
- 'pod-is-a-path': (a) =>
122
- `This pod is suffixed (on ${host(a.pod)}), not subdomained. WebFinger is `
123
- + 'answered only for a subdomained pod, so other servers '
124
- + 'will not find this address. Posting and reading still work; being discovered does not.',
125
- };
126
- const REFUSALS = {
127
- 'group-needs-host-root': () =>
128
- 'A group needs a subdomained pod, or nobody could ever find it. '
129
- + 'Give the group a pod of its own, or set this up as a person.',
130
- };
131
- const host = (u) => { try { return new URL(u).host; } catch { return u; } };
132
-
133
- let editTimer = null;
134
- function onEdit() {
135
- const mode = state.resumable ? 'existing' : $('form').elements.mode.value;
136
- $('row-podname').hidden = mode !== 'new';
137
- $('row-pod').hidden = mode === 'new';
138
- $('row-issuer-new').hidden = mode !== 'new';
139
- $('row-issuer-existing').hidden = mode === 'new';
140
- const f = $('form').elements;
141
- if ($('row-issuer-other')) $('row-issuer-other').hidden = !(mode === 'new' && f.issuerNew.value === '');
142
- if ($('row-gateway')) $('row-gateway').hidden = !(f.shape && f.shape.value === 'front');
143
- clearTimeout(editTimer);
144
- editTimer = setTimeout(preview, 150);
145
- }
146
-
147
- async function preview() {
148
- const a = answers();
149
- $('preview-notes').textContent = '';
150
- if (!a.handle || (a.mode === 'existing' && !a.pod)) { $('preview').textContent = '…'; return; }
151
- if (state.resumable) { $('preview').textContent = `@${a.handle}@…`; return; }
152
- const { json } = await postJson('/setup/check', a);
153
- if (!json) return;
154
- $('preview').textContent = json.address || '…';
155
- // Where the data will go, and the type index question when the pod has
156
- // none (a new pod never does).
157
- $('place').textContent = json.placeProblem ? json.placeProblem : (json.place ? `Your data will be at ${json.place}.` : '');
158
- $('row-typeindex').hidden = json.typeIndex === true;
159
- try { $('container').placeholder = a.mode === 'existing' && a.pod ? new URL(a.pod).pathname : '/'; } catch { /* not a URL yet */ }
160
- // The address-shape choice: hidden for a group (a group cannot front yet),
161
- // locked to the gateway for a pod on a suffix-based host, an open choice
162
- // for a pod at its own host.
163
- const f = $('form').elements;
164
- const shapeFs = $('fs-shape');
165
- if (shapeFs) {
166
- const isGroup = a.kind === 'group';
167
- shapeFs.hidden = isGroup || (a.mode === 'existing' && !a.pod);
168
- const forced = !!json.forced;
169
- for (const r of f.shape) r.disabled = forced;
170
- if (forced) { for (const r of f.shape) r.checked = r.value === 'front'; }
171
- if ($('row-gateway')) $('row-gateway').hidden = !(f.shape.value === 'front');
172
- const note = $('shape-note');
173
- if (note) {
174
- note.hidden = !forced;
175
- note.textContent = forced
176
- ? 'Your pod is suffixed, so its address lives at the gateway. Your posts, key and data stay on your pod.'
177
- : '';
178
- }
179
- }
180
- const notes = $('preview-notes');
181
- for (const w of json.warnings || []) {
182
- const p = document.createElement('p');
183
- p.className = 'warn';
184
- p.textContent = NOTES[w] ? NOTES[w](a) : w;
185
- notes.appendChild(p);
186
- }
187
- if (json.refusal) {
188
- const p = document.createElement('p');
189
- p.className = 'err';
190
- p.textContent = REFUSALS[json.refusal] ? REFUSALS[json.refusal]() : json.refusal;
191
- notes.appendChild(p);
192
- }
193
- $('submit').disabled = !!json.refusal;
194
- }
195
-
196
- async function onSubmit(ev) {
197
- ev.preventDefault();
198
- $('form-error').textContent = '';
199
- // No type index and no yes: stop here, before anything is sent.
200
- if (!$('row-typeindex').hidden && !$('createIndex').checked) {
201
- $('form-error').textContent = 'Setup stopped. Nothing was written to your pod. FediPod needs a public type index to record where your account lives.';
202
- return;
203
- }
204
- $('submit').disabled = true;
205
- const { status, json } = await postJson('/setup', answers());
206
- if (status !== 202) {
207
- $('submit').disabled = false;
208
- $('form-error').textContent = json?.error || `setup refused (HTTP ${status})`;
209
- return;
210
- }
211
- watchRun();
212
- }
213
-
214
- // ---- the run ----
215
-
216
- const LABELS = {
217
- account: 'Creating the account and pod',
218
- credential: 'Minting a credential for this machine',
219
- bootstrap: 'Provisioning the pod',
220
- connect: 'Connecting',
221
- publish: 'Publishing the actor',
222
- verify: 'Checking the world can see it',
223
- };
224
- const MARKS = { waiting: '·', running: '⟳', ok: '✓', skipped: '–', error: '✗' };
225
-
226
- async function watchRun() {
227
- show('pane-run');
228
- strap('setting up');
229
- const { json: run } = await api('/setup/progress');
230
- if (!run) return;
231
- renderRun(run);
232
- if (run.phase === 'running') return setTimeout(watchRun, 700);
233
- if (run.phase === 'done') return paneDone(run.result);
234
- $('run-title').textContent = 'Setup stopped';
235
- $('run-error').textContent = run.error || 'unknown error';
236
- $('run-again').hidden = false;
237
- $('run-again').onclick = async () => {
238
- // Re-read the state: a run that got as far as the credential resumes from
239
- // there rather than minting a second one.
240
- const { json } = await api('/setup/state');
241
- state = json || state;
242
- paneForm();
243
- };
244
- // A failure past the credential (a wrong pod answering 401 to the first
245
- // write) leaves a credential that "Try again" can only re-use. Offer to
246
- // discard it and re-enter the account and pod — only when there is one.
247
- const { json: st } = await api('/setup/state');
248
- const reenter = $('run-reenter');
249
- reenter.hidden = !st?.hasCredential;
250
- reenter.onclick = reEnter;
251
- }
252
-
253
- // Discard the saved credential (server confirms, then the full form returns).
254
- // Destructive and unrecoverable — a minted credential is shown once — so it
255
- // asks first.
256
- async function reEnter() {
257
- if (!confirm('Discard the saved account credential and enter the account and pod again?\n\n'
258
- + 'The old credential is left on your account — revoke it from the account dashboard if you want it gone.')) return;
259
- const { status, json } = await postJson('/setup/reset', {});
260
- if (status !== 200) {
261
- const box = $('pane-form').hidden ? $('run-error') : $('form-error');
262
- box.textContent = json?.error || `could not reset (HTTP ${status})`;
263
- return;
264
- }
265
- const { json: st } = await api('/setup/state');
266
- state = st || {};
267
- paneForm();
268
- }
269
-
270
- function renderRun(run) {
271
- const ul = $('run-steps');
272
- ul.textContent = '';
273
- for (const s of run.steps) {
274
- const li = document.createElement('li');
275
- const mark = document.createElement('span');
276
- mark.className = 'state';
277
- mark.textContent = MARKS[s.state] || '·';
278
- // The glyph is the whole of what says how a step went, and `⟳` read aloud
279
- // is not a word. Naming it leaves the visual result exactly as it was.
280
- mark.setAttribute('aria-label', s.state || 'waiting');
281
- li.appendChild(mark);
282
- li.appendChild(document.createTextNode(LABELS[s.key] || s.key));
283
- if (s.note) {
284
- const note = document.createElement('div');
285
- note.className = 'note';
286
- note.textContent = s.note;
287
- li.appendChild(note);
288
- }
289
- ul.appendChild(li);
290
- }
291
- // One polite line rather than a live region over the whole list: the list is
292
- // rebuilt from scratch on every poll, and announcing all six steps twice a
293
- // second is not progress, it is noise. Only the step actually moving is said.
294
- const now = run.steps.find(s => s.state === 'running')
295
- || [...run.steps].reverse().find(s => s.state && s.state !== 'waiting');
296
- const say = now ? `${LABELS[now.key] || now.key}: ${now.state}` : '';
297
- const line = $('run-say');
298
- if (line && line.textContent !== say) line.textContent = say;
299
- }
300
-
301
- function paneDone(result) {
302
- // Straight to the thing you set it up FOR. A group has no client of its own,
303
- // so it goes to its console instead. Warnings are the exception: an address
304
- // nobody can resolve, or documents a stranger cannot read, are worth stopping
305
- // for — the client would just look empty and not say why.
306
- const stop = !result?.resolvable || result?.unreachable?.length;
307
- if (!stop) {
308
- location.href = result?.kind === 'group' ? '/admin/' : '/admin/client/';
309
- return;
310
- }
311
- strap('set up');
312
- show('pane-done');
313
- $('done-address').textContent = result?.address || `@${result?.handle} — no resolvable address`;
314
- const notes = [];
315
- if (!result?.resolvable) {
316
- notes.push(`${result?.pod} is a suffixed pod, so this address cannot be `
317
- + 'discovered by other servers. Posting and reading still work.');
318
- }
319
- if (result?.unreachable?.length) {
320
- notes.push(`Not readable without credentials yet: ${result.unreachable.join(', ')}. `
321
- + 'Other servers cannot fetch this actor until that clears.');
322
- }
323
- $('done-note').className = notes.length ? 'warn' : '';
324
- $('done-note').textContent = notes.join(' ');
325
-
326
- const links = $('done-links');
327
- links.textContent = '';
328
- const add = (href, text) => {
329
- if (links.hasChildNodes()) links.appendChild(document.createTextNode(' · '));
330
- const a = document.createElement('a');
331
- a.href = href;
332
- a.textContent = text;
333
- links.appendChild(a);
334
- };
335
- if (result?.kind !== 'group') add('/', 'Open the client');
336
- add('/admin/', 'Edit the record');
337
- }
338
-
339
- start();
@@ -1,68 +0,0 @@
1
- /* tokens.css — the FediPod design tokens: the front page's palette
2
- (web/app/index.html), so the front, the record page, the bar and the client
3
- shell are one visual system. The front is the reference; these values mirror
4
- its :root. Declared under every name the pages already use — plus aliases
5
- (--ink=--fg, --muted=--sub, --link=--accent, --field-edge=--field-border,
6
- --danger=--err, --ring=--focus) — so a page only has to drop its own :root
7
- colours and inherit these. The base size and the font family live here too:
8
- 20px base, Arial, and nothing on any page below 16px. */
9
- :root {
10
- color-scheme: light dark;
11
- font-size: 125%; /* 20px base (125% of 16) */
12
- --font: Arial, Helvetica, sans-serif; /* one family across the site */
13
-
14
- /* ground + text */
15
- --bg: #ffffff; --fg: #1a1a1a; --ink: #1a1a1a;
16
- --surface: #f0f2f5; /* the page ground behind cards */
17
- --raised: #ffffff; /* cards, the rail, the bar band, dialogs */
18
-
19
- /* structure + action */
20
- --heading: #2c4a35; --accent: #12467e; --link: #12467e;
21
- --sub: #565656; --muted: #565656; --line: #b0b0b0;
22
-
23
- /* fields */
24
- --field-bg: #ececec; --field-bg-hover: #e2e4e8; --field-hover: #e2e4e8;
25
- --field-text: #141414; --field-edge: #6f6f6f; --field-border: #6f6f6f;
26
-
27
- /* buttons — filled, muted forest green (like the front) */
28
- --btn: #3a5f43; --btn-hover: #30503a; --btn-text: #ffffff;
29
- --btn-bg: #ececec; --btn-bg-hover: #e2e4e8; --btn-bg-active: #d8dade; --btn-edge: #6f6f6f;
30
-
31
- /* status + focus */
32
- --err: #b00020; --danger: #b00020; --warn: #8a4b00; --ok: #1f7a3d;
33
- --focus: #12467e; --ring: #12467e;
34
-
35
- /* the edge of a dialog: bright against the page behind it */
36
- --dialog-edge: #b8b8b8;
37
-
38
- /* every other row of a table. A stripe nobody can see is not a stripe:
39
- this is a real step from the page, not a hint of one. */
40
- --stripe: #d3dce8;
41
-
42
- --chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23124f8a' stroke-width='1.6' stroke-linecap='round'/></svg>");
43
- }
44
-
45
- @media (prefers-color-scheme: dark) {
46
- :root {
47
- --bg: #191919; --fg: #f3f3f3; --ink: #f3f3f3;
48
- --surface: #18191a; --raised: #242526;
49
-
50
- --heading: #a7d4b5; --accent: #8fc2f2; --link: #8fc2f2;
51
- --sub: #d2d2d2; --muted: #d2d2d2; --line: #6d6d6d;
52
-
53
- --field-bg: #474747; --field-bg-hover: #515151; --field-hover: #515151;
54
- --field-text: #f5f5f5; --field-edge: #9aa0a6; --field-border: #9aa0a6;
55
-
56
- /* a touch brighter on the dark page so white text and the fill-vs-page edge
57
- both clear their contrast floors — still muted (kept in sync with the front) */
58
- --btn: #4a7a54; --btn-hover: #3f6a49; --btn-text: #ffffff;
59
- --btn-bg: #474747; --btn-bg-hover: #515151; --btn-bg-active: #5b5b5b; --btn-edge: #9aa0a6;
60
-
61
- --err: #ff9b9b; --danger: #ff9b9b; --warn: #ffb366; --ok: #7fd39a;
62
- --focus: #8fc2f2; --ring: #8fc2f2;
63
- --dialog-edge: #f3f3f3;
64
- --stripe: #363c45;
65
-
66
- --chevron: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' fill='none' stroke='%23bcd8f0' stroke-width='1.6' stroke-linecap='round'/></svg>");
67
- }
68
- }