ref0-git 0.0.0 → 0.2.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 (385) hide show
  1. package/app/apps/github/.dev.vars.example +6 -0
  2. package/app/apps/github/README.md +70 -0
  3. package/app/apps/github/THIRD_PARTY_NOTICES.md +214 -0
  4. package/app/apps/github/components.json +25 -0
  5. package/app/apps/github/generated/git-rest.ts +10444 -0
  6. package/app/apps/github/generated/routeTree.gen.ts +1242 -0
  7. package/app/apps/github/migrations/postgres/0001_auth.sql +46 -0
  8. package/app/apps/github/migrations/sql/0001_auth.sql +19 -0
  9. package/app/apps/github/migrations/sql/0002_passkeys.sql +9 -0
  10. package/app/apps/github/migrations/sql/0003_orgs.sql +22 -0
  11. package/app/apps/github/migrations/sql/0004_avatars.sql +6 -0
  12. package/app/apps/github/package.json +80 -0
  13. package/app/apps/github/src/branches/branch-list.tsx +385 -0
  14. package/app/apps/github/src/branches/branches.ts +55 -0
  15. package/app/apps/github/src/clients/allowed.ts +213 -0
  16. package/app/apps/github/src/clients/at-most.ts +17 -0
  17. package/app/apps/github/src/clients/avatars.ts +410 -0
  18. package/app/apps/github/src/clients/cached.ts +65 -0
  19. package/app/apps/github/src/clients/calls.ts +160 -0
  20. package/app/apps/github/src/clients/clients.ts +82 -0
  21. package/app/apps/github/src/clients/graphql.ts +50 -0
  22. package/app/apps/github/src/clients/host-answer.ts +28 -0
  23. package/app/apps/github/src/clients/host-calls.ts +382 -0
  24. package/app/apps/github/src/clients/icon-bytes.ts +203 -0
  25. package/app/apps/github/src/clients/proxy.ts +59 -0
  26. package/app/apps/github/src/clients/session-ended.ts +18 -0
  27. package/app/apps/github/src/clients/transfers.ts +212 -0
  28. package/app/apps/github/src/code/breadcrumbs.tsx +50 -0
  29. package/app/apps/github/src/code/code-page.tsx +147 -0
  30. package/app/apps/github/src/code/code-tree.tsx +338 -0
  31. package/app/apps/github/src/code/controls.tsx +230 -0
  32. package/app/apps/github/src/code/file-view.tsx +450 -0
  33. package/app/apps/github/src/code/files.ts +332 -0
  34. package/app/apps/github/src/code/folder-list.tsx +122 -0
  35. package/app/apps/github/src/code/go-to-file.tsx +131 -0
  36. package/app/apps/github/src/code/highlighted.tsx +58 -0
  37. package/app/apps/github/src/code/lines.ts +46 -0
  38. package/app/apps/github/src/code/load.ts +147 -0
  39. package/app/apps/github/src/code/markdown-files.ts +58 -0
  40. package/app/apps/github/src/code/places.ts +88 -0
  41. package/app/apps/github/src/code/ref-pages.ts +179 -0
  42. package/app/apps/github/src/code/ref-switcher.tsx +203 -0
  43. package/app/apps/github/src/code/refs.ts +142 -0
  44. package/app/apps/github/src/code/repo-home.tsx +240 -0
  45. package/app/apps/github/src/code/repo.ts +105 -0
  46. package/app/apps/github/src/code/saved-reads.ts +199 -0
  47. package/app/apps/github/src/code/saved.ts +110 -0
  48. package/app/apps/github/src/code/tree-fold.ts +186 -0
  49. package/app/apps/github/src/code/trees.ts +136 -0
  50. package/app/apps/github/src/components/avatar-picture.ts +53 -0
  51. package/app/apps/github/src/components/avatar-url.ts +16 -0
  52. package/app/apps/github/src/components/confirm-action.tsx +100 -0
  53. package/app/apps/github/src/components/count.tsx +24 -0
  54. package/app/apps/github/src/components/create-button.tsx +38 -0
  55. package/app/apps/github/src/components/file-icons/file-icons.css +225 -0
  56. package/app/apps/github/src/components/file-icons/file-icons.tsx +138 -0
  57. package/app/apps/github/src/components/filter.tsx +35 -0
  58. package/app/apps/github/src/components/hotkeys/hotkeys.tsx +255 -0
  59. package/app/apps/github/src/components/item-list.tsx +65 -0
  60. package/app/apps/github/src/components/language-dot.tsx +29 -0
  61. package/app/apps/github/src/components/list-toolbar.tsx +82 -0
  62. package/app/apps/github/src/components/markdown/editor.tsx +57 -0
  63. package/app/apps/github/src/components/markdown/markdown.css +177 -0
  64. package/app/apps/github/src/components/markdown/markdown.tsx +82 -0
  65. package/app/apps/github/src/components/owner-card.tsx +196 -0
  66. package/app/apps/github/src/components/pull-status.tsx +34 -0
  67. package/app/apps/github/src/components/recent.ts +41 -0
  68. package/app/apps/github/src/components/relative-time.tsx +78 -0
  69. package/app/apps/github/src/components/repos/icon-hashes.ts +91 -0
  70. package/app/apps/github/src/components/repos/new-repo-form.tsx +196 -0
  71. package/app/apps/github/src/components/repos/repo-icon.tsx +47 -0
  72. package/app/apps/github/src/components/repos/repo-list.tsx +528 -0
  73. package/app/apps/github/src/components/repos/your-repos.tsx +124 -0
  74. package/app/apps/github/src/components/review-state.tsx +75 -0
  75. package/app/apps/github/src/components/route-dialog.tsx +137 -0
  76. package/app/apps/github/src/components/save-button.tsx +58 -0
  77. package/app/apps/github/src/components/shell/app-shell.tsx +164 -0
  78. package/app/apps/github/src/components/shell/create-org-dialog.tsx +118 -0
  79. package/app/apps/github/src/components/shell/create-row.tsx +49 -0
  80. package/app/apps/github/src/components/shell/link-menu.tsx +94 -0
  81. package/app/apps/github/src/components/shell/nav-user.tsx +97 -0
  82. package/app/apps/github/src/components/shell/owner-repos.tsx +247 -0
  83. package/app/apps/github/src/components/shell/owner-switcher.tsx +104 -0
  84. package/app/apps/github/src/components/shell/repo-switcher.tsx +179 -0
  85. package/app/apps/github/src/components/shell/sections.ts +31 -0
  86. package/app/apps/github/src/components/shell/submenu-chevron.ts +147 -0
  87. package/app/apps/github/src/components/signin/device-card.tsx +139 -0
  88. package/app/apps/github/src/components/signin/login-form.tsx +88 -0
  89. package/app/apps/github/src/components/signin/signin-page.tsx +33 -0
  90. package/app/apps/github/src/components/signin/signup-form.tsx +106 -0
  91. package/app/apps/github/src/components/states/live-status.tsx +42 -0
  92. package/app/apps/github/src/components/states/states.tsx +126 -0
  93. package/app/apps/github/src/components/tab-indicator.tsx +143 -0
  94. package/app/apps/github/src/components/theme-choice.tsx +108 -0
  95. package/app/apps/github/src/components/theme-provider.tsx +126 -0
  96. package/app/apps/github/src/components/tones.ts +23 -0
  97. package/app/apps/github/src/components/ui/alert-dialog.tsx +187 -0
  98. package/app/apps/github/src/components/ui/alert.tsx +78 -0
  99. package/app/apps/github/src/components/ui/avatar.tsx +106 -0
  100. package/app/apps/github/src/components/ui/badge.tsx +51 -0
  101. package/app/apps/github/src/components/ui/breadcrumb.tsx +124 -0
  102. package/app/apps/github/src/components/ui/button-group.tsx +87 -0
  103. package/app/apps/github/src/components/ui/button.tsx +61 -0
  104. package/app/apps/github/src/components/ui/calendar.tsx +221 -0
  105. package/app/apps/github/src/components/ui/card.tsx +102 -0
  106. package/app/apps/github/src/components/ui/checkbox.tsx +26 -0
  107. package/app/apps/github/src/components/ui/collapsible.tsx +19 -0
  108. package/app/apps/github/src/components/ui/combobox.tsx +304 -0
  109. package/app/apps/github/src/components/ui/command.tsx +208 -0
  110. package/app/apps/github/src/components/ui/dialog.tsx +156 -0
  111. package/app/apps/github/src/components/ui/dropdown-menu.tsx +290 -0
  112. package/app/apps/github/src/components/ui/empty.tsx +100 -0
  113. package/app/apps/github/src/components/ui/field.tsx +236 -0
  114. package/app/apps/github/src/components/ui/hover-card.tsx +48 -0
  115. package/app/apps/github/src/components/ui/input-group.tsx +163 -0
  116. package/app/apps/github/src/components/ui/input.tsx +19 -0
  117. package/app/apps/github/src/components/ui/item.tsx +201 -0
  118. package/app/apps/github/src/components/ui/kbd.tsx +27 -0
  119. package/app/apps/github/src/components/ui/label.tsx +33 -0
  120. package/app/apps/github/src/components/ui/popover.tsx +87 -0
  121. package/app/apps/github/src/components/ui/radio-group.tsx +35 -0
  122. package/app/apps/github/src/components/ui/select.tsx +198 -0
  123. package/app/apps/github/src/components/ui/separator.tsx +22 -0
  124. package/app/apps/github/src/components/ui/sheet.tsx +138 -0
  125. package/app/apps/github/src/components/ui/sidebar.tsx +724 -0
  126. package/app/apps/github/src/components/ui/skeleton.tsx +13 -0
  127. package/app/apps/github/src/components/ui/sonner.tsx +47 -0
  128. package/app/apps/github/src/components/ui/styles.css +242 -0
  129. package/app/apps/github/src/components/ui/table.tsx +113 -0
  130. package/app/apps/github/src/components/ui/tabs.tsx +79 -0
  131. package/app/apps/github/src/components/ui/textarea.tsx +17 -0
  132. package/app/apps/github/src/components/ui/title.ts +6 -0
  133. package/app/apps/github/src/components/ui/toggle-group.tsx +89 -0
  134. package/app/apps/github/src/components/ui/toggle.tsx +42 -0
  135. package/app/apps/github/src/components/ui/tooltip.tsx +63 -0
  136. package/app/apps/github/src/components/user-avatar.tsx +145 -0
  137. package/app/apps/github/src/components/view-tabs.tsx +42 -0
  138. package/app/apps/github/src/context/context.ts +133 -0
  139. package/app/apps/github/src/diffs/blobs.ts +94 -0
  140. package/app/apps/github/src/diffs/diff-view.tsx +155 -0
  141. package/app/apps/github/src/diffs/files.ts +121 -0
  142. package/app/apps/github/src/diffs/hunks.tsx +454 -0
  143. package/app/apps/github/src/diffs/patch.ts +131 -0
  144. package/app/apps/github/src/diffs/rows.ts +137 -0
  145. package/app/apps/github/src/history/commit-diff.ts +54 -0
  146. package/app/apps/github/src/history/commit-list.tsx +207 -0
  147. package/app/apps/github/src/history/commit-page.tsx +147 -0
  148. package/app/apps/github/src/history/history.ts +129 -0
  149. package/app/apps/github/src/hooks/allowed.ts +31 -0
  150. package/app/apps/github/src/hooks/answers.ts +65 -0
  151. package/app/apps/github/src/hooks/avatars.ts +54 -0
  152. package/app/apps/github/src/hooks/draft.ts +38 -0
  153. package/app/apps/github/src/hooks/open-counts.ts +127 -0
  154. package/app/apps/github/src/hooks/profiles.ts +120 -0
  155. package/app/apps/github/src/hooks/repos.ts +440 -0
  156. package/app/apps/github/src/hooks/use-mobile.ts +19 -0
  157. package/app/apps/github/src/hooks/viewer.ts +39 -0
  158. package/app/apps/github/src/inbox/count.ts +70 -0
  159. package/app/apps/github/src/inbox/inbox-item.tsx +66 -0
  160. package/app/apps/github/src/inbox/inbox-page.tsx +572 -0
  161. package/app/apps/github/src/inbox/marks.ts +130 -0
  162. package/app/apps/github/src/inbox/release-tags.ts +65 -0
  163. package/app/apps/github/src/inbox/search.ts +97 -0
  164. package/app/apps/github/src/inbox/subjects.ts +184 -0
  165. package/app/apps/github/src/inbox/subscription-controls.tsx +184 -0
  166. package/app/apps/github/src/inbox/subscriptions.ts +189 -0
  167. package/app/apps/github/src/inbox/threads.ts +198 -0
  168. package/app/apps/github/src/issues/changes.ts +332 -0
  169. package/app/apps/github/src/issues/counts.ts +62 -0
  170. package/app/apps/github/src/issues/issue-list.tsx +682 -0
  171. package/app/apps/github/src/issues/issue-page.tsx +533 -0
  172. package/app/apps/github/src/issues/issues.ts +566 -0
  173. package/app/apps/github/src/issues/label-dialog.tsx +310 -0
  174. package/app/apps/github/src/issues/labels-page.tsx +119 -0
  175. package/app/apps/github/src/issues/new-issue.tsx +79 -0
  176. package/app/apps/github/src/issues/parts.tsx +71 -0
  177. package/app/apps/github/src/issues/picker.tsx +298 -0
  178. package/app/apps/github/src/issues/search.ts +238 -0
  179. package/app/apps/github/src/issues/sidebar.tsx +236 -0
  180. package/app/apps/github/src/lib/cn.ts +8 -0
  181. package/app/apps/github/src/lib/highlighting.ts +13 -0
  182. package/app/apps/github/src/live/follow.ts +129 -0
  183. package/app/apps/github/src/live/sse.ts +74 -0
  184. package/app/apps/github/src/live/use-follow.ts +37 -0
  185. package/app/apps/github/src/markdown/README.md +53 -0
  186. package/app/apps/github/src/markdown/allowed-html.ts +69 -0
  187. package/app/apps/github/src/markdown/context.ts +206 -0
  188. package/app/apps/github/src/markdown/images.ts +81 -0
  189. package/app/apps/github/src/markdown/lookup.ts +122 -0
  190. package/app/apps/github/src/markdown/patches.ts +299 -0
  191. package/app/apps/github/src/markdown/query.ts +25 -0
  192. package/app/apps/github/src/markdown/references.ts +158 -0
  193. package/app/apps/github/src/markdown/render.ts +103 -0
  194. package/app/apps/github/src/names/owners.ts +51 -0
  195. package/app/apps/github/src/names/repos.ts +24 -0
  196. package/app/apps/github/src/palette/palette.tsx +547 -0
  197. package/app/apps/github/src/palette/recent.ts +116 -0
  198. package/app/apps/github/src/palette/rows.tsx +455 -0
  199. package/app/apps/github/src/palette/server.ts +104 -0
  200. package/app/apps/github/src/palette/targets.ts +306 -0
  201. package/app/apps/github/src/policy.ts +600 -0
  202. package/app/apps/github/src/private-repos.ts +47 -0
  203. package/app/apps/github/src/pulls/compare-page.tsx +342 -0
  204. package/app/apps/github/src/pulls/files-tab.tsx +776 -0
  205. package/app/apps/github/src/pulls/live.ts +124 -0
  206. package/app/apps/github/src/pulls/merge-box.tsx +367 -0
  207. package/app/apps/github/src/pulls/merge-button.ts +86 -0
  208. package/app/apps/github/src/pulls/pull-list.tsx +235 -0
  209. package/app/apps/github/src/pulls/pull-page.tsx +474 -0
  210. package/app/apps/github/src/pulls/pull.ts +468 -0
  211. package/app/apps/github/src/pulls/pulls.ts +318 -0
  212. package/app/apps/github/src/pulls/review.ts +350 -0
  213. package/app/apps/github/src/pulls/search.ts +130 -0
  214. package/app/apps/github/src/queue/queue-page.tsx +405 -0
  215. package/app/apps/github/src/queue/queue.ts +231 -0
  216. package/app/apps/github/src/releases/latest-release.tsx +55 -0
  217. package/app/apps/github/src/releases/overview.tsx +30 -0
  218. package/app/apps/github/src/releases/release-form.tsx +353 -0
  219. package/app/apps/github/src/releases/release-list.tsx +173 -0
  220. package/app/apps/github/src/releases/release-view.tsx +183 -0
  221. package/app/apps/github/src/releases/releases.ts +308 -0
  222. package/app/apps/github/src/releases/tag-list.tsx +134 -0
  223. package/app/apps/github/src/router.tsx +46 -0
  224. package/app/apps/github/src/routes/$owner/$repo/_code/blob/$.tsx +33 -0
  225. package/app/apps/github/src/routes/$owner/$repo/_code/tree/$.tsx +28 -0
  226. package/app/apps/github/src/routes/$owner/$repo/_code.tsx +11 -0
  227. package/app/apps/github/src/routes/$owner/$repo/_releases/releases/index.tsx +19 -0
  228. package/app/apps/github/src/routes/$owner/$repo/_releases/tags.tsx +19 -0
  229. package/app/apps/github/src/routes/$owner/$repo/_releases.tsx +23 -0
  230. package/app/apps/github/src/routes/$owner/$repo/branches.tsx +39 -0
  231. package/app/apps/github/src/routes/$owner/$repo/commit/$sha.tsx +34 -0
  232. package/app/apps/github/src/routes/$owner/$repo/commits/$.tsx +42 -0
  233. package/app/apps/github/src/routes/$owner/$repo/compare/$.tsx +19 -0
  234. package/app/apps/github/src/routes/$owner/$repo/index.tsx +24 -0
  235. package/app/apps/github/src/routes/$owner/$repo/issues/$number.tsx +50 -0
  236. package/app/apps/github/src/routes/$owner/$repo/issues/index.tsx +53 -0
  237. package/app/apps/github/src/routes/$owner/$repo/issues/new.tsx +43 -0
  238. package/app/apps/github/src/routes/$owner/$repo/labels.tsx +22 -0
  239. package/app/apps/github/src/routes/$owner/$repo/pull/$number/checks.tsx +15 -0
  240. package/app/apps/github/src/routes/$owner/$repo/pull/$number/commits.tsx +15 -0
  241. package/app/apps/github/src/routes/$owner/$repo/pull/$number/files.tsx +15 -0
  242. package/app/apps/github/src/routes/$owner/$repo/pull/$number/index.tsx +19 -0
  243. package/app/apps/github/src/routes/$owner/$repo/pull/$number/route.tsx +52 -0
  244. package/app/apps/github/src/routes/$owner/$repo/pulls/index.tsx +48 -0
  245. package/app/apps/github/src/routes/$owner/$repo/queue.tsx +22 -0
  246. package/app/apps/github/src/routes/$owner/$repo/releases/edit/$.tsx +58 -0
  247. package/app/apps/github/src/routes/$owner/$repo/releases/new.tsx +40 -0
  248. package/app/apps/github/src/routes/$owner/$repo/releases/tag/$.tsx +35 -0
  249. package/app/apps/github/src/routes/$owner/$repo/route.tsx +102 -0
  250. package/app/apps/github/src/routes/$owner/$repo/settings/access.tsx +9 -0
  251. package/app/apps/github/src/routes/$owner/$repo/settings/hooks/index.tsx +16 -0
  252. package/app/apps/github/src/routes/$owner/$repo/settings/hooks/new.tsx +25 -0
  253. package/app/apps/github/src/routes/$owner/$repo/settings/index.tsx +17 -0
  254. package/app/apps/github/src/routes/$owner/$repo/settings/route.tsx +28 -0
  255. package/app/apps/github/src/routes/$owner/$repo/settings/rules.tsx +12 -0
  256. package/app/apps/github/src/routes/$owner/$repo/tokens.tsx +16 -0
  257. package/app/apps/github/src/routes/$owner/index.tsx +45 -0
  258. package/app/apps/github/src/routes/-nav.tsx +293 -0
  259. package/app/apps/github/src/routes/-root-testing.ts +107 -0
  260. package/app/apps/github/src/routes/__root.tsx +225 -0
  261. package/app/apps/github/src/routes/api.auth.$.ts +18 -0
  262. package/app/apps/github/src/routes/downloads/$owner/$repo/$asset.tsx +10 -0
  263. package/app/apps/github/src/routes/file-icons[.]svg.ts +21 -0
  264. package/app/apps/github/src/routes/icons/$owner/$repo.tsx +14 -0
  265. package/app/apps/github/src/routes/icons/$owner/index.tsx +14 -0
  266. package/app/apps/github/src/routes/icons/index.tsx +12 -0
  267. package/app/apps/github/src/routes/index.tsx +48 -0
  268. package/app/apps/github/src/routes/login.tsx +24 -0
  269. package/app/apps/github/src/routes/login_.code.tsx +31 -0
  270. package/app/apps/github/src/routes/new.tsx +91 -0
  271. package/app/apps/github/src/routes/notifications.tsx +20 -0
  272. package/app/apps/github/src/routes/orgs/$owner/issues.tsx +8 -0
  273. package/app/apps/github/src/routes/orgs/$owner/pulls.tsx +8 -0
  274. package/app/apps/github/src/routes/orgs/$owner/releases.tsx +8 -0
  275. package/app/apps/github/src/routes/orgs/$owner/route.tsx +25 -0
  276. package/app/apps/github/src/routes/orgs/$owner/settings.tsx +30 -0
  277. package/app/apps/github/src/routes/orgs/$owner/tokens.tsx +15 -0
  278. package/app/apps/github/src/routes/settings.tsx +54 -0
  279. package/app/apps/github/src/routes/signup.tsx +24 -0
  280. package/app/apps/github/src/routes/uploads/$owner/$repo/$release.tsx +10 -0
  281. package/app/apps/github/src/seed/acme.ts +498 -0
  282. package/app/apps/github/src/seed/licenses.ts +114 -0
  283. package/app/apps/github/src/seed/seed.ts +538 -0
  284. package/app/apps/github/src/server.ts +97 -0
  285. package/app/apps/github/src/settings/account-avatar.tsx +43 -0
  286. package/app/apps/github/src/settings/avatar-section.tsx +140 -0
  287. package/app/apps/github/src/settings/avatar.ts +58 -0
  288. package/app/apps/github/src/settings/general-settings.tsx +439 -0
  289. package/app/apps/github/src/settings/general.ts +73 -0
  290. package/app/apps/github/src/settings/hook-form.tsx +195 -0
  291. package/app/apps/github/src/settings/hook-list.tsx +166 -0
  292. package/app/apps/github/src/settings/hooks.ts +87 -0
  293. package/app/apps/github/src/settings/org-settings.tsx +228 -0
  294. package/app/apps/github/src/settings/orgs.ts +116 -0
  295. package/app/apps/github/src/settings/rule-list.tsx +72 -0
  296. package/app/apps/github/src/settings/rules.ts +27 -0
  297. package/app/apps/github/src/settings/settings-layout.tsx +114 -0
  298. package/app/apps/github/src/signin/approval.ts +186 -0
  299. package/app/apps/github/src/signin/auth-client.ts +127 -0
  300. package/app/apps/github/src/signin/auth.ts +753 -0
  301. package/app/apps/github/src/signin/avatars.ts +126 -0
  302. package/app/apps/github/src/signin/client-ip.ts +39 -0
  303. package/app/apps/github/src/signin/credentials.ts +26 -0
  304. package/app/apps/github/src/signin/device-code.ts +95 -0
  305. package/app/apps/github/src/signin/device-prompt.ts +125 -0
  306. package/app/apps/github/src/signin/errors.ts +135 -0
  307. package/app/apps/github/src/signin/host-session.ts +68 -0
  308. package/app/apps/github/src/signin/orgs.ts +283 -0
  309. package/app/apps/github/src/signin/owner-names.ts +183 -0
  310. package/app/apps/github/src/signin/person-lock.ts +104 -0
  311. package/app/apps/github/src/signin/seal.ts +88 -0
  312. package/app/apps/github/src/signin/seed-people.ts +92 -0
  313. package/app/apps/github/src/signin/session.ts +48 -0
  314. package/app/apps/github/src/signin/unborn.ts +110 -0
  315. package/app/apps/github/src/signin/viewer-orgs.ts +47 -0
  316. package/app/apps/github/src/signin/viewer.ts +74 -0
  317. package/app/apps/github/src/signin/with-headers.ts +14 -0
  318. package/app/apps/github/src/tokens/tokens-page.tsx +529 -0
  319. package/app/apps/github/src/tokens/tokens.ts +54 -0
  320. package/app/apps/github/tsconfig.json +25 -0
  321. package/app/apps/github/tsconfig.worker.json +24 -0
  322. package/app/apps/github/vite.config.ts +21 -0
  323. package/app/pnpm-workspace.yaml +216 -0
  324. package/app/tsconfig.base.json +127 -0
  325. package/dist/LICENSE +202 -0
  326. package/dist/cli/child.mjs +42 -0
  327. package/dist/cli/commands.mjs +23 -0
  328. package/dist/cli/credentials.mjs +84 -0
  329. package/dist/cli/documents.mjs +214 -0
  330. package/dist/cli/events.mjs +55 -0
  331. package/dist/cli/failure.mjs +105 -0
  332. package/dist/cli/folders.mjs +32 -0
  333. package/dist/cli/git-remote-ref0.d.mts +1 -0
  334. package/dist/cli/git-remote-ref0.mjs +29 -0
  335. package/dist/cli/git.mjs +48 -0
  336. package/dist/cli/helpers.mjs +51 -0
  337. package/dist/cli/hosts.mjs +127 -0
  338. package/dist/cli/node.mjs +15 -0
  339. package/dist/cli/output.mjs +135 -0
  340. package/dist/cli/prompt.mjs +35 -0
  341. package/dist/cli/queue.mjs +215 -0
  342. package/dist/cli/ref0-git.d.mts +1 -0
  343. package/dist/cli/ref0-git.mjs +144 -0
  344. package/dist/cli/repos.mjs +162 -0
  345. package/dist/cli/resources.mjs +131 -0
  346. package/dist/cli/run-end.mjs +57 -0
  347. package/dist/cli/runtime.mjs +50 -0
  348. package/dist/cli/setup.mjs +1410 -0
  349. package/dist/cli/sign-in.mjs +162 -0
  350. package/dist/cli/sign-ins.mjs +79 -0
  351. package/dist/cli/sqlite.mjs +28 -0
  352. package/dist/cli/tokens.mjs +141 -0
  353. package/dist/cli/vendor.mjs +123 -0
  354. package/dist/init/app.mjs +231 -0
  355. package/dist/init/astro.mjs +49 -0
  356. package/dist/init/choices.mjs +497 -0
  357. package/dist/init/cloudflare.mjs +324 -0
  358. package/dist/init/create.mjs +151 -0
  359. package/dist/init/detect.mjs +297 -0
  360. package/dist/init/files.mjs +75 -0
  361. package/dist/init/frameworks.mjs +248 -0
  362. package/dist/init/git-module.mjs +49 -0
  363. package/dist/init/github-routes.mjs +66 -0
  364. package/dist/init/jsonc.mjs +143 -0
  365. package/dist/init/metadata.mjs +48 -0
  366. package/dist/init/mounts.mjs +109 -0
  367. package/dist/init/next.mjs +205 -0
  368. package/dist/init/node-app.mjs +189 -0
  369. package/dist/init/node.mjs +458 -0
  370. package/dist/init/nuxt.mjs +115 -0
  371. package/dist/init/output.mjs +21 -0
  372. package/dist/init/plan.mjs +82 -0
  373. package/dist/init/range-major.mjs +257 -0
  374. package/dist/init/react-router.mjs +59 -0
  375. package/dist/init/routes.mjs +148 -0
  376. package/dist/init/shell.mjs +4 -0
  377. package/dist/init/stores.mjs +51 -0
  378. package/dist/init/sveltekit.mjs +139 -0
  379. package/dist/init/template.mjs +142 -0
  380. package/dist/init/templates.mjs +343 -0
  381. package/dist/init/vercel.mjs +383 -0
  382. package/dist/init/versions.mjs +32 -0
  383. package/dist/init/workspace.mjs +20 -0
  384. package/package.json +48 -6
  385. package/README.md +0 -5
@@ -0,0 +1,73 @@
1
+ import { queryOptions } from '@tanstack/react-query';
2
+ import * as Schema from 'effect/Schema';
3
+
4
+ import { github } from '../clients/clients.ts';
5
+ import { hostAnswer } from '../clients/host-answer.ts';
6
+ import type { RepoPlace } from '../code/places.ts';
7
+ import { refNames } from '../code/repo.ts';
8
+ import { failure } from '../hooks/answers.ts';
9
+
10
+ /** A repo's General settings, as the drop-in keeps them and GitHub's page shows them. */
11
+ export interface General {
12
+ readonly name: string;
13
+ readonly description: string;
14
+ readonly defaultBranch: string;
15
+ readonly private: boolean;
16
+ readonly hasIssues: boolean;
17
+ readonly allowMergeCommit: boolean;
18
+ readonly allowSquashMerge: boolean;
19
+ readonly allowRebaseMerge: boolean;
20
+ readonly deleteBranchOnMerge: boolean;
21
+ }
22
+
23
+ /** The repo's General settings, and its first 100 branches, which its default may be. */
24
+ export const generalSettings = (place: RepoPlace) =>
25
+ queryOptions({
26
+ queryKey: ['general', place.owner, place.repo],
27
+ queryFn: async () => {
28
+ const answer = await github.GET('/repos/{owner}/{repo}', { params: { path: place } });
29
+ if (answer.data === undefined) throw failure("The settings didn't load", answer);
30
+
31
+ const repo = answer.data;
32
+ const branches = await refNames(place, 'branches', undefined);
33
+ const general: General = {
34
+ name: repo.name,
35
+ description: repo.description ?? '',
36
+ defaultBranch: repo.default_branch,
37
+ private: repo.private,
38
+ hasIssues: repo.has_issues,
39
+ allowMergeCommit: repo.allow_merge_commit ?? true,
40
+ allowSquashMerge: repo.allow_squash_merge ?? true,
41
+ allowRebaseMerge: repo.allow_rebase_merge ?? true,
42
+ deleteBranchOnMerge: repo.delete_branch_on_merge ?? false,
43
+ };
44
+
45
+ return { general, branches: branches.names };
46
+ },
47
+ });
48
+
49
+ const Updated = Schema.Struct({ name: Schema.String });
50
+
51
+ /** Changes what `changed` names of the repo's settings, as its person, and answers its name. */
52
+ export const updateRepo = async (place: RepoPlace, changed: Partial<General>) => {
53
+ const settings = {
54
+ name: changed.name,
55
+ description: changed.description,
56
+ default_branch: changed.defaultBranch,
57
+ private: changed.private,
58
+ has_issues: changed.hasIssues,
59
+ allow_merge_commit: changed.allowMergeCommit,
60
+ allow_squash_merge: changed.allowSquashMerge,
61
+ allow_rebase_merge: changed.allowRebaseMerge,
62
+ delete_branch_on_merge: changed.deleteBranchOnMerge,
63
+ };
64
+ // What `changed` leaves out is `undefined`, which the call's JSON leaves out in turn.
65
+ const updated = await hostAnswer({ operation: 'repo.update', ...place, settings }, Updated);
66
+
67
+ return updated.name;
68
+ };
69
+
70
+ /** Deletes the repo, as its person. */
71
+ export const deleteRepo = async (place: RepoPlace) => {
72
+ await hostAnswer({ operation: 'repo.delete', ...place }, Schema.Undefined);
73
+ };
@@ -0,0 +1,195 @@
1
+ import { useMutation, useQueryClient } from '@tanstack/react-query';
2
+ import { useNavigate } from '@tanstack/react-router';
3
+ import { LockIcon } from 'lucide-react';
4
+ import { useState, type FormEvent } from 'react';
5
+ import { toast } from 'sonner';
6
+
7
+ import type { RepoPlace } from '../code/places.ts';
8
+ import { Alert, AlertDescription } from '../components/ui/alert.tsx';
9
+ import { Button } from '../components/ui/button.tsx';
10
+ import { Checkbox } from '../components/ui/checkbox.tsx';
11
+ import {
12
+ Field,
13
+ FieldDescription,
14
+ FieldError,
15
+ FieldGroup,
16
+ FieldLabel,
17
+ FieldLegend,
18
+ FieldSet,
19
+ } from '../components/ui/field.tsx';
20
+ import { Input } from '../components/ui/input.tsx';
21
+ import { RadioGroup, RadioGroupItem } from '../components/ui/radio-group.tsx';
22
+ import { useAllowed } from '../hooks/allowed.ts';
23
+ import { createHook, type NewHook } from './hooks.ts';
24
+ import { settingsHref } from './settings-layout.tsx';
25
+
26
+ /** The events a new webhook may be sent, as GitHub's form offers the two most asked for. */
27
+ const eventChoices = { push: ['push'], everything: ['*'] } as const;
28
+
29
+ type EventChoice = keyof typeof eventChoices;
30
+
31
+ /** Why `url` can't be a payload URL, or `undefined` when it can. */
32
+ const urlProblem = (url: string) => {
33
+ if (url.trim() === '') return 'Enter the URL the payloads go to';
34
+
35
+ return URL.canParse(url) && /^https?:$/.test(new URL(url).protocol)
36
+ ? undefined
37
+ : 'Enter a full http:// or https:// URL';
38
+ };
39
+
40
+ /** One of a few choices, as radio buttons labelled for the field they're in, ids from `name`. */
41
+ function Choice<Value extends string>({
42
+ label,
43
+ name,
44
+ value,
45
+ choices,
46
+ onChange,
47
+ }: {
48
+ readonly label: string;
49
+ readonly name: string;
50
+ readonly value: Value;
51
+ readonly choices: readonly (readonly [Value, string])[];
52
+ readonly onChange: (value: Value) => void;
53
+ }) {
54
+ return (
55
+ <RadioGroup
56
+ aria-label={label}
57
+ value={value}
58
+ onValueChange={(picked) => onChange(choices.find(([each]) => each === picked)?.[0] ?? value)}
59
+ >
60
+ {choices.map(([each, text]) => (
61
+ <Field key={each} orientation="horizontal">
62
+ <RadioGroupItem id={`${name}-${each}`} value={each} />
63
+ <FieldLabel htmlFor={`${name}-${each}`} className="wrap-anywhere">
64
+ {text}
65
+ </FieldLabel>
66
+ </Field>
67
+ ))}
68
+ </RadioGroup>
69
+ );
70
+ }
71
+
72
+ /**
73
+ * A new webhook's form, as GitHub's: its URL, content type, secret, events and
74
+ * whether it's active. The secret is sent once and never shown again.
75
+ */
76
+ export function HookForm({ place }: { readonly place: RepoPlace }) {
77
+ const allowed = useAllowed(place);
78
+ const client = useQueryClient();
79
+ const navigate = useNavigate();
80
+ const [hook, setHook] = useState<Omit<NewHook, 'events'>>({
81
+ url: '',
82
+ contentType: 'json',
83
+ secret: '',
84
+ active: true,
85
+ });
86
+ const [events, setEvents] = useState<EventChoice>('push');
87
+ const [tried, setTried] = useState(false);
88
+ const made = useMutation({
89
+ mutationFn: () => createHook(place, { ...hook, events: eventChoices[events] }),
90
+ onSuccess: async () => {
91
+ await client.invalidateQueries({ queryKey: ['hooks', place.owner, place.repo] });
92
+ toast.success(`Added the webhook to ${hook.url}`);
93
+ await navigate({ href: settingsHref(place, 'hooks') });
94
+ },
95
+ });
96
+ const problem = urlProblem(hook.url);
97
+
98
+ if (!allowed.has('hook.create')) {
99
+ return (
100
+ <Alert>
101
+ <LockIcon />
102
+ <AlertDescription>
103
+ You can't add webhooks to {place.owner}/{place.repo}.
104
+ </AlertDescription>
105
+ </Alert>
106
+ );
107
+ }
108
+
109
+ const submit = (event: FormEvent<HTMLFormElement>) => {
110
+ event.preventDefault();
111
+ setTried(true);
112
+
113
+ if (problem === undefined && !made.isPending) made.mutate();
114
+ };
115
+
116
+ return (
117
+ <form noValidate aria-label="Add webhook" onSubmit={submit} className="flex flex-col gap-4">
118
+ <FieldGroup>
119
+ <Field data-invalid={tried && problem !== undefined}>
120
+ <FieldLabel htmlFor="hook-url" required>
121
+ Payload URL
122
+ </FieldLabel>
123
+ <Input
124
+ id="hook-url"
125
+ required
126
+ type="url"
127
+ placeholder="https://example.com/postreceive"
128
+ aria-invalid={tried && problem !== undefined}
129
+ value={hook.url}
130
+ onChange={(event) => setHook({ ...hook, url: event.target.value })}
131
+ />
132
+ {tried && <FieldError>{problem}</FieldError>}
133
+ </Field>
134
+ <FieldSet>
135
+ <FieldLegend variant="label">Content type</FieldLegend>
136
+ <Choice
137
+ label="Content type"
138
+ name="hook-content"
139
+ value={hook.contentType}
140
+ choices={[
141
+ ['json', 'application/json'],
142
+ ['form', 'application/x-www-form-urlencoded'],
143
+ ]}
144
+ onChange={(contentType) => setHook({ ...hook, contentType })}
145
+ />
146
+ </FieldSet>
147
+ <Field>
148
+ <FieldLabel htmlFor="hook-secret">Secret</FieldLabel>
149
+ <Input
150
+ id="hook-secret"
151
+ autoComplete="off"
152
+ value={hook.secret}
153
+ onChange={(event) => setHook({ ...hook, secret: event.target.value })}
154
+ />
155
+ <FieldDescription>
156
+ Signs each payload. It's saved with the webhook and never shown again.
157
+ </FieldDescription>
158
+ </Field>
159
+ <FieldSet>
160
+ <FieldLegend variant="label">
161
+ Which events would you like to trigger this webhook?
162
+ </FieldLegend>
163
+ <Choice
164
+ label="Events"
165
+ name="hook-events"
166
+ value={events}
167
+ choices={[
168
+ ['push', 'Just the push event'],
169
+ ['everything', 'Send me everything'],
170
+ ]}
171
+ onChange={setEvents}
172
+ />
173
+ </FieldSet>
174
+ <Field orientation="horizontal">
175
+ <Checkbox
176
+ id="hook-active"
177
+ checked={hook.active}
178
+ onCheckedChange={(checked) => setHook({ ...hook, active: checked })}
179
+ />
180
+ <FieldLabel htmlFor="hook-active">Active</FieldLabel>
181
+ </Field>
182
+ </FieldGroup>
183
+ <div className="flex justify-end">
184
+ <Button type="submit" disabled={made.isPending}>
185
+ Add webhook
186
+ </Button>
187
+ </div>
188
+ {made.error !== null && (
189
+ <Alert variant="destructive">
190
+ <AlertDescription>{made.error.message}</AlertDescription>
191
+ </Alert>
192
+ )}
193
+ </form>
194
+ );
195
+ }
@@ -0,0 +1,166 @@
1
+ import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
2
+ import { WebhookIcon } from 'lucide-react';
3
+
4
+ import { Go } from '../code/controls.tsx';
5
+ import type { RepoPlace } from '../code/places.ts';
6
+ import { ConfirmAction } from '../components/confirm-action.tsx';
7
+ import { LoadFailed } from '../components/states/states.tsx';
8
+ import { Badge } from '../components/ui/badge.tsx';
9
+ import {
10
+ Empty,
11
+ EmptyDescription,
12
+ EmptyHeader,
13
+ EmptyMedia,
14
+ EmptyTitle,
15
+ } from '../components/ui/empty.tsx';
16
+ import { Alert, AlertDescription } from '../components/ui/alert.tsx';
17
+ import { Skeleton } from '../components/ui/skeleton.tsx';
18
+ import {
19
+ Table,
20
+ TableBody,
21
+ TableCell,
22
+ TableHead,
23
+ TableHeader,
24
+ TableRow,
25
+ } from '../components/ui/table.tsx';
26
+ import { useAllowed } from '../hooks/allowed.ts';
27
+ import { deleteHook, hookList, type Hook } from './hooks.ts';
28
+ import { settingsHref } from './settings-layout.tsx';
29
+ import { CreateButton } from '../components/create-button.tsx';
30
+ import { ListToolbar } from '../components/list-toolbar.tsx';
31
+
32
+ /** What a hook is sent, in a few words: all of it, or the events it names. */
33
+ const eventsText = (events: readonly string[]) =>
34
+ events.includes('*') ? 'Every event' : events.join(', ');
35
+
36
+ /** One webhook's row, and Delete for whoever may delete it, asked in a dialog first. */
37
+ function HookRow({
38
+ place,
39
+ hook,
40
+ deletes,
41
+ }: {
42
+ readonly place: RepoPlace;
43
+ readonly hook: Hook;
44
+ readonly deletes: boolean;
45
+ }) {
46
+ const client = useQueryClient();
47
+ const deleted = useMutation({
48
+ mutationFn: () => deleteHook(place, hook.id),
49
+ onSuccess: () => client.invalidateQueries({ queryKey: ['hooks', place.owner, place.repo] }),
50
+ });
51
+
52
+ return (
53
+ <TableRow>
54
+ {/* A URL can be long: the cell wraps it, not the page. */}
55
+ <TableCell className="whitespace-normal">
56
+ <div className="flex flex-col gap-1">
57
+ <span className="font-medium wrap-anywhere">{hook.url}</span>
58
+ <span className="text-muted-foreground sm:hidden">
59
+ {eventsText(hook.events)} · {hook.contentType} · last delivery {hook.last ?? 'none yet'}
60
+ {hook.active ? ' · active' : ' · inactive'}
61
+ </span>
62
+ {deleted.error !== null && (
63
+ <Alert variant="destructive">
64
+ <AlertDescription>{deleted.error.message}</AlertDescription>
65
+ </Alert>
66
+ )}
67
+ </div>
68
+ </TableCell>
69
+ <TableCell className="hidden sm:table-cell whitespace-normal text-muted-foreground">
70
+ {eventsText(hook.events)} · {hook.contentType}
71
+ </TableCell>
72
+ <TableCell className="hidden sm:table-cell">
73
+ <div className="flex flex-wrap gap-1">
74
+ {/* Each hook says whether it's on: an inactive one stands out, an active one reads plainly. */}
75
+ {hook.active ? (
76
+ <span className="text-muted-foreground">Active</span>
77
+ ) : (
78
+ <Badge variant="outline">Inactive</Badge>
79
+ )}
80
+ {hook.last === null ? (
81
+ <span className="text-muted-foreground">None yet</span>
82
+ ) : (
83
+ <Badge variant="secondary">{hook.last}</Badge>
84
+ )}
85
+ </div>
86
+ </TableCell>
87
+ <TableCell className="text-right">
88
+ {deletes && (
89
+ <ConfirmAction
90
+ label="Delete"
91
+ title={`Delete the webhook to ${hook.url}?`}
92
+ description="Pushes and pull requests stop reaching it. This can’t be undone."
93
+ confirm="Delete webhook"
94
+ disabled={deleted.isPending}
95
+ onConfirm={() => deleted.mutate()}
96
+ />
97
+ )}
98
+ </TableCell>
99
+ </TableRow>
100
+ );
101
+ }
102
+
103
+ /** The repo's webhooks, with Add webhook for whoever may add one. */
104
+ export function HookList({ place }: { readonly place: RepoPlace }) {
105
+ const hooks = useQuery(hookList(place));
106
+ const allowed = useAllowed(place);
107
+
108
+ return (
109
+ <section aria-label="Webhooks" className="flex flex-col gap-3">
110
+ <ListToolbar
111
+ heading={<h2 className="text-lg font-semibold">Webhooks</h2>}
112
+ buttons={
113
+ allowed.has('hook.create') ? (
114
+ <CreateButton render={<Go href={settingsHref(place, 'hooks/new')} />}>
115
+ Add webhook
116
+ </CreateButton>
117
+ ) : undefined
118
+ }
119
+ />
120
+ <p className="text-sm text-muted-foreground">
121
+ Webhooks send a POST to an outside URL when something happens in this repository.
122
+ </p>
123
+ {hooks.error !== null ? (
124
+ <LoadFailed message={hooks.error.message} />
125
+ ) : hooks.data === undefined ? (
126
+ <Skeleton className="h-24" />
127
+ ) : hooks.data.length === 0 ? (
128
+ <Empty>
129
+ <EmptyHeader>
130
+ <EmptyMedia variant="icon">
131
+ <WebhookIcon />
132
+ </EmptyMedia>
133
+ <EmptyTitle>There aren't any webhooks here</EmptyTitle>
134
+ <EmptyDescription>
135
+ An added webhook is listed here, with its last delivery.
136
+ </EmptyDescription>
137
+ </EmptyHeader>
138
+ </Empty>
139
+ ) : (
140
+ <Table aria-label="Webhooks" className="border">
141
+ <TableHeader>
142
+ <TableRow>
143
+ <TableHead>Payload URL</TableHead>
144
+ {/* On a phone, events and the last delivery read under the URL instead. */}
145
+ <TableHead className="hidden sm:table-cell">Events</TableHead>
146
+ <TableHead className="hidden sm:table-cell">Last delivery</TableHead>
147
+ <TableHead>
148
+ <span className="sr-only">Delete</span>
149
+ </TableHead>
150
+ </TableRow>
151
+ </TableHeader>
152
+ <TableBody>
153
+ {hooks.data.map((hook) => (
154
+ <HookRow
155
+ key={hook.id}
156
+ place={place}
157
+ hook={hook}
158
+ deletes={allowed.has('hook.delete')}
159
+ />
160
+ ))}
161
+ </TableBody>
162
+ </Table>
163
+ )}
164
+ </section>
165
+ );
166
+ }
@@ -0,0 +1,87 @@
1
+ import type { components, operations } from '@octokit/openapi-types';
2
+ import { queryOptions } from '@tanstack/react-query';
3
+
4
+ import { github } from '../clients/clients.ts';
5
+ import type { RepoPlace } from '../code/places.ts';
6
+ import { everyPage, failure } from '../hooks/answers.ts';
7
+
8
+ type RestHook = components['schemas']['hook'];
9
+
10
+ /** A new hook's `config`, as GitHub's create takes it. */
11
+ type HookConfig = NonNullable<
12
+ NonNullable<operations['repos/create-webhook']['requestBody']>['content']['application/json']
13
+ >['config'];
14
+
15
+ /** A repo's webhook, as its settings list it: never its secret, which the drop-in masks. */
16
+ export interface Hook {
17
+ readonly id: number;
18
+ readonly url: string;
19
+ readonly contentType: string;
20
+ readonly events: readonly string[];
21
+ readonly active: boolean;
22
+ /** Its last delivery's answer, when it was sent one. */
23
+ readonly last: string | null;
24
+ }
25
+
26
+ /** A new webhook, as its form makes one: every event is `*`. */
27
+ export interface NewHook {
28
+ readonly url: string;
29
+ readonly contentType: 'json' | 'form';
30
+ readonly secret: string;
31
+ readonly events: readonly string[];
32
+ readonly active: boolean;
33
+ }
34
+
35
+ const hookOf = (hook: RestHook): Hook => ({
36
+ id: hook.id,
37
+ url: hook.config.url ?? '',
38
+ contentType: hook.config.content_type ?? 'form',
39
+ events: hook.events,
40
+ active: hook.active,
41
+ last: hook.last_response.code === null ? null : `${hook.last_response.code}`,
42
+ });
43
+
44
+ /** The repo's webhooks, every page of them. */
45
+ export const hookList = (place: RepoPlace) =>
46
+ queryOptions({
47
+ queryKey: ['hooks', place.owner, place.repo],
48
+ queryFn: async () => {
49
+ const hooks = await everyPage(async (after) => {
50
+ // `after` is the drop-in's cursor, which GitHub's types don't name: a spread passes it.
51
+ const answer = await github.GET('/repos/{owner}/{repo}/hooks', {
52
+ params: { path: place, query: { ...{ per_page: 100, after } } },
53
+ });
54
+ if (answer.data === undefined) throw failure("The webhooks didn't load", answer);
55
+
56
+ return { rows: answer.data.map(hookOf), link: answer.response.headers.get('link') };
57
+ });
58
+
59
+ return hooks.rows;
60
+ },
61
+ });
62
+
63
+ /** Adds a webhook to the repo; an empty secret sends none. */
64
+ export const createHook = async (place: RepoPlace, hook: NewHook) => {
65
+ const config: HookConfig = {
66
+ url: hook.url,
67
+ content_type: hook.contentType,
68
+ // Delivery always checks certificates, so the form never asks to skip it (Q247).
69
+ insecure_ssl: '0',
70
+ };
71
+ if (hook.secret !== '') config.secret = hook.secret;
72
+ const answer = await github.POST('/repos/{owner}/{repo}/hooks', {
73
+ params: { path: place },
74
+ body: { name: 'web', config, events: [...hook.events], active: hook.active },
75
+ });
76
+ if (answer.data === undefined) throw failure("The webhook wasn't added", answer);
77
+
78
+ return hookOf(answer.data);
79
+ };
80
+
81
+ /** Deletes the repo's webhook `id`. */
82
+ export const deleteHook = async (place: RepoPlace, id: number) => {
83
+ const answer = await github.DELETE('/repos/{owner}/{repo}/hooks/{hook_id}', {
84
+ params: { path: { ...place, hook_id: id } },
85
+ });
86
+ if (!answer.response.ok) throw failure("The webhook wasn't deleted", answer);
87
+ };