sanoma 0.11.18 → 0.11.21

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 (1334) hide show
  1. package/README.md +22 -22
  2. package/app/README.md +548 -0
  3. package/app/dist/api.d.ts +984 -0
  4. package/app/dist/api.js +261 -0
  5. package/app/dist/api.js.map +1 -0
  6. package/app/dist/app-bundle.d.ts +81 -0
  7. package/app/dist/app-bundle.js +13 -0
  8. package/app/dist/app-bundle.js.map +1 -0
  9. package/app/dist/build.d.ts +89 -0
  10. package/app/dist/build.js +843 -0
  11. package/app/dist/build.js.map +1 -0
  12. package/app/dist/bundle-build.d.ts +39 -0
  13. package/app/dist/bundle-build.js +585 -0
  14. package/app/dist/bundle-build.js.map +1 -0
  15. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +1 -0
  16. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +1 -0
  17. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +1 -0
  18. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +1 -0
  19. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +1 -0
  20. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +1 -0
  21. package/app/dist/client/assets/Play.es-BwXalGBh.js +1 -0
  22. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +1 -0
  23. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +1 -0
  24. package/app/dist/client/assets/Separator-BAhKFgSd.js +1 -0
  25. package/app/dist/client/assets/X.es-DKMYClf-.js +1 -0
  26. package/app/dist/client/assets/_id-BSRAaWtO.js +1 -0
  27. package/app/dist/client/assets/_id-BjDP-cPH.js +1 -0
  28. package/app/dist/client/assets/_id-BudM76zX.js +1 -0
  29. package/app/dist/client/assets/_id-C37U5bBa.js +1 -0
  30. package/app/dist/client/assets/_id-lmg24JVh.js +2 -0
  31. package/app/dist/client/assets/_name-CylqFo_t.js +1 -0
  32. package/app/dist/client/assets/_name-D8Gl8iwy.js +4 -0
  33. package/app/dist/client/assets/_name-DdPCU8pt.js +1 -0
  34. package/app/dist/client/assets/_name-TteWQXe0.js +1 -0
  35. package/app/dist/client/assets/_vendor-BLxW83yk.js +1 -0
  36. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +1 -0
  37. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +16 -0
  38. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +1 -0
  39. package/app/dist/client/assets/approval-DpgmTc63.js +1 -0
  40. package/app/dist/client/assets/apps-71ZEzcL9.js +1 -0
  41. package/app/dist/client/assets/apps-CoWzNm8M.js +1 -0
  42. package/app/dist/client/assets/change-glance-DbYcBT7H.js +1 -0
  43. package/app/dist/client/assets/changes-DIJvP7wQ.js +1 -0
  44. package/app/dist/client/assets/chat-button-BgpOfYh1.js +1 -0
  45. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +1 -0
  46. package/app/dist/client/assets/clipboard-Zb0yr0Ja.js +3 -0
  47. package/app/dist/client/assets/code-BVYaiQEr.js +32 -0
  48. package/app/dist/client/assets/common-Dw2i6XKZ.js +3 -0
  49. package/app/dist/client/assets/composite-D9GNDzFj.js +1 -0
  50. package/app/dist/client/assets/connect-CIq2KJTz.js +1 -0
  51. package/app/dist/client/assets/connections-iqd2XbWQ.js +5 -0
  52. package/app/dist/client/assets/connectors-rI8_D1n1.js +1 -0
  53. package/app/dist/client/assets/content-DOwCrGXH.js +1 -0
  54. package/app/dist/client/assets/credentials-26vu6Fv5.js +1 -0
  55. package/app/dist/client/assets/data-sDMlKaLV.js +1 -0
  56. package/app/dist/client/assets/decidable-zcYI7bY8.js +1 -0
  57. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +1 -0
  58. package/app/dist/client/assets/dialog-DskpUgkl.js +1 -0
  59. package/app/dist/client/assets/existing-BD3VgJ_8.js +1 -0
  60. package/app/dist/client/assets/fraunces-latin-ext-wght-normal-Ca2vKHc0.woff2 +0 -0
  61. package/app/dist/client/assets/fraunces-latin-wght-normal-ukD16Tqj.woff2 +0 -0
  62. package/app/dist/client/assets/fraunces-vietnamese-wght-normal-CnvboYUG.woff2 +0 -0
  63. package/app/dist/client/assets/graph-BBLU_iSl.css +1 -0
  64. package/app/dist/client/assets/graph-Prxl3c55.js +7 -0
  65. package/app/dist/client/assets/grid-diff-SMsvea6t.js +1 -0
  66. package/app/dist/client/assets/hosting-BBHUppH-.js +1 -0
  67. package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
  68. package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
  69. package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
  70. package/app/dist/client/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
  71. package/app/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
  72. package/app/dist/client/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
  73. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
  74. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
  75. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
  76. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
  77. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
  78. package/app/dist/client/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
  79. package/app/dist/client/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
  80. package/app/dist/client/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
  81. package/app/dist/client/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
  82. package/app/dist/client/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
  83. package/app/dist/client/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
  84. package/app/dist/client/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
  85. package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
  86. package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
  87. package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
  88. package/app/dist/client/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
  89. package/app/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
  90. package/app/dist/client/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
  91. package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
  92. package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
  93. package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
  94. package/app/dist/client/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
  95. package/app/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
  96. package/app/dist/client/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
  97. package/app/dist/client/assets/ibm-plex-sans-cyrillic-ext-wght-italic-O9KpBTMP.woff2 +0 -0
  98. package/app/dist/client/assets/ibm-plex-sans-cyrillic-ext-wght-normal-d45eAU9y.woff2 +0 -0
  99. package/app/dist/client/assets/ibm-plex-sans-cyrillic-wght-italic-BC1D_hcE.woff2 +0 -0
  100. package/app/dist/client/assets/ibm-plex-sans-cyrillic-wght-normal-BAAhND-U.woff2 +0 -0
  101. package/app/dist/client/assets/ibm-plex-sans-greek-wght-italic-BOZ1G-_q.woff2 +0 -0
  102. package/app/dist/client/assets/ibm-plex-sans-greek-wght-normal-CmyJS8uq.woff2 +0 -0
  103. package/app/dist/client/assets/ibm-plex-sans-latin-ext-wght-italic-QwKXLQRc.woff2 +0 -0
  104. package/app/dist/client/assets/ibm-plex-sans-latin-ext-wght-normal-CIII54If.woff2 +0 -0
  105. package/app/dist/client/assets/ibm-plex-sans-latin-wght-italic-DKUSOBgV.woff2 +0 -0
  106. package/app/dist/client/assets/ibm-plex-sans-latin-wght-normal-IvpUvPa2.woff2 +0 -0
  107. package/app/dist/client/assets/ibm-plex-sans-vietnamese-wght-italic-CKSJVnJa.woff2 +0 -0
  108. package/app/dist/client/assets/ibm-plex-sans-vietnamese-wght-normal-Dg1JeJN0.woff2 +0 -0
  109. package/app/dist/client/assets/import-B92fd4Tl.js +1 -0
  110. package/app/dist/client/assets/inbox-57oGZtxE.js +1 -0
  111. package/app/dist/client/assets/inbox-B2AMNtk5.js +1 -0
  112. package/app/dist/client/assets/index-Bn3XeKy8.js +10 -0
  113. package/app/dist/client/assets/kit-BsK6VZTQ.js +1 -0
  114. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +1 -0
  115. package/app/dist/client/assets/lines-DuFrbGkQ.js +3 -0
  116. package/app/dist/client/assets/motion-C8lNeYvK.js +1 -0
  117. package/app/dist/client/assets/names-COx1nqcj.js +1 -0
  118. package/app/dist/client/assets/people-ISOMYCTu.js +1 -0
  119. package/app/dist/client/assets/permissions-Cenat84K.js +2 -0
  120. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +1 -0
  121. package/app/dist/client/assets/route-BP1XwaTB.js +1 -0
  122. package/app/dist/client/assets/route-KVU6QgwJ.js +1 -0
  123. package/app/dist/client/assets/runs-table-35lNzKLn.js +1 -0
  124. package/app/dist/client/assets/scenario-DSwsavxS.js +1 -0
  125. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +1 -0
  126. package/app/dist/client/assets/schema-BpqanhX0.js +1 -0
  127. package/app/dist/client/assets/separator-BlwkzEY0.js +1 -0
  128. package/app/dist/client/assets/sheet-BYL9XU5s.js +1 -0
  129. package/app/dist/client/assets/site-icon-DZvOfBvU.js +1 -0
  130. package/app/dist/client/assets/sites.index-CcNo6N8u.js +1 -0
  131. package/app/dist/client/assets/spinner-BGy6LWIW.js +1 -0
  132. package/app/dist/client/assets/start-form-Bgo9I63s.js +1 -0
  133. package/app/dist/client/assets/store-BGu0d2Ld.js +57 -0
  134. package/app/dist/client/assets/style-CCDLLPgG.css +2 -0
  135. package/app/dist/client/assets/table-DjbI5VTn.js +1 -0
  136. package/app/dist/client/assets/textarea-DXO0eUdp.js +1 -0
  137. package/app/dist/client/assets/useLoaderData-BQd5yMlA.js +1 -0
  138. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +1 -0
  139. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +1 -0
  140. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +1 -0
  141. package/app/dist/client/assets/utils-CMsCvwYQ.js +1 -0
  142. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +1 -0
  143. package/app/dist/client/assets/workflow-BJpO61A-.js +1 -0
  144. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +1 -0
  145. package/app/dist/client/assets/workflows-BLCBgxbx.js +1 -0
  146. package/app/dist/components/grid/plan.d.ts +373 -0
  147. package/app/dist/components/grid/plan.js +347 -0
  148. package/app/dist/components/grid/plan.js.map +1 -0
  149. package/app/dist/content-files.d.ts +59 -0
  150. package/app/dist/content-files.js +218 -0
  151. package/app/dist/content-files.js.map +1 -0
  152. package/app/dist/content-types.d.ts +39 -0
  153. package/app/dist/content-types.js +16 -0
  154. package/app/dist/content-types.js.map +1 -0
  155. package/app/dist/context.d.ts +92 -0
  156. package/app/dist/context.js +2 -0
  157. package/app/dist/context.js.map +1 -0
  158. package/app/dist/handler.d.ts +72 -0
  159. package/app/dist/handler.js +179 -0
  160. package/app/dist/handler.js.map +1 -0
  161. package/app/dist/index.d.ts +81 -0
  162. package/app/dist/index.js +345 -0
  163. package/app/dist/index.js.map +1 -0
  164. package/app/dist/lib/apply-plan.d.ts +29 -0
  165. package/app/dist/lib/apply-plan.js +65 -0
  166. package/app/dist/lib/apply-plan.js.map +1 -0
  167. package/app/dist/lib/chat.d.ts +104 -0
  168. package/app/dist/lib/chat.js +72 -0
  169. package/app/dist/lib/chat.js.map +1 -0
  170. package/app/dist/lib/names.d.ts +4 -0
  171. package/app/dist/lib/names.js +11 -0
  172. package/app/dist/lib/names.js.map +1 -0
  173. package/app/dist/login/admission.d.ts +16 -0
  174. package/app/dist/login/admission.js +63 -0
  175. package/app/dist/login/admission.js.map +1 -0
  176. package/app/dist/login/keys.d.ts +32 -0
  177. package/app/dist/login/keys.js +60 -0
  178. package/app/dist/login/keys.js.map +1 -0
  179. package/app/dist/login/page.d.ts +23 -0
  180. package/app/dist/login/page.js +95 -0
  181. package/app/dist/login/page.js.map +1 -0
  182. package/app/dist/login/public.d.ts +30 -0
  183. package/app/dist/login/public.js +101 -0
  184. package/app/dist/login/public.js.map +1 -0
  185. package/app/dist/login/staff.d.ts +23 -0
  186. package/app/dist/login/staff.js +330 -0
  187. package/app/dist/login/staff.js.map +1 -0
  188. package/app/dist/loopback.d.ts +32 -0
  189. package/app/dist/loopback.js +84 -0
  190. package/app/dist/loopback.js.map +1 -0
  191. package/app/dist/seo.d.ts +33 -0
  192. package/app/dist/seo.js +66 -0
  193. package/app/dist/seo.js.map +1 -0
  194. package/app/dist/server/assets/_id-BViXAagq.js +689 -0
  195. package/app/dist/server/assets/_id-Dt9tTylX.js +19 -0
  196. package/app/dist/server/assets/_id-ce1EGp7Y.js +30 -0
  197. package/app/dist/server/assets/_id-wB8khGTz.js +82 -0
  198. package/app/dist/server/assets/_id-wuJIq2ZZ.js +13 -0
  199. package/app/dist/server/assets/_name-BGagGBjX.js +371 -0
  200. package/app/dist/server/assets/_name-BqFwnyf7.js +30 -0
  201. package/app/dist/server/assets/_name-D_-MhjNf.js +2951 -0
  202. package/app/dist/server/assets/_name-DntbHE-b.js +350 -0
  203. package/app/dist/server/assets/_tanstack-start-manifest_v-BljuBM-G.js +259 -0
  204. package/app/dist/server/assets/_vendor-CNB03LWX.js +137 -0
  205. package/app/dist/server/assets/_vendor-CcEviOki.js +20 -0
  206. package/app/dist/server/assets/actor-D6iA0pDg.js +94 -0
  207. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +1410 -0
  208. package/app/dist/server/assets/app-scope-CXIgOFmi.js +79 -0
  209. package/app/dist/server/assets/apply-plan-ybBda6vQ.js +265 -0
  210. package/app/dist/server/assets/approval-Su315ikC.js +315 -0
  211. package/app/dist/server/assets/apps-Dbg2f5Lh.js +6 -0
  212. package/app/dist/server/assets/apps-xwQAehch.js +184 -0
  213. package/app/dist/server/assets/button-f9Lc8qLl.js +906 -0
  214. package/app/dist/server/assets/change-glance-CpArIbGS.js +142 -0
  215. package/app/dist/server/assets/changes-Bc_OiDBD.js +103 -0
  216. package/app/dist/server/assets/chat-DMN_hoKm.js +857 -0
  217. package/app/dist/server/assets/chat-button-LtA80MoR.js +19 -0
  218. package/app/dist/server/assets/chat-prompt-BYwbMxR6.js +10 -0
  219. package/app/dist/server/assets/clipboard-lnKxNXLI.js +70 -0
  220. package/app/dist/server/assets/code-COyt8L-n.js +123 -0
  221. package/app/dist/server/assets/common-CWHLj7KV.js +1036 -0
  222. package/app/dist/server/assets/connect-BpPiu5s6.js +165 -0
  223. package/app/dist/server/assets/connections-DBgb1bvX.js +1197 -0
  224. package/app/dist/server/assets/connectors-5a5_SlHO.js +186 -0
  225. package/app/dist/server/assets/content-B9KP-eh3.js +3 -0
  226. package/app/dist/server/assets/credentials-ud_Y68hx.js +187 -0
  227. package/app/dist/server/assets/data-aEdhwcqy.js +168 -0
  228. package/app/dist/server/assets/decidable-Dj5xIrIc.js +13 -0
  229. package/app/dist/server/assets/declaration-form-Dfg1yNuY.js +183 -0
  230. package/app/dist/server/assets/dialog-BGjiw3Dx.js +84 -0
  231. package/app/dist/server/assets/dropdown-menu-DAC3LWas.js +97 -0
  232. package/app/dist/server/assets/empty-plugin-adapters-CeuNAGfU.js +4 -0
  233. package/app/dist/server/assets/existing-B4d4NrC8.js +125 -0
  234. package/app/dist/server/assets/field-C0Xx_90s.js +94 -0
  235. package/app/dist/server/assets/functions-BvFYzabD.js +824 -0
  236. package/app/dist/server/assets/graph-qYOdoz2s.js +926 -0
  237. package/app/dist/server/assets/grid-diff-jTvp-8wS.js +171 -0
  238. package/app/dist/server/assets/hosting-bbn9UvDc.js +718 -0
  239. package/app/dist/server/assets/import-DIwvzHb6.js +730 -0
  240. package/app/dist/server/assets/inbox-D6R6sWBB.js +268 -0
  241. package/app/dist/server/assets/inbox-Dj-5FleF.js +65 -0
  242. package/app/dist/server/assets/input-D63gF3G2.js +14 -0
  243. package/app/dist/server/assets/item-BDSXoEr_.js +97 -0
  244. package/app/dist/server/assets/kit-D6EulwBe.js +489 -0
  245. package/app/dist/server/assets/lines-B4w04QZ0.js +27 -0
  246. package/app/dist/server/assets/middleware-B8JRLyxx.js +1420 -0
  247. package/app/dist/server/assets/motion-CAc7ab9u.js +35 -0
  248. package/app/dist/server/assets/names-B04Si-sV.js +9 -0
  249. package/app/dist/server/assets/native-select-DLa-He0n.js +37 -0
  250. package/app/dist/server/assets/people-CkU_AxrV.js +553 -0
  251. package/app/dist/server/assets/permissions-BfMcQqQb.js +256 -0
  252. package/app/dist/server/assets/permissions-grid-DWP9FAAS.js +91 -0
  253. package/app/dist/server/assets/route-BTT7nMJq.js +17 -0
  254. package/app/dist/server/assets/route-CF_8jQYY.js +22 -0
  255. package/app/dist/server/assets/router-BvYtxrVN.js +2334 -0
  256. package/app/dist/server/assets/runs-table-BBudn12Y.js +87 -0
  257. package/app/dist/server/assets/scenario-BXGTSTiP.js +141 -0
  258. package/app/dist/server/assets/scenario-graph-BErXIRgF.js +46 -0
  259. package/app/dist/server/assets/schema-DBT8KJsP.js +204 -0
  260. package/app/dist/server/assets/separator-8MZ7vR3f.js +13 -0
  261. package/app/dist/server/assets/sheet-5Cyp-4UW.js +74 -0
  262. package/app/dist/server/assets/site-icon-DJisMQUK.js +22 -0
  263. package/app/dist/server/assets/sites.index-1l0BtgVf.js +138 -0
  264. package/app/dist/server/assets/spinner-C1ZW08lp.js +15 -0
  265. package/app/dist/server/assets/start-CSU4irVK.js +75 -0
  266. package/app/dist/server/assets/start-form-DI60UOrc.js +399 -0
  267. package/app/dist/server/assets/table-DtPk_h_5.js +51 -0
  268. package/app/dist/server/assets/textarea-f0Ip5ed1.js +12 -0
  269. package/app/dist/server/assets/utils-wksS9pYh.js +138 -0
  270. package/app/dist/server/assets/who-are-you-ZGyMnpVi.js +122 -0
  271. package/app/dist/server/assets/workflow-Z99QWO42.js +115 -0
  272. package/app/dist/server/assets/workflow-view-C8X8U11S.js +1427 -0
  273. package/app/dist/server/assets/workflows-C0kJoGf1.js +344 -0
  274. package/app/dist/server/chat.d.ts +35 -0
  275. package/app/dist/server/chat.js +231 -0
  276. package/app/dist/server/chat.js.map +1 -0
  277. package/app/dist/server/core.d.ts +186 -0
  278. package/app/dist/server/core.js +716 -0
  279. package/app/dist/server/core.js.map +1 -0
  280. package/app/dist/server/go-live.d.ts +90 -0
  281. package/app/dist/server/go-live.js +351 -0
  282. package/app/dist/server/go-live.js.map +1 -0
  283. package/app/dist/server/models.d.ts +24 -0
  284. package/app/dist/server/models.js +42 -0
  285. package/app/dist/server/models.js.map +1 -0
  286. package/app/dist/server/people.d.ts +14 -0
  287. package/app/dist/server/people.js +41 -0
  288. package/app/dist/server/people.js.map +1 -0
  289. package/app/dist/server/secrets.d.ts +3 -0
  290. package/app/dist/server/secrets.js +5 -0
  291. package/app/dist/server/secrets.js.map +1 -0
  292. package/app/dist/server/server.js +7024 -0
  293. package/app/dist/server/setup.d.ts +75 -0
  294. package/app/dist/server/setup.js +308 -0
  295. package/app/dist/server/setup.js.map +1 -0
  296. package/app/dist/server/webhooks.d.ts +11 -0
  297. package/app/dist/server/webhooks.js +40 -0
  298. package/app/dist/server/webhooks.js.map +1 -0
  299. package/app/dist/site-path.d.ts +24 -0
  300. package/app/dist/site-path.js +27 -0
  301. package/app/dist/site-path.js.map +1 -0
  302. package/app/dist/snapshot-build.d.ts +23 -0
  303. package/app/dist/snapshot-build.js +255 -0
  304. package/app/dist/snapshot-build.js.map +1 -0
  305. package/app/dist/snapshot.d.ts +56 -0
  306. package/app/dist/snapshot.js +19 -0
  307. package/app/dist/snapshot.js.map +1 -0
  308. package/app/dist/steps/agent/acp.d.ts +116 -0
  309. package/app/dist/steps/agent/acp.js +788 -0
  310. package/app/dist/steps/agent/acp.js.map +1 -0
  311. package/app/dist/steps/agent/box-session.d.ts +46 -0
  312. package/app/dist/steps/agent/box-session.js +179 -0
  313. package/app/dist/steps/agent/box-session.js.map +1 -0
  314. package/app/dist/steps/agent/carrier.d.ts +56 -0
  315. package/app/dist/steps/agent/carrier.js +215 -0
  316. package/app/dist/steps/agent/carrier.js.map +1 -0
  317. package/app/dist/steps/agent/checkout.d.ts +73 -0
  318. package/app/dist/steps/agent/checkout.js +167 -0
  319. package/app/dist/steps/agent/checkout.js.map +1 -0
  320. package/app/dist/steps/agent/harness.d.ts +5 -0
  321. package/app/dist/steps/agent/harness.js +199 -0
  322. package/app/dist/steps/agent/harness.js.map +1 -0
  323. package/app/dist/steps/agent/local-box.d.ts +16 -0
  324. package/app/dist/steps/agent/local-box.js +37 -0
  325. package/app/dist/steps/agent/local-box.js.map +1 -0
  326. package/app/dist/steps/agent/loop.d.ts +3 -0
  327. package/app/dist/steps/agent/loop.js +60 -0
  328. package/app/dist/steps/agent/loop.js.map +1 -0
  329. package/app/dist/steps/agent/prompt.d.ts +9 -0
  330. package/app/dist/steps/agent/prompt.js +107 -0
  331. package/app/dist/steps/agent/prompt.js.map +1 -0
  332. package/app/dist/steps/agent/tools.d.ts +2814 -0
  333. package/app/dist/steps/agent/tools.js +248 -0
  334. package/app/dist/steps/agent/tools.js.map +1 -0
  335. package/app/dist/steps/agent/transcript.d.ts +19 -0
  336. package/app/dist/steps/agent/transcript.js +66 -0
  337. package/app/dist/steps/agent/transcript.js.map +1 -0
  338. package/app/dist/steps/agent/turn.d.ts +17 -0
  339. package/app/dist/steps/agent/turn.js +59 -0
  340. package/app/dist/steps/agent/turn.js.map +1 -0
  341. package/app/dist/steps/connect.d.ts +25 -0
  342. package/app/dist/steps/connect.js +141 -0
  343. package/app/dist/steps/connect.js.map +1 -0
  344. package/app/dist/steps/go-live.d.ts +40 -0
  345. package/app/dist/steps/go-live.js +310 -0
  346. package/app/dist/steps/go-live.js.map +1 -0
  347. package/app/dist/steps/index.d.ts +3 -0
  348. package/app/dist/steps/index.js +11 -0
  349. package/app/dist/steps/index.js.map +1 -0
  350. package/app/dist/steps/writes.d.ts +29 -0
  351. package/app/dist/steps/writes.js +174 -0
  352. package/app/dist/steps/writes.js.map +1 -0
  353. package/app/dist/stylesheet.json +1 -0
  354. package/app/src/actor.ts +130 -0
  355. package/app/src/api-client.ts +73 -0
  356. package/app/src/api.ts +686 -0
  357. package/app/src/app-bundle.ts +77 -0
  358. package/app/src/build.ts +907 -0
  359. package/app/src/bundle-build.ts +661 -0
  360. package/app/src/components/app-chrome.tsx +107 -0
  361. package/app/src/components/app-scope.tsx +98 -0
  362. package/app/src/components/apply-plan.tsx +191 -0
  363. package/app/src/components/approval.tsx +367 -0
  364. package/app/src/components/base-node.tsx +12 -0
  365. package/app/src/components/boundaries.tsx +64 -0
  366. package/app/src/components/change-decision.tsx +123 -0
  367. package/app/src/components/change-glance.tsx +44 -0
  368. package/app/src/components/chat-button.tsx +20 -0
  369. package/app/src/components/code.tsx +116 -0
  370. package/app/src/components/common.tsx +895 -0
  371. package/app/src/components/connections.tsx +844 -0
  372. package/app/src/components/credentials.tsx +219 -0
  373. package/app/src/components/data-grid.tsx +247 -0
  374. package/app/src/components/declaration-form.tsx +194 -0
  375. package/app/src/components/density.tsx +44 -0
  376. package/app/src/components/field-diff.tsx +91 -0
  377. package/app/src/components/go-live.tsx +669 -0
  378. package/app/src/components/graph.css +14 -0
  379. package/app/src/components/graph.tsx +563 -0
  380. package/app/src/components/grid/cell.tsx +149 -0
  381. package/app/src/components/grid/clipboard.ts +83 -0
  382. package/app/src/components/grid/collection.ts +476 -0
  383. package/app/src/components/grid/columns.tsx +357 -0
  384. package/app/src/components/grid/conflicts.tsx +81 -0
  385. package/app/src/components/grid/gestures.ts +169 -0
  386. package/app/src/components/grid/grid.tsx +760 -0
  387. package/app/src/components/grid/keys.ts +83 -0
  388. package/app/src/components/grid/plan.ts +389 -0
  389. package/app/src/components/grid/review.tsx +340 -0
  390. package/app/src/components/grid/staged.tsx +454 -0
  391. package/app/src/components/import/match.tsx +212 -0
  392. package/app/src/components/import/review.tsx +121 -0
  393. package/app/src/components/import/sheet.ts +166 -0
  394. package/app/src/components/import/upload.tsx +116 -0
  395. package/app/src/components/inspector.tsx +310 -0
  396. package/app/src/components/kit.tsx +276 -0
  397. package/app/src/components/ledger.tsx +344 -0
  398. package/app/src/components/new-run.tsx +114 -0
  399. package/app/src/components/permissions-diff.tsx +66 -0
  400. package/app/src/components/permissions-grid.tsx +133 -0
  401. package/app/src/components/record-form.tsx +208 -0
  402. package/app/src/components/record-history.tsx +119 -0
  403. package/app/src/components/runs-table.tsx +111 -0
  404. package/app/src/components/scenario.tsx +102 -0
  405. package/app/src/components/shell/bar.tsx +285 -0
  406. package/app/src/components/shell/chat-parts.tsx +326 -0
  407. package/app/src/components/shell/chat-prompt.ts +26 -0
  408. package/app/src/components/shell/chat.tsx +375 -0
  409. package/app/src/components/shell/draft-card.tsx +123 -0
  410. package/app/src/components/shell/nav-user.tsx +174 -0
  411. package/app/src/components/shell/prefs.ts +28 -0
  412. package/app/src/components/site-icon.tsx +17 -0
  413. package/app/src/components/store-move.tsx +313 -0
  414. package/app/src/components/ui/alert.tsx +55 -0
  415. package/app/src/components/ui/avatar.tsx +90 -0
  416. package/app/src/components/ui/badge.tsx +48 -0
  417. package/app/src/components/ui/breadcrumb.tsx +92 -0
  418. package/app/src/components/ui/button-group.tsx +78 -0
  419. package/app/src/components/ui/button.tsx +49 -0
  420. package/app/src/components/ui/card.tsx +69 -0
  421. package/app/src/components/ui/checkbox.tsx +25 -0
  422. package/app/src/components/ui/collapsible.tsx +15 -0
  423. package/app/src/components/ui/dialog.tsx +132 -0
  424. package/app/src/components/ui/dropdown-menu.tsx +252 -0
  425. package/app/src/components/ui/empty.tsx +86 -0
  426. package/app/src/components/ui/field.tsx +218 -0
  427. package/app/src/components/ui/input.tsx +19 -0
  428. package/app/src/components/ui/item.tsx +179 -0
  429. package/app/src/components/ui/label.tsx +17 -0
  430. package/app/src/components/ui/native-select.tsx +47 -0
  431. package/app/src/components/ui/popover.tsx +62 -0
  432. package/app/src/components/ui/separator.tsx +18 -0
  433. package/app/src/components/ui/sheet.tsx +102 -0
  434. package/app/src/components/ui/skeleton.tsx +7 -0
  435. package/app/src/components/ui/slider.tsx +40 -0
  436. package/app/src/components/ui/sonner.tsx +41 -0
  437. package/app/src/components/ui/spinner.tsx +17 -0
  438. package/app/src/components/ui/table.tsx +72 -0
  439. package/app/src/components/ui/tabs.tsx +68 -0
  440. package/app/src/components/ui/textarea.tsx +17 -0
  441. package/app/src/components/ui/tooltip.tsx +51 -0
  442. package/app/src/components/who-are-you.tsx +128 -0
  443. package/app/src/components/workflow-runs.tsx +213 -0
  444. package/app/src/components/workflow-view.tsx +293 -0
  445. package/app/src/components/workflow.tsx +142 -0
  446. package/app/src/components/zoom-slider.tsx +69 -0
  447. package/app/src/content-files.ts +248 -0
  448. package/app/src/content-types.ts +49 -0
  449. package/app/src/content.ts +49 -0
  450. package/app/src/context.ts +91 -0
  451. package/app/src/dev-imports.ts +5 -0
  452. package/app/src/env.d.ts +48 -0
  453. package/app/src/form/run-form.tsx +45 -0
  454. package/app/src/form/schema.ts +308 -0
  455. package/app/src/form/secure-fields.ts +42 -0
  456. package/app/src/form/start-form.tsx +427 -0
  457. package/app/src/form/will-ask.tsx +25 -0
  458. package/app/src/functions.ts +300 -0
  459. package/app/src/graph/layout.ts +238 -0
  460. package/app/src/graph/outline-graph.ts +123 -0
  461. package/app/src/graph/run-graph.ts +193 -0
  462. package/app/src/graph/scenario-graph.ts +48 -0
  463. package/app/src/graph/types.ts +144 -0
  464. package/app/src/graph/wildcard.ts +40 -0
  465. package/app/src/handler.ts +257 -0
  466. package/app/src/icon-small.svg +1 -0
  467. package/app/src/icon.svg +1 -0
  468. package/app/src/index.ts +455 -0
  469. package/app/src/lib/apply-plan.ts +79 -0
  470. package/app/src/lib/apps.ts +10 -0
  471. package/app/src/lib/changes.ts +86 -0
  472. package/app/src/lib/chat.ts +146 -0
  473. package/app/src/lib/cn-tables.ts +116 -0
  474. package/app/src/lib/decidable.ts +21 -0
  475. package/app/src/lib/desktop.ts +52 -0
  476. package/app/src/lib/grid-diff.ts +205 -0
  477. package/app/src/lib/inbox.ts +59 -0
  478. package/app/src/lib/lines.ts +31 -0
  479. package/app/src/lib/locales.ts +101 -0
  480. package/app/src/lib/motion.ts +17 -0
  481. package/app/src/lib/names.ts +12 -0
  482. package/app/src/lib/preview.ts +49 -0
  483. package/app/src/lib/records.ts +56 -0
  484. package/app/src/lib/sites.ts +92 -0
  485. package/app/src/lib/time.ts +10 -0
  486. package/app/src/lib/tone.ts +78 -0
  487. package/app/src/lib/utils.ts +13 -0
  488. package/app/src/login/admission.ts +72 -0
  489. package/app/src/login/keys.ts +65 -0
  490. package/app/src/login/page.ts +119 -0
  491. package/app/src/login/public.ts +138 -0
  492. package/app/src/login/staff.ts +399 -0
  493. package/app/src/loopback.ts +96 -0
  494. package/app/src/middleware.ts +26 -0
  495. package/app/src/public-fns.ts +5 -0
  496. package/app/src/queries.ts +859 -0
  497. package/app/src/router.tsx +45 -0
  498. package/app/src/routes/__root.tsx +223 -0
  499. package/app/src/routes/api/call.ts +17 -0
  500. package/app/src/routes/api/chat.ts +15 -0
  501. package/app/src/routes/api/sign-in.ts +14 -0
  502. package/app/src/routes/apps/$name.tsx +380 -0
  503. package/app/src/routes/apps/index.tsx +204 -0
  504. package/app/src/routes/apps/route.tsx +8 -0
  505. package/app/src/routes/changes/$id.tsx +205 -0
  506. package/app/src/routes/changes/index.tsx +103 -0
  507. package/app/src/routes/changes/route.tsx +8 -0
  508. package/app/src/routes/connect/$vendor/callback.ts +9 -0
  509. package/app/src/routes/connectors/$vendor.tsx +184 -0
  510. package/app/src/routes/connectors/index.tsx +194 -0
  511. package/app/src/routes/connectors/route.tsx +8 -0
  512. package/app/src/routes/data/$name/import.tsx +177 -0
  513. package/app/src/routes/data/$name/index.tsx +266 -0
  514. package/app/src/routes/data/$name/route.tsx +18 -0
  515. package/app/src/routes/data/index.tsx +178 -0
  516. package/app/src/routes/data/route.tsx +11 -0
  517. package/app/src/routes/hosting/connect.tsx +156 -0
  518. package/app/src/routes/hosting/existing.tsx +115 -0
  519. package/app/src/routes/hosting/index.tsx +845 -0
  520. package/app/src/routes/hosting/route.tsx +11 -0
  521. package/app/src/routes/inbox.tsx +310 -0
  522. package/app/src/routes/index.tsx +8 -0
  523. package/app/src/routes/people.tsx +624 -0
  524. package/app/src/routes/permissions.tsx +284 -0
  525. package/app/src/routes/resources.tsx +10 -0
  526. package/app/src/routes/runs/$id.tsx +14 -0
  527. package/app/src/routes/runs/index.tsx +8 -0
  528. package/app/src/routes/setup/connect.tsx +10 -0
  529. package/app/src/routes/setup/existing.tsx +8 -0
  530. package/app/src/routes/setup/github/callback.ts +7 -0
  531. package/app/src/routes/setup/github/manifest.ts +7 -0
  532. package/app/src/routes/setup/index.tsx +8 -0
  533. package/app/src/routes/sites.index.tsx +131 -0
  534. package/app/src/routes/start.tsx +15 -0
  535. package/app/src/routes/workflows/$name/index.tsx +140 -0
  536. package/app/src/routes/workflows/$name/new.tsx +11 -0
  537. package/app/src/routes/workflows/$name/route.tsx +58 -0
  538. package/app/src/routes/workflows/$name/runs/$id.tsx +97 -0
  539. package/app/src/routes/workflows/index.tsx +413 -0
  540. package/app/src/routes/workflows/route.tsx +11 -0
  541. package/app/src/seo.ts +94 -0
  542. package/app/src/server/available.ts +89 -0
  543. package/app/src/server/chat.ts +249 -0
  544. package/app/src/server/columns.ts +52 -0
  545. package/app/src/server/connect.ts +89 -0
  546. package/app/src/server/core.ts +889 -0
  547. package/app/src/server/go-live.ts +420 -0
  548. package/app/src/server/host-derived.ts +72 -0
  549. package/app/src/server/models.ts +52 -0
  550. package/app/src/server/people.ts +51 -0
  551. package/app/src/server/secrets.ts +6 -0
  552. package/app/src/server/setup.ts +335 -0
  553. package/app/src/server/webhooks.ts +38 -0
  554. package/app/src/server.ts +4 -0
  555. package/app/src/site-path.ts +35 -0
  556. package/app/src/site-url.ts +53 -0
  557. package/app/src/site.ts +154 -0
  558. package/app/src/snapshot-build.ts +288 -0
  559. package/app/src/snapshot.ts +69 -0
  560. package/app/src/start.ts +63 -0
  561. package/app/src/steps/agent/acp.ts +918 -0
  562. package/app/src/steps/agent/box-session.ts +230 -0
  563. package/app/src/steps/agent/carrier.ts +242 -0
  564. package/app/src/steps/agent/checkout.ts +222 -0
  565. package/app/src/steps/agent/harness.ts +265 -0
  566. package/app/src/steps/agent/local-box.ts +40 -0
  567. package/app/src/steps/agent/loop.ts +80 -0
  568. package/app/src/steps/agent/prompt.ts +124 -0
  569. package/app/src/steps/agent/tools.ts +300 -0
  570. package/app/src/steps/agent/transcript.ts +95 -0
  571. package/app/src/steps/agent/turn.ts +63 -0
  572. package/app/src/steps/connect.ts +151 -0
  573. package/app/src/steps/go-live.ts +358 -0
  574. package/app/src/steps/index.ts +13 -0
  575. package/app/src/steps/writes.ts +200 -0
  576. package/app/src/style.css +69 -0
  577. package/app/src/ui.css +301 -0
  578. package/app/src/ui.ts +147 -0
  579. package/app/src/worker/app.ts +189 -0
  580. package/app/src/worker/assets.ts +12 -0
  581. package/app/src/worker/main.ts +32 -0
  582. package/app/src/worker/missing.js +13 -0
  583. package/app/tsconfig.site.json +20 -0
  584. package/better-auth/README.md +115 -0
  585. package/better-auth/dist/connector.d.ts +5 -0
  586. package/better-auth/dist/connector.js +14 -0
  587. package/better-auth/dist/connector.js.map +1 -0
  588. package/better-auth/dist/db/staff.d.ts +695 -0
  589. package/better-auth/dist/db/staff.js +4 -0
  590. package/better-auth/dist/db/staff.js.map +1 -0
  591. package/better-auth/dist/db/tables.d.ts +702 -0
  592. package/better-auth/dist/db/tables.js +69 -0
  593. package/better-auth/dist/db/tables.js.map +1 -0
  594. package/better-auth/dist/db/visitors.d.ts +695 -0
  595. package/better-auth/dist/db/visitors.js +4 -0
  596. package/better-auth/dist/db/visitors.js.map +1 -0
  597. package/better-auth/dist/index.d.ts +11 -0
  598. package/better-auth/dist/index.js +16 -0
  599. package/better-auth/dist/index.js.map +1 -0
  600. package/better-auth/dist/instance.d.ts +716 -0
  601. package/better-auth/dist/instance.js +210 -0
  602. package/better-auth/dist/instance.js.map +1 -0
  603. package/better-auth/dist/login.d.ts +13 -0
  604. package/better-auth/dist/login.js +139 -0
  605. package/better-auth/dist/login.js.map +1 -0
  606. package/better-auth/dist/staff.d.ts +12 -0
  607. package/better-auth/dist/staff.js +254 -0
  608. package/better-auth/dist/staff.js.map +1 -0
  609. package/better-auth/drizzle/staff/0000_closed_toro.sql +64 -0
  610. package/better-auth/drizzle/staff/meta/0000_snapshot.json +431 -0
  611. package/better-auth/drizzle/staff/meta/_journal.json +13 -0
  612. package/better-auth/drizzle/visitors/0000_natural_dexter_bennett.sql +64 -0
  613. package/better-auth/drizzle/visitors/meta/0000_snapshot.json +431 -0
  614. package/better-auth/drizzle/visitors/meta/_journal.json +13 -0
  615. package/bridge/README.md +146 -0
  616. package/bridge/dist/bin.d.ts +20 -0
  617. package/bridge/dist/bin.js +37 -0
  618. package/bridge/dist/bin.js.map +1 -0
  619. package/bridge/dist/bridge.d.ts +159 -0
  620. package/bridge/dist/bridge.js +189 -0
  621. package/bridge/dist/bridge.js.map +1 -0
  622. package/bridge/dist/client.d.ts +37 -0
  623. package/bridge/dist/client.js +118 -0
  624. package/bridge/dist/client.js.map +1 -0
  625. package/bridge/dist/configure.d.ts +5 -0
  626. package/bridge/dist/configure.js +17 -0
  627. package/bridge/dist/configure.js.map +1 -0
  628. package/bridge/dist/connector.d.ts +164 -0
  629. package/bridge/dist/connector.js +335 -0
  630. package/bridge/dist/connector.js.map +1 -0
  631. package/bridge/dist/fake.d.ts +4 -0
  632. package/bridge/dist/fake.js +4 -0
  633. package/bridge/dist/fake.js.map +1 -0
  634. package/bridge/dist/fixtures.d.ts +36 -0
  635. package/bridge/dist/fixtures.js +18 -0
  636. package/bridge/dist/fixtures.js.map +1 -0
  637. package/bridge/dist/gen/bridge/v1/bridge_pb.d.ts +694 -0
  638. package/bridge/dist/gen/bridge/v1/bridge_pb.js +173 -0
  639. package/bridge/dist/gen/bridge/v1/bridge_pb.js.map +1 -0
  640. package/bridge/dist/index.d.ts +6 -0
  641. package/bridge/dist/index.js +7 -0
  642. package/bridge/dist/index.js.map +1 -0
  643. package/bridge/dist/json.d.ts +7 -0
  644. package/bridge/dist/json.js +5 -0
  645. package/bridge/dist/json.js.map +1 -0
  646. package/bridge/dist/lazy.d.ts +20 -0
  647. package/bridge/dist/lazy.js +60 -0
  648. package/bridge/dist/lazy.js.map +1 -0
  649. package/bridge/dist/pins.d.ts +12 -0
  650. package/bridge/dist/pins.js +17 -0
  651. package/bridge/dist/pins.js.map +1 -0
  652. package/bridge/dist/replies.d.ts +79 -0
  653. package/bridge/dist/replies.js +217 -0
  654. package/bridge/dist/replies.js.map +1 -0
  655. package/bridge/dist/schema.d.ts +65 -0
  656. package/bridge/dist/schema.js +9 -0
  657. package/bridge/dist/schema.js.map +1 -0
  658. package/bridge/dist/tffake.d.ts +57 -0
  659. package/bridge/dist/tffake.js +105 -0
  660. package/bridge/dist/tffake.js.map +1 -0
  661. package/bridge/dist/tfschema/cli.d.ts +10 -0
  662. package/bridge/dist/tfschema/cli.js +57 -0
  663. package/bridge/dist/tfschema/cli.js.map +1 -0
  664. package/bridge/dist/tfschema/ctyToZod.d.ts +20 -0
  665. package/bridge/dist/tfschema/ctyToZod.js +49 -0
  666. package/bridge/dist/tfschema/ctyToZod.js.map +1 -0
  667. package/bridge/dist/tfschema/generate.d.ts +16 -0
  668. package/bridge/dist/tfschema/generate.js +159 -0
  669. package/bridge/dist/tfschema/generate.js.map +1 -0
  670. package/bridge/dist/tfschema/state.d.ts +14 -0
  671. package/bridge/dist/tfschema/state.js +51 -0
  672. package/bridge/dist/tfschema/state.js.map +1 -0
  673. package/bridge/dist/tfschema/types.d.ts +52 -0
  674. package/bridge/dist/tfschema/types.js +2 -0
  675. package/bridge/dist/tfschema/types.js.map +1 -0
  676. package/bridge/dist/tfschema.d.ts +4 -0
  677. package/bridge/dist/tfschema.js +8 -0
  678. package/bridge/dist/tfschema.js.map +1 -0
  679. package/bridge/testdata/README.md +64 -0
  680. package/bridge/testdata/pins.json +27 -0
  681. package/bridge/testdata/replies/integrations_github_6.13.0/github_branch_protection/provider-bridge_main/import.json +32 -0
  682. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/provider-bridge/import.json +30 -0
  683. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/provider-bridge/read.json +29 -0
  684. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma/import.json +30 -0
  685. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma/read.json +29 -0
  686. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test/apply.json +29 -0
  687. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test/plan.json +40 -0
  688. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-delete/apply.json +23 -0
  689. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-delete/plan.json +25 -0
  690. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-update-1/apply.json +33 -0
  691. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository/sanoma-apply-test-update-1/plan.json +32 -0
  692. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_notsaltylol/import.json +29 -0
  693. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_notsaltylol/read.json +28 -0
  694. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/provider-bridge_octocat/import.json +27 -0
  695. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator/apply.json +28 -0
  696. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator/plan.json +29 -0
  697. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-delete/apply.json +21 -0
  698. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-delete/plan.json +23 -0
  699. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/apply-delete.json +21 -0
  700. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/apply.json +28 -0
  701. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test-collaborator-update-1/plan.json +33 -0
  702. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test_octocat/import.json +29 -0
  703. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_collaborator/sanoma-apply-test_octocat/read.json +28 -0
  704. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key/apply.json +27 -0
  705. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key/plan.json +29 -0
  706. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key-delete/apply.json +21 -0
  707. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test-key-delete/plan.json +23 -0
  708. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test_1000000101/import.json +28 -0
  709. package/bridge/testdata/replies/integrations_github_6.13.0/github_repository_deploy_key/sanoma-apply-test_1000000101/read.json +26 -0
  710. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132/import.json +28 -0
  711. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/apply-delete.json +21 -0
  712. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/apply.json +28 -0
  713. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-aede5c47/plan.json +49 -0
  714. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/484189f591100781981bb24cb4e365c4ae74db9eb1a0ff03489a7e061b339132-c0239934/plan.json +27 -0
  715. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad/import.json +25 -0
  716. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad-delete/apply.json +21 -0
  717. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/8a4dfc1ebfe1b74d277a6e4017921d06e302d4c10fe6999e8ab5cb1522dcb2ad-delete/plan.json +23 -0
  718. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/create-2463512b/apply.json +28 -0
  719. package/bridge/testdata/replies/kreuzwerker_docker_4.6.0/docker_container/create-2463512b/plan.json +42 -0
  720. package/bridge/testdata/schemas/integrations_github_6.13.0.json +10680 -0
  721. package/bridge/testdata/schemas/kreuzwerker_docker_4.6.0.json +4833 -0
  722. package/bridge/testdata/schemas/stripe_stripe_0.3.0.json +55612 -0
  723. package/bridge/testdata/schemas/supabase_supabase_1.11.0.json +790 -0
  724. package/dev/README.md +33 -0
  725. package/dev/dist/cli.d.ts +5 -0
  726. package/dev/dist/cli.js +120 -0
  727. package/dev/dist/cli.js.map +1 -0
  728. package/dev/dist/links.d.ts +33 -0
  729. package/dev/dist/links.js +86 -0
  730. package/dev/dist/links.js.map +1 -0
  731. package/dist/check.d.ts +1 -1
  732. package/dist/check.js +8 -8
  733. package/dist/check.js.map +1 -1
  734. package/dist/cli.js +29 -25
  735. package/dist/cli.js.map +1 -1
  736. package/dist/config.d.ts +1 -4
  737. package/dist/config.js +2 -4
  738. package/dist/config.js.map +1 -1
  739. package/dist/dev.d.ts +5 -8
  740. package/dist/dev.js +13 -50
  741. package/dist/dev.js.map +1 -1
  742. package/dist/env.js +1 -1
  743. package/dist/env.js.map +1 -1
  744. package/dist/events.d.ts +1 -1
  745. package/dist/identity.js +1 -1
  746. package/dist/identity.js.map +1 -1
  747. package/dist/index.d.ts +3 -3
  748. package/dist/index.js +5 -5
  749. package/dist/index.js.map +1 -1
  750. package/dist/init.d.ts +4 -6
  751. package/dist/init.js +21 -15
  752. package/dist/init.js.map +1 -1
  753. package/dist/key.js +1 -1
  754. package/dist/key.js.map +1 -1
  755. package/dist/ledger.d.ts +1 -1
  756. package/dist/ledger.js +1 -1
  757. package/dist/ledger.js.map +1 -1
  758. package/dist/listen.d.ts +1 -1
  759. package/dist/listen.js +1 -1
  760. package/dist/listen.js.map +1 -1
  761. package/dist/oxlint-plugin.js +2 -2
  762. package/dist/oxlint-plugin.js.map +1 -1
  763. package/dist/postgres.js +1 -1
  764. package/dist/postgres.js.map +1 -1
  765. package/dist/serve.d.ts +4 -4
  766. package/dist/serve.js +9 -10
  767. package/dist/serve.js.map +1 -1
  768. package/dist/sites.d.ts +2 -7
  769. package/dist/sites.js +4 -10
  770. package/dist/sites.js.map +1 -1
  771. package/dist/source.d.ts +2 -1
  772. package/dist/source.js +54 -3
  773. package/dist/source.js.map +1 -1
  774. package/dist/wakeup.js +1 -1
  775. package/dist/wakeup.js.map +1 -1
  776. package/dist/worker-port.d.ts +2 -2
  777. package/dist/worker-port.js +2 -2
  778. package/dist/worker-port.js.map +1 -1
  779. package/oxlint.json +283 -47
  780. package/package.json +321 -34
  781. package/template/AGENTS.md +2 -2
  782. package/testing/README.md +261 -0
  783. package/testing/dist/build.d.ts +16 -0
  784. package/testing/dist/build.js +95 -0
  785. package/testing/dist/build.js.map +1 -0
  786. package/testing/dist/database.d.ts +96 -0
  787. package/testing/dist/database.js +213 -0
  788. package/testing/dist/database.js.map +1 -0
  789. package/testing/dist/features.d.ts +25 -0
  790. package/testing/dist/features.js +176 -0
  791. package/testing/dist/features.js.map +1 -0
  792. package/testing/dist/harness.d.ts +27 -0
  793. package/testing/dist/harness.js +63 -0
  794. package/testing/dist/harness.js.map +1 -0
  795. package/testing/dist/host.d.ts +229 -0
  796. package/testing/dist/host.js +738 -0
  797. package/testing/dist/host.js.map +1 -0
  798. package/testing/dist/index.d.ts +36 -0
  799. package/testing/dist/index.js +41 -0
  800. package/testing/dist/index.js.map +1 -0
  801. package/testing/dist/replay.d.ts +44 -0
  802. package/testing/dist/replay.js +95 -0
  803. package/testing/dist/replay.js.map +1 -0
  804. package/testing/dist/sandbox.d.ts +59 -0
  805. package/testing/dist/sandbox.js +201 -0
  806. package/testing/dist/sandbox.js.map +1 -0
  807. package/testing/dist/scenarios.d.ts +17 -0
  808. package/testing/dist/scenarios.js +64 -0
  809. package/testing/dist/scenarios.js.map +1 -0
  810. package/testing/dist/sentinel.d.ts +19 -0
  811. package/testing/dist/sentinel.js +54 -0
  812. package/testing/dist/sentinel.js.map +1 -0
  813. package/testing/dist/wakeup.d.ts +114 -0
  814. package/testing/dist/wakeup.js +288 -0
  815. package/testing/dist/wakeup.js.map +1 -0
  816. package/workflows/CLOUD-IDENTITY.md +333 -0
  817. package/workflows/KMS-SECRETS.md +167 -0
  818. package/workflows/README.md +990 -0
  819. package/workflows/SECRET-SUPPORT.md +72 -0
  820. package/workflows/dist/app-steps.d.ts +17 -0
  821. package/workflows/dist/app-steps.js +43 -0
  822. package/workflows/dist/app-steps.js.map +1 -0
  823. package/workflows/dist/app-workflows.d.ts +174 -0
  824. package/workflows/dist/app-workflows.js +117 -0
  825. package/workflows/dist/app-workflows.js.map +1 -0
  826. package/workflows/dist/apply-steps.d.ts +8 -0
  827. package/workflows/dist/apply-steps.js +92 -0
  828. package/workflows/dist/apply-steps.js.map +1 -0
  829. package/workflows/dist/apply.d.ts +213 -0
  830. package/workflows/dist/apply.js +634 -0
  831. package/workflows/dist/apply.js.map +1 -0
  832. package/workflows/dist/approvals.d.ts +77 -0
  833. package/workflows/dist/approvals.js +211 -0
  834. package/workflows/dist/approvals.js.map +1 -0
  835. package/workflows/dist/apps-list.d.ts +116 -0
  836. package/workflows/dist/apps-list.js +150 -0
  837. package/workflows/dist/apps-list.js.map +1 -0
  838. package/workflows/dist/apps.d.ts +31 -0
  839. package/workflows/dist/apps.js +138 -0
  840. package/workflows/dist/apps.js.map +1 -0
  841. package/workflows/dist/ast.d.ts +59 -0
  842. package/workflows/dist/ast.js +83 -0
  843. package/workflows/dist/ast.js.map +1 -0
  844. package/workflows/dist/authentication.d.ts +140 -0
  845. package/workflows/dist/authentication.js +190 -0
  846. package/workflows/dist/authentication.js.map +1 -0
  847. package/workflows/dist/bundled.d.ts +39 -0
  848. package/workflows/dist/bundled.js +16 -0
  849. package/workflows/dist/bundled.js.map +1 -0
  850. package/workflows/dist/call-workflow.d.ts +21 -0
  851. package/workflows/dist/call-workflow.js +35 -0
  852. package/workflows/dist/call-workflow.js.map +1 -0
  853. package/workflows/dist/call.d.ts +104 -0
  854. package/workflows/dist/call.js +660 -0
  855. package/workflows/dist/call.js.map +1 -0
  856. package/workflows/dist/cedar.d.ts +109 -0
  857. package/workflows/dist/cedar.js +533 -0
  858. package/workflows/dist/cedar.js.map +1 -0
  859. package/workflows/dist/change-steps.d.ts +10 -0
  860. package/workflows/dist/change-steps.js +200 -0
  861. package/workflows/dist/change-steps.js.map +1 -0
  862. package/workflows/dist/change-workflow.d.ts +54 -0
  863. package/workflows/dist/change-workflow.js +161 -0
  864. package/workflows/dist/change-workflow.js.map +1 -0
  865. package/workflows/dist/change.d.ts +330 -0
  866. package/workflows/dist/change.js +351 -0
  867. package/workflows/dist/change.js.map +1 -0
  868. package/workflows/dist/chat-steps.d.ts +5 -0
  869. package/workflows/dist/chat-steps.js +107 -0
  870. package/workflows/dist/chat-steps.js.map +1 -0
  871. package/workflows/dist/chat-workflow.d.ts +43 -0
  872. package/workflows/dist/chat-workflow.js +47 -0
  873. package/workflows/dist/chat-workflow.js.map +1 -0
  874. package/workflows/dist/chats.d.ts +62 -0
  875. package/workflows/dist/chats.js +109 -0
  876. package/workflows/dist/chats.js.map +1 -0
  877. package/workflows/dist/claims.d.ts +58 -0
  878. package/workflows/dist/claims.js +27 -0
  879. package/workflows/dist/claims.js.map +1 -0
  880. package/workflows/dist/client.d.ts +563 -0
  881. package/workflows/dist/client.js +1464 -0
  882. package/workflows/dist/client.js.map +1 -0
  883. package/workflows/dist/cloud-identity.d.ts +56 -0
  884. package/workflows/dist/cloud-identity.js +160 -0
  885. package/workflows/dist/cloud-identity.js.map +1 -0
  886. package/workflows/dist/collection.d.ts +139 -0
  887. package/workflows/dist/collection.js +522 -0
  888. package/workflows/dist/collection.js.map +1 -0
  889. package/workflows/dist/config.d.ts +328 -0
  890. package/workflows/dist/config.js +857 -0
  891. package/workflows/dist/config.js.map +1 -0
  892. package/workflows/dist/connect-workflow.d.ts +6 -0
  893. package/workflows/dist/connect-workflow.js +35 -0
  894. package/workflows/dist/connect-workflow.js.map +1 -0
  895. package/workflows/dist/connection.d.ts +669 -0
  896. package/workflows/dist/connection.js +1228 -0
  897. package/workflows/dist/connection.js.map +1 -0
  898. package/workflows/dist/constructors.d.ts +38 -0
  899. package/workflows/dist/constructors.js +9 -0
  900. package/workflows/dist/constructors.js.map +1 -0
  901. package/workflows/dist/credentials.d.ts +24 -0
  902. package/workflows/dist/credentials.js +168 -0
  903. package/workflows/dist/credentials.js.map +1 -0
  904. package/workflows/dist/cucumber.d.ts +66 -0
  905. package/workflows/dist/cucumber.js +163 -0
  906. package/workflows/dist/cucumber.js.map +1 -0
  907. package/workflows/dist/data.d.ts +2 -0
  908. package/workflows/dist/data.js +3 -0
  909. package/workflows/dist/data.js.map +1 -0
  910. package/workflows/dist/database.d.ts +83 -0
  911. package/workflows/dist/database.js +95 -0
  912. package/workflows/dist/database.js.map +1 -0
  913. package/workflows/dist/db/company.d.ts +2351 -0
  914. package/workflows/dist/db/company.js +245 -0
  915. package/workflows/dist/db/company.js.map +1 -0
  916. package/workflows/dist/db/dbos.d.ts +111 -0
  917. package/workflows/dist/db/dbos.js +15 -0
  918. package/workflows/dist/db/dbos.js.map +1 -0
  919. package/workflows/dist/db/identity.d.ts +367 -0
  920. package/workflows/dist/db/identity.js +48 -0
  921. package/workflows/dist/db/identity.js.map +1 -0
  922. package/workflows/dist/db/index.d.ts +7 -0
  923. package/workflows/dist/db/index.js +12 -0
  924. package/workflows/dist/db/index.js.map +1 -0
  925. package/workflows/dist/db/kms.d.ts +224 -0
  926. package/workflows/dist/db/kms.js +29 -0
  927. package/workflows/dist/db/kms.js.map +1 -0
  928. package/workflows/dist/db/migrate.d.ts +66 -0
  929. package/workflows/dist/db/migrate.js +39 -0
  930. package/workflows/dist/db/migrate.js.map +1 -0
  931. package/workflows/dist/db/wakeup.d.ts +271 -0
  932. package/workflows/dist/db/wakeup.js +34 -0
  933. package/workflows/dist/db/wakeup.js.map +1 -0
  934. package/workflows/dist/db.d.ts +117 -0
  935. package/workflows/dist/db.js +375 -0
  936. package/workflows/dist/db.js.map +1 -0
  937. package/workflows/dist/deadlines.d.ts +107 -0
  938. package/workflows/dist/deadlines.js +208 -0
  939. package/workflows/dist/deadlines.js.map +1 -0
  940. package/workflows/dist/define.d.ts +288 -0
  941. package/workflows/dist/define.js +152 -0
  942. package/workflows/dist/define.js.map +1 -0
  943. package/workflows/dist/definitions.d.ts +25 -0
  944. package/workflows/dist/definitions.js +16 -0
  945. package/workflows/dist/definitions.js.map +1 -0
  946. package/workflows/dist/deployment-key.d.ts +24 -0
  947. package/workflows/dist/deployment-key.js +54 -0
  948. package/workflows/dist/deployment-key.js.map +1 -0
  949. package/workflows/dist/describe.d.ts +40 -0
  950. package/workflows/dist/describe.js +435 -0
  951. package/workflows/dist/describe.js.map +1 -0
  952. package/workflows/dist/description.d.ts +555 -0
  953. package/workflows/dist/description.js +389 -0
  954. package/workflows/dist/description.js.map +1 -0
  955. package/workflows/dist/direct.d.ts +10 -0
  956. package/workflows/dist/direct.js +26 -0
  957. package/workflows/dist/direct.js.map +1 -0
  958. package/workflows/dist/dns.d.ts +20 -0
  959. package/workflows/dist/dns.js +26 -0
  960. package/workflows/dist/dns.js.map +1 -0
  961. package/workflows/dist/drift.d.ts +136 -0
  962. package/workflows/dist/drift.js +188 -0
  963. package/workflows/dist/drift.js.map +1 -0
  964. package/workflows/dist/env.d.ts +51 -0
  965. package/workflows/dist/env.js +83 -0
  966. package/workflows/dist/env.js.map +1 -0
  967. package/workflows/dist/errors.d.ts +115 -0
  968. package/workflows/dist/errors.js +193 -0
  969. package/workflows/dist/errors.js.map +1 -0
  970. package/workflows/dist/expectations.d.ts +26 -0
  971. package/workflows/dist/expectations.js +171 -0
  972. package/workflows/dist/expectations.js.map +1 -0
  973. package/workflows/dist/fake.d.ts +93 -0
  974. package/workflows/dist/fake.js +280 -0
  975. package/workflows/dist/fake.js.map +1 -0
  976. package/workflows/dist/fill.d.ts +17 -0
  977. package/workflows/dist/fill.js +39 -0
  978. package/workflows/dist/fill.js.map +1 -0
  979. package/workflows/dist/folded.d.ts +7 -0
  980. package/workflows/dist/folded.js +28 -0
  981. package/workflows/dist/folded.js.map +1 -0
  982. package/workflows/dist/follow-steps.d.ts +8 -0
  983. package/workflows/dist/follow-steps.js +113 -0
  984. package/workflows/dist/follow-steps.js.map +1 -0
  985. package/workflows/dist/follow-workflow.d.ts +56 -0
  986. package/workflows/dist/follow-workflow.js +50 -0
  987. package/workflows/dist/follow-workflow.js.map +1 -0
  988. package/workflows/dist/grid.d.ts +34 -0
  989. package/workflows/dist/grid.js +63 -0
  990. package/workflows/dist/grid.js.map +1 -0
  991. package/workflows/dist/host-derive.d.ts +162 -0
  992. package/workflows/dist/host-derive.js +438 -0
  993. package/workflows/dist/host-derive.js.map +1 -0
  994. package/workflows/dist/host.d.ts +158 -0
  995. package/workflows/dist/host.js +112 -0
  996. package/workflows/dist/host.js.map +1 -0
  997. package/workflows/dist/identity-broker.d.ts +14 -0
  998. package/workflows/dist/identity-broker.js +84 -0
  999. package/workflows/dist/identity-broker.js.map +1 -0
  1000. package/workflows/dist/identity-provisioning.d.ts +50 -0
  1001. package/workflows/dist/identity-provisioning.js +304 -0
  1002. package/workflows/dist/identity-provisioning.js.map +1 -0
  1003. package/workflows/dist/identity-service.d.ts +25 -0
  1004. package/workflows/dist/identity-service.js +152 -0
  1005. package/workflows/dist/identity-service.js.map +1 -0
  1006. package/workflows/dist/import-workflow.d.ts +4 -0
  1007. package/workflows/dist/import-workflow.js +120 -0
  1008. package/workflows/dist/import-workflow.js.map +1 -0
  1009. package/workflows/dist/import.d.ts +94 -0
  1010. package/workflows/dist/import.js +161 -0
  1011. package/workflows/dist/import.js.map +1 -0
  1012. package/workflows/dist/index.d.ts +66 -0
  1013. package/workflows/dist/index.js +73 -0
  1014. package/workflows/dist/index.js.map +1 -0
  1015. package/workflows/dist/kms-secrets.d.ts +48 -0
  1016. package/workflows/dist/kms-secrets.js +320 -0
  1017. package/workflows/dist/kms-secrets.js.map +1 -0
  1018. package/workflows/dist/ledger.d.ts +281 -0
  1019. package/workflows/dist/ledger.js +335 -0
  1020. package/workflows/dist/ledger.js.map +1 -0
  1021. package/workflows/dist/lint.d.ts +24 -0
  1022. package/workflows/dist/lint.js +185 -0
  1023. package/workflows/dist/lint.js.map +1 -0
  1024. package/workflows/dist/load.d.ts +85 -0
  1025. package/workflows/dist/load.js +407 -0
  1026. package/workflows/dist/load.js.map +1 -0
  1027. package/workflows/dist/local-sandbox.d.ts +17 -0
  1028. package/workflows/dist/local-sandbox.js +131 -0
  1029. package/workflows/dist/local-sandbox.js.map +1 -0
  1030. package/workflows/dist/lockfile.d.ts +38 -0
  1031. package/workflows/dist/lockfile.js +74 -0
  1032. package/workflows/dist/lockfile.js.map +1 -0
  1033. package/workflows/dist/log.d.ts +24 -0
  1034. package/workflows/dist/log.js +83 -0
  1035. package/workflows/dist/log.js.map +1 -0
  1036. package/workflows/dist/login-code.d.ts +23 -0
  1037. package/workflows/dist/login-code.js +37 -0
  1038. package/workflows/dist/login-code.js.map +1 -0
  1039. package/workflows/dist/oauth.d.ts +112 -0
  1040. package/workflows/dist/oauth.js +301 -0
  1041. package/workflows/dist/oauth.js.map +1 -0
  1042. package/workflows/dist/op.d.ts +465 -0
  1043. package/workflows/dist/op.js +249 -0
  1044. package/workflows/dist/op.js.map +1 -0
  1045. package/workflows/dist/outline.d.ts +186 -0
  1046. package/workflows/dist/outline.js +554 -0
  1047. package/workflows/dist/outline.js.map +1 -0
  1048. package/workflows/dist/paths.d.ts +56 -0
  1049. package/workflows/dist/paths.js +124 -0
  1050. package/workflows/dist/paths.js.map +1 -0
  1051. package/workflows/dist/person.d.ts +66 -0
  1052. package/workflows/dist/person.js +71 -0
  1053. package/workflows/dist/person.js.map +1 -0
  1054. package/workflows/dist/plugin.d.ts +45 -0
  1055. package/workflows/dist/plugin.js +61 -0
  1056. package/workflows/dist/plugin.js.map +1 -0
  1057. package/workflows/dist/policy.d.ts +126 -0
  1058. package/workflows/dist/policy.js +50 -0
  1059. package/workflows/dist/policy.js.map +1 -0
  1060. package/workflows/dist/preview.d.ts +26 -0
  1061. package/workflows/dist/preview.js +29 -0
  1062. package/workflows/dist/preview.js.map +1 -0
  1063. package/workflows/dist/provisioning-identity.d.ts +27 -0
  1064. package/workflows/dist/provisioning-identity.js +81 -0
  1065. package/workflows/dist/provisioning-identity.js.map +1 -0
  1066. package/workflows/dist/renewal.d.ts +102 -0
  1067. package/workflows/dist/renewal.js +186 -0
  1068. package/workflows/dist/renewal.js.map +1 -0
  1069. package/workflows/dist/resource.d.ts +506 -0
  1070. package/workflows/dist/resource.js +600 -0
  1071. package/workflows/dist/resource.js.map +1 -0
  1072. package/workflows/dist/resources.d.ts +97 -0
  1073. package/workflows/dist/resources.js +384 -0
  1074. package/workflows/dist/resources.js.map +1 -0
  1075. package/workflows/dist/run-status.d.ts +10 -0
  1076. package/workflows/dist/run-status.js +27 -0
  1077. package/workflows/dist/run-status.js.map +1 -0
  1078. package/workflows/dist/run.d.ts +173 -0
  1079. package/workflows/dist/run.js +22 -0
  1080. package/workflows/dist/run.js.map +1 -0
  1081. package/workflows/dist/runner-box.d.ts +23 -0
  1082. package/workflows/dist/runner-box.js +181 -0
  1083. package/workflows/dist/runner-box.js.map +1 -0
  1084. package/workflows/dist/runner-protocol.d.ts +73 -0
  1085. package/workflows/dist/runner-protocol.js +34 -0
  1086. package/workflows/dist/runner-protocol.js.map +1 -0
  1087. package/workflows/dist/runtime-ops.d.ts +242 -0
  1088. package/workflows/dist/runtime-ops.js +354 -0
  1089. package/workflows/dist/runtime-ops.js.map +1 -0
  1090. package/workflows/dist/sandbox-contract.d.ts +109 -0
  1091. package/workflows/dist/sandbox-contract.js +26 -0
  1092. package/workflows/dist/sandbox-contract.js.map +1 -0
  1093. package/workflows/dist/sandbox-runner.cjs +7 -0
  1094. package/workflows/dist/sandbox.d.ts +46 -0
  1095. package/workflows/dist/sandbox.js +215 -0
  1096. package/workflows/dist/sandbox.js.map +1 -0
  1097. package/workflows/dist/scenario.d.ts +262 -0
  1098. package/workflows/dist/scenario.js +1281 -0
  1099. package/workflows/dist/scenario.js.map +1 -0
  1100. package/workflows/dist/scenarios.d.ts +59 -0
  1101. package/workflows/dist/scenarios.js +82 -0
  1102. package/workflows/dist/scenarios.js.map +1 -0
  1103. package/workflows/dist/schedules.d.ts +74 -0
  1104. package/workflows/dist/schedules.js +168 -0
  1105. package/workflows/dist/schedules.js.map +1 -0
  1106. package/workflows/dist/schema.d.ts +49 -0
  1107. package/workflows/dist/schema.js +256 -0
  1108. package/workflows/dist/schema.js.map +1 -0
  1109. package/workflows/dist/sdk.d.ts +34 -0
  1110. package/workflows/dist/sdk.js +182 -0
  1111. package/workflows/dist/sdk.js.map +1 -0
  1112. package/workflows/dist/seal.d.ts +42 -0
  1113. package/workflows/dist/seal.js +103 -0
  1114. package/workflows/dist/seal.js.map +1 -0
  1115. package/workflows/dist/secret-store-check.d.ts +11 -0
  1116. package/workflows/dist/secret-store-check.js +76 -0
  1117. package/workflows/dist/secret-store-check.js.map +1 -0
  1118. package/workflows/dist/secret-store.d.ts +142 -0
  1119. package/workflows/dist/secret-store.js +273 -0
  1120. package/workflows/dist/secret-store.js.map +1 -0
  1121. package/workflows/dist/secret.d.ts +54 -0
  1122. package/workflows/dist/secret.js +115 -0
  1123. package/workflows/dist/secret.js.map +1 -0
  1124. package/workflows/dist/shared.d.ts +495 -0
  1125. package/workflows/dist/shared.js +558 -0
  1126. package/workflows/dist/shared.js.map +1 -0
  1127. package/workflows/dist/sites.d.ts +62 -0
  1128. package/workflows/dist/sites.js +498 -0
  1129. package/workflows/dist/sites.js.map +1 -0
  1130. package/workflows/dist/source.d.ts +327 -0
  1131. package/workflows/dist/source.js +99 -0
  1132. package/workflows/dist/source.js.map +1 -0
  1133. package/workflows/dist/ssh-key.d.ts +11 -0
  1134. package/workflows/dist/ssh-key.js +44 -0
  1135. package/workflows/dist/ssh-key.js.map +1 -0
  1136. package/workflows/dist/steps.d.ts +81 -0
  1137. package/workflows/dist/steps.js +23 -0
  1138. package/workflows/dist/steps.js.map +1 -0
  1139. package/workflows/dist/storage-provisioning.d.ts +27 -0
  1140. package/workflows/dist/storage-provisioning.js +222 -0
  1141. package/workflows/dist/storage-provisioning.js.map +1 -0
  1142. package/workflows/dist/store-move-workflow.d.ts +14 -0
  1143. package/workflows/dist/store-move-workflow.js +77 -0
  1144. package/workflows/dist/store-move-workflow.js.map +1 -0
  1145. package/workflows/dist/store-move.d.ts +361 -0
  1146. package/workflows/dist/store-move.js +744 -0
  1147. package/workflows/dist/store-move.js.map +1 -0
  1148. package/workflows/dist/supervisor.d.ts +39 -0
  1149. package/workflows/dist/supervisor.js +68 -0
  1150. package/workflows/dist/supervisor.js.map +1 -0
  1151. package/workflows/dist/tokens.d.ts +45 -0
  1152. package/workflows/dist/tokens.js +120 -0
  1153. package/workflows/dist/tokens.js.map +1 -0
  1154. package/workflows/dist/vendor-info.d.ts +19 -0
  1155. package/workflows/dist/vendor-info.js +49 -0
  1156. package/workflows/dist/vendor-info.js.map +1 -0
  1157. package/workflows/dist/version.d.ts +44 -0
  1158. package/workflows/dist/version.js +92 -0
  1159. package/workflows/dist/version.js.map +1 -0
  1160. package/workflows/dist/wakeup-driver.d.ts +128 -0
  1161. package/workflows/dist/wakeup-driver.js +225 -0
  1162. package/workflows/dist/wakeup-driver.js.map +1 -0
  1163. package/workflows/dist/wakeup-service.d.ts +79 -0
  1164. package/workflows/dist/wakeup-service.js +419 -0
  1165. package/workflows/dist/wakeup-service.js.map +1 -0
  1166. package/workflows/dist/wakeup-type.d.ts +43 -0
  1167. package/workflows/dist/wakeup-type.js +82 -0
  1168. package/workflows/dist/wakeup-type.js.map +1 -0
  1169. package/workflows/dist/wakeup.d.ts +95 -0
  1170. package/workflows/dist/wakeup.js +79 -0
  1171. package/workflows/dist/wakeup.js.map +1 -0
  1172. package/workflows/dist/worker.d.ts +85 -0
  1173. package/workflows/dist/worker.js +535 -0
  1174. package/workflows/dist/worker.js.map +1 -0
  1175. package/workflows/dist/writer.d.ts +83 -0
  1176. package/workflows/dist/writer.js +349 -0
  1177. package/workflows/dist/writer.js.map +1 -0
  1178. package/workflows/drizzle/company/0000_tables.sql +104 -0
  1179. package/workflows/drizzle/company/0001_wakeup_row.sql +2 -0
  1180. package/workflows/drizzle/company/0002_runs_tell_the_app.sql +27 -0
  1181. package/workflows/drizzle/company/0003_ledger_target.sql +2 -0
  1182. package/workflows/drizzle/company/0004_oauth_attempts.sql +19 -0
  1183. package/workflows/drizzle/company/0005_connection_renewals.sql +9 -0
  1184. package/workflows/drizzle/company/0006_secret_moves.sql +35 -0
  1185. package/workflows/drizzle/company/meta/0000_snapshot.json +652 -0
  1186. package/workflows/drizzle/company/meta/0001_snapshot.json +652 -0
  1187. package/workflows/drizzle/company/meta/0002_snapshot.json +819 -0
  1188. package/workflows/drizzle/company/meta/0003_snapshot.json +845 -0
  1189. package/workflows/drizzle/company/meta/0004_snapshot.json +955 -0
  1190. package/workflows/drizzle/company/meta/0005_snapshot.json +1010 -0
  1191. package/workflows/drizzle/company/meta/0006_snapshot.json +1232 -0
  1192. package/workflows/drizzle/company/meta/_journal.json +55 -0
  1193. package/workflows/drizzle/wakeup/0000_tables.sql +26 -0
  1194. package/workflows/drizzle/wakeup/meta/0000_snapshot.json +200 -0
  1195. package/workflows/drizzle/wakeup/meta/_journal.json +13 -0
  1196. package/workflows/oxlint.json +117 -0
  1197. package/workflows/src/app-steps.ts +67 -0
  1198. package/workflows/src/app-workflows.ts +261 -0
  1199. package/workflows/src/apply-steps.ts +108 -0
  1200. package/workflows/src/apply.ts +868 -0
  1201. package/workflows/src/approvals.ts +274 -0
  1202. package/workflows/src/apps-list.ts +168 -0
  1203. package/workflows/src/apps.ts +147 -0
  1204. package/workflows/src/ast.ts +115 -0
  1205. package/workflows/src/authentication.ts +316 -0
  1206. package/workflows/src/bundled.ts +49 -0
  1207. package/workflows/src/call-workflow.ts +53 -0
  1208. package/workflows/src/call.ts +848 -0
  1209. package/workflows/src/cedar.ts +681 -0
  1210. package/workflows/src/change-steps.ts +270 -0
  1211. package/workflows/src/change-workflow.ts +198 -0
  1212. package/workflows/src/change.ts +483 -0
  1213. package/workflows/src/chat-steps.ts +117 -0
  1214. package/workflows/src/chat-workflow.ts +69 -0
  1215. package/workflows/src/chats.ts +179 -0
  1216. package/workflows/src/claims.ts +79 -0
  1217. package/workflows/src/client.ts +1924 -0
  1218. package/workflows/src/cloud-identity.ts +205 -0
  1219. package/workflows/src/collection.ts +688 -0
  1220. package/workflows/src/config.ts +1178 -0
  1221. package/workflows/src/connect-workflow.ts +38 -0
  1222. package/workflows/src/connection.ts +1522 -0
  1223. package/workflows/src/constructors.ts +10 -0
  1224. package/workflows/src/credentials.ts +189 -0
  1225. package/workflows/src/cucumber.ts +243 -0
  1226. package/workflows/src/data.ts +10 -0
  1227. package/workflows/src/database.ts +154 -0
  1228. package/workflows/src/db/company.ts +331 -0
  1229. package/workflows/src/db/dbos.ts +17 -0
  1230. package/workflows/src/db/identity.ts +61 -0
  1231. package/workflows/src/db/index.ts +12 -0
  1232. package/workflows/src/db/kms.ts +41 -0
  1233. package/workflows/src/db/migrate.ts +71 -0
  1234. package/workflows/src/db/wakeup.ts +41 -0
  1235. package/workflows/src/db.ts +430 -0
  1236. package/workflows/src/deadlines.ts +283 -0
  1237. package/workflows/src/define.ts +416 -0
  1238. package/workflows/src/definitions.ts +36 -0
  1239. package/workflows/src/deployment-key.ts +57 -0
  1240. package/workflows/src/describe.ts +525 -0
  1241. package/workflows/src/description.ts +434 -0
  1242. package/workflows/src/direct.ts +31 -0
  1243. package/workflows/src/dns.ts +29 -0
  1244. package/workflows/src/drift.ts +289 -0
  1245. package/workflows/src/env.ts +124 -0
  1246. package/workflows/src/errors.ts +255 -0
  1247. package/workflows/src/expectations.ts +200 -0
  1248. package/workflows/src/fake.ts +364 -0
  1249. package/workflows/src/fill.ts +47 -0
  1250. package/workflows/src/folded.ts +28 -0
  1251. package/workflows/src/follow-steps.ts +129 -0
  1252. package/workflows/src/follow-workflow.ts +88 -0
  1253. package/workflows/src/grid.ts +102 -0
  1254. package/workflows/src/host-derive.ts +540 -0
  1255. package/workflows/src/host.ts +234 -0
  1256. package/workflows/src/identity-broker.ts +94 -0
  1257. package/workflows/src/identity-provisioning.ts +337 -0
  1258. package/workflows/src/identity-service.ts +180 -0
  1259. package/workflows/src/import-workflow.ts +153 -0
  1260. package/workflows/src/import.ts +222 -0
  1261. package/workflows/src/index.ts +415 -0
  1262. package/workflows/src/kms-secrets.ts +385 -0
  1263. package/workflows/src/ledger.ts +559 -0
  1264. package/workflows/src/lint.ts +226 -0
  1265. package/workflows/src/load.ts +489 -0
  1266. package/workflows/src/local-sandbox.ts +133 -0
  1267. package/workflows/src/lockfile.ts +102 -0
  1268. package/workflows/src/log.ts +82 -0
  1269. package/workflows/src/login-code.ts +58 -0
  1270. package/workflows/src/oauth.ts +402 -0
  1271. package/workflows/src/op.ts +646 -0
  1272. package/workflows/src/outline.ts +675 -0
  1273. package/workflows/src/paths.ts +135 -0
  1274. package/workflows/src/person.ts +78 -0
  1275. package/workflows/src/plugin.ts +85 -0
  1276. package/workflows/src/policy.ts +162 -0
  1277. package/workflows/src/preview.ts +57 -0
  1278. package/workflows/src/provisioning-identity.ts +106 -0
  1279. package/workflows/src/renewal.ts +272 -0
  1280. package/workflows/src/resource.ts +964 -0
  1281. package/workflows/src/resources.ts +459 -0
  1282. package/workflows/src/run-status.ts +39 -0
  1283. package/workflows/src/run.ts +179 -0
  1284. package/workflows/src/runner-box.ts +218 -0
  1285. package/workflows/src/runner-protocol.ts +61 -0
  1286. package/workflows/src/runtime-ops.ts +391 -0
  1287. package/workflows/src/sandbox-contract.ts +121 -0
  1288. package/workflows/src/sandbox-runner.ts +187 -0
  1289. package/workflows/src/sandbox.ts +253 -0
  1290. package/workflows/src/scenario.ts +1624 -0
  1291. package/workflows/src/scenarios.ts +125 -0
  1292. package/workflows/src/schedules.ts +219 -0
  1293. package/workflows/src/schema.ts +311 -0
  1294. package/workflows/src/sdk.ts +225 -0
  1295. package/workflows/src/seal.ts +127 -0
  1296. package/workflows/src/secret-store-check.ts +93 -0
  1297. package/workflows/src/secret-store.ts +382 -0
  1298. package/workflows/src/secret.ts +151 -0
  1299. package/workflows/src/shared.ts +798 -0
  1300. package/workflows/src/sites.ts +559 -0
  1301. package/workflows/src/source.ts +353 -0
  1302. package/workflows/src/ssh-key.ts +48 -0
  1303. package/workflows/src/steps.ts +93 -0
  1304. package/workflows/src/storage-provisioning.ts +252 -0
  1305. package/workflows/src/store-move-workflow.ts +80 -0
  1306. package/workflows/src/store-move.ts +870 -0
  1307. package/workflows/src/supervisor.ts +102 -0
  1308. package/workflows/src/tokens.ts +163 -0
  1309. package/workflows/src/vendor-info.ts +53 -0
  1310. package/workflows/src/version.ts +103 -0
  1311. package/workflows/src/wakeup-driver.ts +286 -0
  1312. package/workflows/src/wakeup-service.ts +484 -0
  1313. package/workflows/src/wakeup-type.ts +92 -0
  1314. package/workflows/src/wakeup.ts +145 -0
  1315. package/workflows/src/worker.ts +667 -0
  1316. package/workflows/src/writer.ts +392 -0
  1317. package/dist/claims.d.ts +0 -1
  1318. package/dist/claims.js +0 -6
  1319. package/dist/claims.js.map +0 -1
  1320. package/dist/data.d.ts +0 -1
  1321. package/dist/data.js +0 -4
  1322. package/dist/data.js.map +0 -1
  1323. package/dist/resources.d.ts +0 -1
  1324. package/dist/resources.js +0 -5
  1325. package/dist/resources.js.map +0 -1
  1326. package/dist/secrets.d.ts +0 -2
  1327. package/dist/secrets.js +0 -3
  1328. package/dist/secrets.js.map +0 -1
  1329. package/identity/Dockerfile +0 -14
  1330. package/site.d.ts +0 -3
  1331. package/site.js +0 -3
  1332. package/ui.css +0 -2
  1333. package/ui.d.ts +0 -3
  1334. package/ui.js +0 -3
@@ -0,0 +1,2334 @@
1
+ import { i as getStartContext, s as getCookie, t as createCsrfMiddleware } from "../server.js";
2
+ import { C as RUN_TONE, F as Alert, I as AlertAction, L as AlertDescription, R as AlertTitle, l as Region, m as ToneBadge, s as Notice, t as ButtonLink } from "./kit-D6EulwBe.js";
3
+ import { B as bearerOf, T as postCall, _t as runName, dt as SETUP_VENDORS, lt as RUNS_LIMIT, mt as errorBodyOf, q as CALLBACK_ERRORS, rt as INFRA } from "./middleware-B8JRLyxx.js";
4
+ import { i as useActorState, t as ActorContext } from "./actor-D6iA0pDg.js";
5
+ import { At as workflowNamed, B as driftReportQuery, Bt as goLiveSignInFn, Ct as useStartRun, D as chatModelQuery, E as changesQuery, G as historyQuery, H as goLiveChoicesQuery, Jt as useServerFn, M as configQuery, Mt as workflowRunsQuery, Ot as waitingRunsQuery, P as connectorNamed, R as credentialsQuery, T as changeQuery, U as goLiveProgressQuery, X as listQueryOf, Y as lastRunsQuery, _ as WorkflowSearch, a as ConnectSearch, b as appApi, bt as sourceQuery, c as InboxSearch, d as POLL_MS, dt as runQuery, f as PeopleSearch, ft as runsQuery, g as WorkflowPageSearch, gt as scenariosQuery, j as collectionNamed, kt as workflowFile, lt as remoteQuery, nt as peopleSignInsQuery, o as DataSearch, ot as recentRunsQuery, p as RUNS_KEY, pt as runsRefetchInterval, q as hostEnforcementQuery, r as AppSearch, rt as permissionsQuery, s as HostingSearch, st as recordsQuery, t as Button, ut as runLink, v as actorQuery, vt as setupStatusQuery } from "./button-f9Lc8qLl.js";
6
+ import { m as connectionCallback, n as postChat, o as githubCallback, r as postSignInCode, s as manifestPage } from "./chat-DMN_hoKm.js";
7
+ import { ct as pageLanguages, dt as alternatesOf, ft as sitePath, q as pageTitle, st as defaultLocaleOf, tt as Skeleton, ut as usePageLanguages, v as ItemHeading } from "./common-CWHLj7KV.js";
8
+ import { r as NativeSelectOption, t as NativeSelect } from "./native-select-DLa-He0n.js";
9
+ import { t as Spinner } from "./spinner-C1ZW08lp.js";
10
+ import { a as ItemGroup, i as ItemDescription, n as ItemActions, r as ItemContent, t as Item } from "./item-BDSXoEr_.js";
11
+ import { t as Input } from "./input-D63gF3G2.js";
12
+ import { a as FieldGroup, i as FieldError, o as FieldLabel, r as FieldDescription, t as Field } from "./field-C0Xx_90s.js";
13
+ import { t as ApplyPlanView } from "./apply-plan-ybBda6vQ.js";
14
+ import { Suspense, createContext, lazy, useCallback, useContext, useEffect, useMemo, useState } from "react";
15
+ import { CatchBoundary, HeadContent, Link, Outlet, Scripts, createFileRoute, createRootRouteWithContext, createRouter, lazyRouteComponent, notFound, redirect, useRouter } from "@tanstack/react-router";
16
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
17
+ import { QueryClient, queryOptions, useMutation, useQuery, useQueryClient, useQueryErrorResetBoundary, useSuspenseQuery } from "@tanstack/react-query";
18
+ import { ThemeProvider } from "next-themes";
19
+ import { toast } from "sonner";
20
+ import { WarningIcon } from "@phosphor-icons/react/dist/csr/Warning";
21
+ import { APPLY_WORKFLOW, DRIFT_WORKFLOW, RUN_STATUSES, errorMessage, isEnded, siteDir } from "sanoma/workflows/shared";
22
+ import { z } from "zod";
23
+ import { WarningCircleIcon } from "@phosphor-icons/react/dist/csr/WarningCircle";
24
+ import { CheckIcon } from "@phosphor-icons/react/dist/csr/Check";
25
+ import { ArrowSquareOutIcon } from "@phosphor-icons/react/dist/csr/ArrowSquareOut";
26
+ import { setupRouterSsrQueryIntegration } from "@tanstack/react-router-ssr-query";
27
+ import { ArrowClockwiseIcon } from "@phosphor-icons/react/dist/csr/ArrowClockwise";
28
+ import { PlayIcon } from "@phosphor-icons/react/dist/csr/Play";
29
+ import { RocketIcon } from "@phosphor-icons/react/dist/csr/Rocket";
30
+ import { UploadIcon } from "@phosphor-icons/react/dist/csr/Upload";
31
+ // \0rolldown/runtime.js
32
+ var __defProp = Object.defineProperty;
33
+ var __exportAll = (all, no_symbols) => {
34
+ let target = {};
35
+ for (var name in all) __defProp(target, name, {
36
+ get: all[name],
37
+ enumerable: true
38
+ });
39
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
40
+ return target;
41
+ };
42
+ // ../../../node_modules/.pnpm/@tanstack+start-client-core@1.170.34/node_modules/@tanstack/start-client-core/dist/esm/getGlobalStartContext.js
43
+ var getGlobalStartContext = () => {
44
+ const context = getStartContext().contextAfterGlobalMiddlewares;
45
+ if (!context) throw new Error(`Global context not set yet, you are calling getGlobalStartContext() before the global middlewares are applied.`);
46
+ return context;
47
+ };
48
+ // src/components/shell/prefs.ts
49
+ /** The cookie the chat column's state is kept in: `open` or `closed`, unset until Chat is used. */
50
+ var CHAT_COOKIE = "sanoma_chat";
51
+ /** The cookie's value as a `ChatPref`: anything else is unset. */
52
+ var chatPref = (value) => value === "open" || value === "closed" ? value : void 0;
53
+ /** The width from which the chat column sits beside the page rather than over it (Tailwind's `lg`). */
54
+ var BESIDE_PAGE = "(min-width: 64rem)";
55
+ /** A year, in seconds. */
56
+ var MAX_AGE = 31536e3;
57
+ /** Remembers a preference in its cookie for a year, for the next page the server renders. */
58
+ function rememberPref(cookie, value) {
59
+ document.cookie = `${cookie}=${value}; path=/; max-age=${MAX_AGE}`;
60
+ }
61
+ // src/components/density.tsx
62
+ /** The cookie the density is kept in: `compact` or `comfortable` (and, never set, comfortable). */
63
+ var DENSITY_COOKIE = "sanoma_density";
64
+ var DensityContext = createContext(null);
65
+ /** The density, and the setter that changes it and remembers it in the cookie. */
66
+ function useDensity() {
67
+ const density = useContext(DensityContext);
68
+ if (!density) throw new Error("useDensity must be used within a DensityProvider.");
69
+ return density;
70
+ }
71
+ /**
72
+ * Holds the density and renders the app's box, `#app`, marked `data-density="compact"` while
73
+ * Compact (unmarked otherwise): the `compact:` variant and style.css's spacing unit and tokens key on it,
74
+ * as the chrome renders no wrapper of its own. The density lives in a cookie, as the chat
75
+ * column's state does, so the server renders the chosen one from the first paint: the root's loader reads
76
+ * it into `defaultCompact`, which the provider takes once, as it mounts (hydration has the
77
+ * server's answer, so both render the same page); the setter writes it. On #app rather than
78
+ * <html>, since the density is the root's state; Base UI's portals (menus, dialogs) land in <body>,
79
+ * outside it, and keep the comfortable spacing.
80
+ */
81
+ function DensityProvider({ defaultCompact, children }) {
82
+ const [compact, setState] = useState(defaultCompact);
83
+ const setCompact = useCallback((value) => {
84
+ setState(value);
85
+ rememberPref(DENSITY_COOKIE, value ? "compact" : "comfortable");
86
+ }, []);
87
+ const density = useMemo(() => ({
88
+ compact,
89
+ setCompact
90
+ }), [compact, setCompact]);
91
+ return /* @__PURE__ */ jsx(DensityContext, {
92
+ value: density,
93
+ children: /* @__PURE__ */ jsx("div", {
94
+ id: "app",
95
+ "data-density": compact ? "compact" : void 0,
96
+ children
97
+ })
98
+ });
99
+ }
100
+ // src/components/boundaries.tsx
101
+ /** A page that failed to load, and a retry that loads it again. */
102
+ function RouteError({ error }) {
103
+ const router = useRouter();
104
+ const { reset } = useQueryErrorResetBoundary();
105
+ useEffect(() => reset(), [reset]);
106
+ return /* @__PURE__ */ jsxs(Alert, {
107
+ variant: "destructive",
108
+ children: [
109
+ /* @__PURE__ */ jsx(WarningCircleIcon, { "aria-hidden": "true" }),
110
+ /* @__PURE__ */ jsx(AlertTitle, { children: "This page could not load" }),
111
+ /* @__PURE__ */ jsx(AlertDescription, { children: error instanceof Error ? error.message : String(error) }),
112
+ /* @__PURE__ */ jsx(AlertAction, { children: /* @__PURE__ */ jsxs(Button, {
113
+ variant: "outline",
114
+ size: "xs",
115
+ onClick: () => void router.invalidate(),
116
+ children: [/* @__PURE__ */ jsx(ArrowClockwiseIcon, {
117
+ "aria-hidden": "true",
118
+ "data-icon": "inline-start"
119
+ }), "Try again"]
120
+ }) })
121
+ ]
122
+ });
123
+ }
124
+ function NotFound() {
125
+ return /* @__PURE__ */ jsx(Notice, {
126
+ variant: "destructive",
127
+ children: "There is no page here."
128
+ });
129
+ }
130
+ var Plain = ({ title, text }) => /* @__PURE__ */ jsxs("main", { children: [/* @__PURE__ */ jsx("h1", { children: title }), /* @__PURE__ */ jsx("p", { children: text })] });
131
+ /** A path no page has, or a loader's notFound() that no route of the site draws; titled so by the root's head. */
132
+ var SiteNotFound = () => /* @__PURE__ */ jsx(Plain, {
133
+ title: "Page not found",
134
+ text: "There is no page here."
135
+ });
136
+ /** A page that failed: what failed stays in the server's log, not on a visitor's page. */
137
+ var SiteError = () => /* @__PURE__ */ jsx(Plain, {
138
+ title: "This page could not load",
139
+ text: "Try again later."
140
+ });
141
+ /** A page still loading, after a second: the router waits that long before showing it. */
142
+ function PagePending() {
143
+ return /* @__PURE__ */ jsxs("div", {
144
+ role: "status",
145
+ "aria-label": "Loading",
146
+ className: "flex flex-col gap-4",
147
+ children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-48" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-48 w-full" })]
148
+ });
149
+ }
150
+ // src/site-url.ts
151
+ /**
152
+ * The page's site and origin: on the server, what `startApp` put in the request's context (the
153
+ * public site whose host it came to, and its origin: the site's domain, else the request's own);
154
+ * in the browser, what the server wrote on `<html data-site data-origin>`. Neither outside a request.
155
+ */
156
+ var pageHost = () => {
157
+ try {
158
+ const context = getGlobalStartContext();
159
+ return {
160
+ site: context?.site,
161
+ origin: context?.origin
162
+ };
163
+ } catch {
164
+ return {};
165
+ }
166
+ };
167
+ /**
168
+ * This page's origin, for an absolute URL a crawler needs: on a public site's own host, the site's
169
+ * domain when it has one, else the host the request came to; on the app's host, the app's. For a
170
+ * built file, `new URL(og, siteOrigin()).href` (`import og from "../assets/og.png"`). In a route's
171
+ * `head`, its loader or a component.
172
+ */
173
+ var siteOrigin = () => originOf(pageHost());
174
+ function originOf({ origin }) {
175
+ if (origin === void 0) throw new Error("siteOrigin() and siteUrl() are for a page: its head, loader or component");
176
+ return origin;
177
+ }
178
+ // src/icon-small.svg?url
179
+ var icon_small_default = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%201024%201024'%3e%3crect%20width='1024'%20height='1024'%20rx='224'%20fill='%231f6f5f'/%3e%3cpath%20fill='%23fff'%20transform='translate(512%20512)%20scale(0.3525%20-0.3525)%20translate(-612.1%20-697.8)'%20d='M662.2%20-31.2Q580.4%20-31.2%20521.6%20-12Q462.8%207.2%20425.2%2026.2Q387.6%2045.2%20369%2045.2Q349.4%2045.2%20336.5%2033.3Q323.6%2021.4%20312.1%205.8Q300.6%20-9.8%20287.6%20-21.7Q274.6%20-33.6%20255.4%20-33.6Q234%20-33.6%20220.2%20-20.6Q206.4%20-7.6%20201%2022L132.8%20345.4Q128.8%20367.6%20138.5%20383.6Q148.2%20399.6%20170.8%20407.4Q195.2%20415.8%20213.5%20406.5Q231.8%20397.2%20245.2%20370.6Q301.4%20259.8%20365.4%20194.8Q429.4%20129.8%20499.5%20101.7Q569.6%2073.6%20642.6%2073.6Q744.8%2073.6%20803.4%20126.7Q862%20179.8%20862.4%20268.4Q862.8%20325.2%20836.2%20371.8Q809.6%20418.4%20734%20462.2Q658.4%20506%20511.2%20553.4Q359.6%20603%20268%20667Q176.4%20731%20135.2%20817.4Q94%20903.8%2094%201018Q94%201139.4%20151.6%201231.5Q209.2%201323.6%20313.9%201375Q418.6%201426.4%20558.2%201426.4Q648.6%201426.4%20707.7%201408Q766.8%201389.6%20804.8%201370.7Q842.8%201351.8%20868%201351.8Q891%201351.8%20902.5%201370.9Q914%201390%20927.5%201409.6Q941%201429.2%20969.4%201429.2Q991.8%201429.2%201006.6%201414.9Q1021.4%201400.6%201032.6%201362L1126.8%201036.8Q1134.4%201010.2%201125%20989.3Q1115.6%20968.4%201092.2%20960.6Q1067.8%20952.8%201049.3%20962.2Q1030.8%20971.6%201018.2%20995.6Q957.4%201118%20887.1%201189.3Q816.8%201260.6%20741.7%201291.3Q666.6%201322%20590%201322Q487.4%201322%20427.5%201263.9Q367.6%201205.8%20367.6%201111.6Q367.6%201055.2%20394%201006.7Q420.4%20958.2%20494.3%20911.6Q568.2%20865%20709.4%20813.6Q864%20757.8%20955.2%20693.9Q1046.4%20630%201086.3%20549.7Q1126.2%20469.4%201125.8%20364.6Q1125.4%20255.6%201070.6%20165.7Q1015.8%2075.8%20912.7%2022.3Q809.6%20-31.2%20662.2%20-31.2Z'/%3e%3c/svg%3e";
180
+ // src/style.css?url
181
+ var style_default = "/assets/style-CCDLLPgG.css";
182
+ // src/routes/__root.tsx
183
+ /** The app's chrome, in a chunk of its own that a public site's host never loads. */
184
+ var Root = lazy(() => import("./app-chrome-BYS81Vnx.js").then((n) => n.t));
185
+ var Route$42 = createRootRouteWithContext()({
186
+ beforeLoad: async ({ matches, buildLocation }) => {
187
+ const languages = await pageLanguages(matches.at(-1), (to, params) => buildLocation({
188
+ to,
189
+ params
190
+ }).publicHref);
191
+ if (languages === "notFound") throw notFound();
192
+ return languages;
193
+ },
194
+ head: ({ match, matches }) => match.context.site ? matches.some(isLost) ? LOST_HEAD : {
195
+ ...BARE_HEAD,
196
+ links: alternates(match.context)
197
+ } : APP_HEAD,
198
+ headers: () => ({ "cache-control": "no-store" }),
199
+ loader: async ({ context }) => context.site ? null : appLoader(context.queryClient),
200
+ shellComponent: Document,
201
+ component: RootSwitch
202
+ });
203
+ var META = [{ charSet: "utf-8" }, {
204
+ name: "viewport",
205
+ content: "width=device-width, initial-scale=1"
206
+ }];
207
+ /**
208
+ * A public site's head: the site's layout sets its own icon and stylesheet, and its pages their
209
+ * titles. No color-scheme: the browser's light, unless the site's stylesheet declares its own.
210
+ */
211
+ var BARE_HEAD = { meta: META };
212
+ /**
213
+ * A public site's page not found: a path no page has (`_notFound`, on the route that draws it), or
214
+ * a loader's notFound(). Its title, unless a route's head gives one.
215
+ */
216
+ var LOST_HEAD = { meta: [...META, { title: "Page not found" }] };
217
+ var isLost = ({ status, _notFound }) => _notFound === true || status === "notFound";
218
+ /**
219
+ * A public site's document has a body with no margin, in a layer of its own ahead of the head's
220
+ * stylesheets, so it comes below any layer of the site's: a site's stylesheet overrides it.
221
+ */
222
+ var BARE_RESET = "@layer sanoma{body{margin:0}}";
223
+ /**
224
+ * On a public site's own host, a page in more than one language links to itself in each, and to
225
+ * its default as `x-default` when it is in that: absolute, as search engines ask, at the site's
226
+ * origin (`siteOrigin()`, its domain when it has one). As its site's sitemap lists it.
227
+ */
228
+ function alternates({ site, locales = [] }) {
229
+ const links = alternatesOf(locales, defaultLocaleOf(site));
230
+ if (!links.length) return [];
231
+ const origin = siteOrigin();
232
+ return links.map(({ locale, href }) => ({
233
+ rel: "alternate",
234
+ hrefLang: locale,
235
+ href: new URL(href, origin).href
236
+ }));
237
+ }
238
+ var APP_HEAD = {
239
+ meta: [
240
+ ...META,
241
+ {
242
+ name: "color-scheme",
243
+ content: "light dark"
244
+ },
245
+ { title: "Sanoma" }
246
+ ],
247
+ links: [{
248
+ rel: "stylesheet",
249
+ href: style_default
250
+ }, {
251
+ rel: "icon",
252
+ type: "image/svg+xml",
253
+ href: icon_small_default
254
+ }]
255
+ };
256
+ /**
257
+ * Who the server says is asking, in the first render: a deployment's login shows at once. And
258
+ * the config, which every page reads and which cannot change while the app runs, and whether the
259
+ * repository has a remote, which the bar's Changes shows by. They stay in
260
+ * the query client, where the page reads them: a loader returns only what no query holds (here,
261
+ * the `Prefs`), since the page carries loader data too.
262
+ */
263
+ async function appLoader(queryClient) {
264
+ queryClient.query(waitingRunsQuery()).catch(() => {});
265
+ await Promise.all([
266
+ queryClient.query({
267
+ ...actorQuery(),
268
+ staleTime: "static"
269
+ }),
270
+ queryClient.query({
271
+ ...configQuery(),
272
+ staleTime: "static"
273
+ }),
274
+ queryClient.query(remoteQuery()),
275
+ queryClient.query({
276
+ ...chatModelQuery(),
277
+ staleTime: "static"
278
+ }).catch(() => {})
279
+ ]);
280
+ return readPrefs();
281
+ }
282
+ /** A public site's pages alone, on its host; else the app's chrome around the page. */
283
+ function RootSwitch() {
284
+ return useRouter().options.context.site ? /* @__PURE__ */ jsx(SiteActor, { children: /* @__PURE__ */ jsx(Outlet, {}) }) : /* @__PURE__ */ jsx(Root, {});
285
+ }
286
+ /**
287
+ * On a public site's host, who the page is for, as `useActor()` reads it: the visitor the site's
288
+ * login verifies, or nobody (`anonymous`), asked once the page is in the browser; not read
289
+ * (`actor` undefined) until then. One provider throughout, so the page never remounts.
290
+ */
291
+ function SiteActor({ children }) {
292
+ const { data } = useQuery(actorQuery());
293
+ const actor = useActorState(data ?? {
294
+ fromServer: true,
295
+ actor: null
296
+ });
297
+ return /* @__PURE__ */ jsx(ActorContext, {
298
+ value: data ? actor : {
299
+ ...actor,
300
+ actor: void 0
301
+ },
302
+ children
303
+ });
304
+ }
305
+ /**
306
+ * Whether the chat column was left open or folded (its cookie, unset until Chat is used) and whether the
307
+ * page is Compact (DensityProvider says why a cookie), from the request's cookies on the server
308
+ * and `document.cookie` in the browser. Each takes its value once, as it mounts: the first render
309
+ * is hydration, which has the server's answer; reading it in the browser too keeps a later
310
+ * remount (an error boundary's retry, say) on the cookie's side for both.
311
+ */
312
+ var readPrefs = () => ({
313
+ chat: chatPref(getCookie(CHAT_COOKIE)),
314
+ compact: getCookie(DENSITY_COOKIE) === "compact"
315
+ });
316
+ /** A cookie's value in the browser, or undefined when it is not set. */
317
+ function Document({ children }) {
318
+ const site = useRouter().options.context.site;
319
+ const { origin } = pageHost();
320
+ const { locale } = usePageLanguages();
321
+ return /* @__PURE__ */ jsxs("html", {
322
+ lang: site && locale || "en",
323
+ "data-site": site,
324
+ "data-origin": origin,
325
+ suppressHydrationWarning: !site,
326
+ children: [/* @__PURE__ */ jsxs("head", { children: [site && /* @__PURE__ */ jsx("style", {
327
+ href: "sanoma-bare",
328
+ precedence: "sanoma",
329
+ children: BARE_RESET
330
+ }), /* @__PURE__ */ jsx(HeadContent, {})] }), /* @__PURE__ */ jsxs("body", { children: [site ? children : /* @__PURE__ */ jsx(ThemeProvider, {
331
+ attribute: "class",
332
+ defaultTheme: "system",
333
+ enableSystem: true,
334
+ enableColorScheme: false,
335
+ storageKey: "sanoma.theme",
336
+ disableTransitionOnChange: true,
337
+ children
338
+ }), /* @__PURE__ */ jsx(Scripts, {})] })]
339
+ });
340
+ }
341
+ // src/routes/index.tsx
342
+ var Route$41 = createFileRoute("/")({ beforeLoad: () => {
343
+ throw redirect({ to: "/workflows" });
344
+ } });
345
+ // src/routes/apps/route.tsx
346
+ /** The apps' layout, with no component of its own: "Apps", the list's title and the crumb above an app's. */
347
+ var Route$40 = createFileRoute("/apps")({
348
+ staticData: { crumb: "Apps" },
349
+ head: ({ match }) => pageTitle(match.staticData.crumb)
350
+ });
351
+ // src/routes/changes/route.tsx
352
+ /** The changes' layout, with no component of its own: "Changes", the list's title and the crumb above a change's. */
353
+ var Route$39 = createFileRoute("/changes")({
354
+ staticData: { crumb: "Changes" },
355
+ head: ({ match }) => pageTitle(match.staticData.crumb)
356
+ });
357
+ // src/routes/connectors/route.tsx
358
+ /** The connectors' layout, with no component of its own: "Connectors" in the breadcrumb, before a connector's title. */
359
+ var Route$38 = createFileRoute("/connectors")({
360
+ staticData: { crumb: "Connectors" },
361
+ head: ({ match }) => pageTitle(match.staticData.crumb)
362
+ });
363
+ // src/routes/data/route.tsx
364
+ /**
365
+ * The collections' layout, with no component of its own: "Data", the list's title and the crumb
366
+ * above a collection's.
367
+ */
368
+ var Route$37 = createFileRoute("/data")({
369
+ staticData: { crumb: "Data" },
370
+ head: ({ match }) => pageTitle(match.staticData.crumb)
371
+ });
372
+ // src/routes/hosting/route.tsx
373
+ /**
374
+ * Hosting's layout, with no component of its own: "Hosting", the page's title and the crumb above
375
+ * going live's Connect pages.
376
+ */
377
+ var Route$36 = createFileRoute("/hosting")({
378
+ staticData: { crumb: "Hosting" },
379
+ head: ({ match }) => pageTitle(match.staticData.crumb)
380
+ });
381
+ // src/routes/inbox.tsx
382
+ var $$splitComponentImporter$18 = () => import("./inbox-D6R6sWBB.js");
383
+ var Route$35 = createFileRoute("/inbox")({
384
+ validateSearch: InboxSearch,
385
+ loaderDeps: ({ search: { show } }) => ({ decided: show === "decided" }),
386
+ loader: async ({ context: { queryClient }, deps }) => {
387
+ await Promise.all([queryClient.query({
388
+ ...waitingRunsQuery(),
389
+ staleTime: "static"
390
+ }), deps.decided && queryClient.query({
391
+ ...recentRunsQuery(),
392
+ staleTime: "static"
393
+ })]);
394
+ },
395
+ staticData: {
396
+ crumb: "Inbox",
397
+ wide: true
398
+ },
399
+ head: ({ match }) => pageTitle(match.staticData.crumb),
400
+ component: lazyRouteComponent($$splitComponentImporter$18, "component")
401
+ });
402
+ /**
403
+ * The Inbox: how many approvals wait, the tabs For you, Everyone and Decided (`?show=`, each a
404
+ * link that drops `?approval=`, so its own first opens), then one card listing the approvals the
405
+ * tab shows, the one open marked, and over its right the open approval: the one `?approval=`
406
+ * names, else the first for you, else the first the tab lists (`useInbox`), or on Decided the one
407
+ * named, else the latest decided. For you and Everyone list those decided today under them.
408
+ */
409
+ /** On Decided: the approvals decided in the latest runs, and the one named, else the latest, open over them. */
410
+ /** Off Decided, in the browser: the approvals decided since midnight in the latest runs, each opening on Decided. */
411
+ /** A group of approvals under `label`, each a row keeping `show`, the one `openKey` names marked. */
412
+ /**
413
+ * An approval in the list: its status as a dot, its title, then its workflow (by title) and who
414
+ * started the run, and when it was asked or decided at the end. `current` marks the one open: the
415
+ * first opens with no `?approval=`, which the link cannot tell. Memoised: the query shares an
416
+ * unchanged entry's object across a poll, so only the rows that changed draw again.
417
+ */
418
+ /**
419
+ * The approval open, floating over the right of the list's card: its title and status, what it
420
+ * asks in a sentence, its details, and Approve and Reject while it is pending. A decision drops
421
+ * it from the list, so the next one opens. Its body scrolls inside the card's height.
422
+ */
423
+ /**
424
+ * An operation as something to do: "publish a post in Ghost". Its id when the config no longer
425
+ * has it. "an" before a, e, i or o only: a resource starting with u is more often "a user".
426
+ */
427
+ /**
428
+ * The approval in a sentence: whose run of which workflow (its title) wants to do what (start,
429
+ * for a start the policy holds), and the approval's title, with the policy's rules behind it.
430
+ */
431
+ // src/routes/people.tsx
432
+ var $$splitComponentImporter$17 = () => import("./people-CkU_AxrV.js");
433
+ var Route$34 = createFileRoute("/people")({
434
+ validateSearch: PeopleSearch,
435
+ staticData: {
436
+ crumb: "People",
437
+ wide: true
438
+ },
439
+ head: ({ match }) => pageTitle(match.staticData.crumb),
440
+ loader: ({ context: { queryClient } }) => queryClient.prefetchQuery({
441
+ ...peopleSignInsQuery(),
442
+ staleTime: "static"
443
+ }),
444
+ component: lazyRouteComponent($$splitComponentImporter$17, "component")
445
+ });
446
+ /** Why a person has no invite link: nothing to send its code to. */
447
+ /** A person's declared name, else their id. */
448
+ /** The people's table: name, email, groups, how they sign in, when they last did, and their invite link. */
449
+ /** The agents' table: name, whom each acts for, groups, declaration. */
450
+ /** When the person last signed in on this app and how, from the ledger; `Never` until they do. */
451
+ /** How a sign-in was made, as the column says it. */
452
+ /** How a person may sign in, by what their declaration gives a sign-in to match: their email (shortened), their GitHub login. */
453
+ /**
454
+ * Minting a person's invite link, and the card that shows it over the list: `start` mints one
455
+ * (each replacing that person's last), `person` is whom the card is for while it is open, and
456
+ * `card` the card. The card belongs to the view it was opened in (`where`, the page's search):
457
+ * opening someone else or another tab puts it away. A refusal is a toast, and the card closes.
458
+ */
459
+ /**
460
+ * A person's Invite link button: for someone in `admin` (the server refuses anyone else too), and
461
+ * a person with an email declared; otherwise disabled, with why as its tip.
462
+ */
463
+ /**
464
+ * The invite link just minted for `person`, over the list: a one-use link that signs them in, for
465
+ * 24 hours, to send however you like, with Copy; `url` is undefined while it is being made.
466
+ */
467
+ /** The groups' table: name, members, declaration; last, while there are agents, the `agents` group the runtime gives them. */
468
+ /**
469
+ * The one open, over the list: its name, its file and export, its groups (written on each group,
470
+ * not here), and its declaration's form (its identity read-only: `DeclarationForm`).
471
+ */
472
+ /** The open person's Invite link, where this app mints them: it opens the same card as the row's. */
473
+ // src/routes/permissions.tsx
474
+ var $$splitComponentImporter$16 = () => import("./permissions-BfMcQqQb.js");
475
+ var Route$33 = createFileRoute("/permissions")({
476
+ validateSearch: AppSearch,
477
+ staticData: { crumb: "Permissions" },
478
+ head: ({ match }) => pageTitle(match.staticData.crumb),
479
+ loader: ({ context: { queryClient } }) => {
480
+ queryClient.prefetchQuery(hostEnforcementQuery());
481
+ return queryClient.query({
482
+ ...permissionsQuery(),
483
+ staleTime: "static"
484
+ });
485
+ },
486
+ component: lazyRouteComponent($$splitComponentImporter$16, "component")
487
+ });
488
+ /**
489
+ * What the policy answers someone in no group, in each group (the declared ones, `agents` and
490
+ * `visitors`) and `anonymous`, across, for each workflow's start with each operation it uses under it, and each operation a
491
+ * person may call directly, down, the input unknown. A cell with a rule behind it opens the rule
492
+ * in a sheet, whose Show the rule marks its lines in the policy's files, shown read-only under the
493
+ * grid. While the files are in more than one folder (the root's `policies/`, an app's), the tabs
494
+ * All and one per folder (`?app=`) pick a folder's files and the grid's rows in it, the files
495
+ * under a heading per folder. Nothing here is edited: the policy is `policies/*.cedar`, written by the agent.
496
+ */
497
+ /**
498
+ * The policy beside the title, in one muted line: Cedar, its version, and how many groups,
499
+ * workflows and operations (each once, in a workflow or called directly) the grid has.
500
+ */
501
+ /**
502
+ * Under the grid, whether the repository's host holds every change to `main` to a merge (a pull
503
+ * request and the `sanoma` check) and, when it does not, why, as the host says: until it does, the
504
+ * grid holds only for what goes through Sanoma. Nothing without a remote.
505
+ */
506
+ /** The line's place when what the host enforces could not be read: the grid stays. */
507
+ /**
508
+ * A policy file, read-only and plain (the app has no Cedar grammar), titled by its path, as high
509
+ * as its lines up to the workflow Code card's height, `span` (the shown rule's) marked. Its id
510
+ * is its path, which Show the rule scrolls to.
511
+ */
512
+ /**
513
+ * The rule behind a cell: its title (else its id), its id and file, its reason, for a hold whom
514
+ * it asks, and Show the rule when its file is shown (`show`).
515
+ */
516
+ // src/routes/resources.tsx
517
+ /** `/resources`, the page Hosting replaced: redirects there, with the declaration it shows. */
518
+ var Route$32 = createFileRoute("/resources")({
519
+ validateSearch: HostingSearch,
520
+ beforeLoad: ({ search }) => {
521
+ throw redirect({
522
+ to: "/hosting",
523
+ search
524
+ });
525
+ }
526
+ });
527
+ // src/routes/start.tsx
528
+ var Route$31 = createFileRoute("/start")({
529
+ validateSearch: z.object({ workflow: z.string().optional().catch(void 0) }),
530
+ beforeLoad: ({ search }) => {
531
+ if (search.workflow !== void 0) throw redirect({
532
+ to: "/workflows/$name",
533
+ params: { name: search.workflow },
534
+ search: { new: true }
535
+ });
536
+ throw redirect({ to: "/workflows" });
537
+ }
538
+ });
539
+ // src/routes/workflows/route.tsx
540
+ /**
541
+ * The workflows' layout, with no component of its own: "Workflows", the overview's title and the
542
+ * crumb above a workflow's.
543
+ */
544
+ var Route$30 = createFileRoute("/workflows")({
545
+ staticData: { crumb: "Workflows" },
546
+ head: ({ match }) => pageTitle(match.staticData.crumb)
547
+ });
548
+ // src/routes/api/call.ts
549
+ /**
550
+ * A site's `api` over plain JSON (`callApi`), for a client that is not the app's page: Sanoma
551
+ * Cloud's connector starts sanoma-ops's workflows here with its bearer token. A request with an
552
+ * api token (`bearerOf`, as the public login reads it) acts as the token, not as a cookie, so only
553
+ * one without is checked for CSRF.
554
+ */
555
+ var Route$29 = createFileRoute("/api/call")({ server: {
556
+ middleware: [createCsrfMiddleware({ filter: ({ request }) => bearerOf(request) === void 0 })],
557
+ handlers: { POST: ({ request, context }) => postCall(request, context) }
558
+ } });
559
+ // src/routes/api/chat.ts
560
+ /**
561
+ * The operator agent's chat: a turn's reply as a UI message stream, which the worker's run of the
562
+ * turn writes (server/chat.ts). A server route, so its own CSRF check: start.ts's covers only
563
+ * server functions.
564
+ */
565
+ var Route$28 = createFileRoute("/api/chat")({ server: {
566
+ middleware: [createCsrfMiddleware()],
567
+ handlers: { POST: ({ request, context }) => postChat(request, context) }
568
+ } });
569
+ // src/routes/api/sign-in.ts
570
+ /**
571
+ * The code a person pastes on their own agent's sign-in card, for the vendor's sign-in waiting in
572
+ * their chat's turn (server/chat.ts). A server route beside `/api/chat`, with its own CSRF check.
573
+ */
574
+ var Route$27 = createFileRoute("/api/sign-in")({ server: {
575
+ middleware: [createCsrfMiddleware()],
576
+ handlers: { POST: ({ request, context }) => postSignInCode(request, context) }
577
+ } });
578
+ // src/routes/apps/index.tsx
579
+ var $$splitComponentImporter$15 = () => import("./apps-xwQAehch.js");
580
+ var Route$26 = createFileRoute("/apps/")({ component: lazyRouteComponent($$splitComponentImporter$15, "component") });
581
+ /** The config's apps, each with what it declares in a line: its workflows, collections and sites. */
582
+ /** A repository's URL as one to compare: no `.git`, no trailing slash, in lower case. */
583
+ /**
584
+ * The company's apps, then those on GitHub: its own (no source), those taken from a source, each
585
+ * with its source and how far behind it is, each linking to its page (where Update is), and the
586
+ * available ones, each with its README, a solution's demo holding it and Add. New app and Add open
587
+ * the chat with what to ask the agent.
588
+ */
589
+ /** An app of the repo: its name (to its page), folder and source, what it holds, and `children` as its actions. */
590
+ /**
591
+ * The apps on GitHub not taken yet: `sanoma.apps.list`, called as the person, so once the page
592
+ * knows who you are (in the browser, with the default login), and read by the page, so GitHub never
593
+ * holds up the rest.
594
+ */
595
+ /** An app on GitHub: its name, tier and what Sanoma says, its description, then its README, Try it and Add. */
596
+ // src/routes/apps/$name.tsx
597
+ var $$splitNotFoundComponentImporter$6 = () => import("./_name-BqFwnyf7.js");
598
+ var $$splitComponentImporter$14 = () => import("./_name-BGagGBjX.js");
599
+ var Route$25 = createFileRoute("/apps/$name")({
600
+ loader: async ({ context: { queryClient }, params }) => {
601
+ const app = (await queryClient.query({
602
+ ...configQuery(),
603
+ staleTime: "static"
604
+ })).apps.find((entry) => entry.name === params.name);
605
+ if (!app) throw notFound();
606
+ await Promise.all([queryClient.query({
607
+ ...lastRunsQuery(),
608
+ staleTime: "static"
609
+ }), queryClient.query({
610
+ ...scenariosQuery(),
611
+ staleTime: "static"
612
+ })]);
613
+ return { crumb: app.name };
614
+ },
615
+ head: ({ loaderData, params }) => pageTitle(loaderData?.crumb ?? params.name),
616
+ staticData: { wide: true },
617
+ component: lazyRouteComponent($$splitComponentImporter$14, "component"),
618
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$6, "notFoundComponent")
619
+ });
620
+ /**
621
+ * What the app's folder holds, from the description: its sites, collections and workflows (each
622
+ * naming the app), and its policy files (`<dir>/policies/`). People are never an app's: they are
623
+ * declared at the root.
624
+ */
625
+ /** The scenarios under the app's folder, by feature file, and the files there that could not be read. */
626
+ /**
627
+ * An app's page: its folder and, for one taken from a source, how far behind it is, the source and
628
+ * Update in the header; then its parts in one card, a section each: Sites, Collections, Workflows
629
+ * (what each may call, its last run), Policies and Scenarios.
630
+ */
631
+ /** Where the app is, and where it came from. */
632
+ /** A section of the app's card: its heading, how many and where else it shows, then its table, or None. */
633
+ /** What a section with nothing to list says. */
634
+ /** Names as code; a dash for none. */
635
+ /** The app's workflows: each with what it may call, by effect, and its last run, linking to its runs. */
636
+ /** The feature files under the app's folder: how many scenarios each holds, for which workflows, or why it cannot be read. */
637
+ // src/routes/changes/index.tsx
638
+ var $$splitComponentImporter$13 = () => import("./changes-Bc_OiDBD.js");
639
+ /** Which changes the page lists (`?show=`): the open ones (by default), or those done. */
640
+ var ChangesSearch = z.object({ show: z.enum(["open", "done"]).optional().catch(void 0) });
641
+ var Route$24 = createFileRoute("/changes/")({
642
+ validateSearch: ChangesSearch,
643
+ loaderDeps: ({ search: { show } }) => ({ open: show !== "done" }),
644
+ loader: async ({ context: { queryClient }, deps }) => {
645
+ await queryClient.query({
646
+ ...changesQuery(deps),
647
+ staleTime: "static"
648
+ });
649
+ },
650
+ component: lazyRouteComponent($$splitComponentImporter$13, "component")
651
+ });
652
+ /**
653
+ * The changes, with how many, the tabs Open and Done (`?show=`), then one card with a table of
654
+ * them, newest first, a row opening the change's review.
655
+ */
656
+ /** The changes as a table: each one's title, where it is, how many files it edits, its pull request and when it last moved. */
657
+ // src/routes/changes/$id.tsx
658
+ var $$splitNotFoundComponentImporter$5 = () => import("./_id-ce1EGp7Y.js");
659
+ var $$splitComponentImporter$12 = () => import("./_id-BViXAagq.js");
660
+ var Route$23 = createFileRoute("/changes/$id")({
661
+ loader: async ({ context: { queryClient }, params }) => {
662
+ const [kept] = await Promise.all([queryClient.query({
663
+ ...changeQuery(params.id),
664
+ staleTime: "static"
665
+ }), queryClient.query({
666
+ ...permissionsQuery(),
667
+ staleTime: "static"
668
+ })]);
669
+ const change = kept ?? await queryClient.fetchQuery(changeQuery(params.id));
670
+ if (!change) throw notFound();
671
+ return { crumb: change.state.title };
672
+ },
673
+ staticData: { wide: true },
674
+ head: ({ loaderData }) => pageTitle(loaderData?.crumb),
675
+ component: lazyRouteComponent($$splitComponentImporter$12, "component"),
676
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$5, "notFoundComponent")
677
+ });
678
+ /**
679
+ * A change's review, in the ops manager's words: under Changes, its title, where it is, and a
680
+ * line for the developer (its branch at the head it last planned, its pull request, who opened it
681
+ * when, its run); then one card: why it cannot publish, the runs it would strand, what changed by
682
+ * kind and who may do what, with the decision (`ChangeDecision`) floating over its right.
683
+ */
684
+ /** Why the change cannot publish now, until it is merged or closed: the policy's deny (its rule and reason), else what blocks it. */
685
+ /**
686
+ * Until the change is merged or closed, the waiting runs of the workflows it edits, as its last
687
+ * plan found them, which publishing cannot move: "2 runs of Offboarding are waiting, and this
688
+ * change edits Offboarding", each run linked.
689
+ */
690
+ /** The files the change edits, a section per kind (`groupFiles`), each file's path. */
691
+ /**
692
+ * The Permissions grid, main's against the branch's (`PermissionsDiff`), when the change alters
693
+ * it; when it changes the rules and its grid could not be read (its policies do not hold), why.
694
+ */
695
+ // src/routes/connectors/index.tsx
696
+ var $$splitComponentImporter$11 = () => import("./connectors-5a5_SlHO.js");
697
+ var Route$22 = createFileRoute("/connectors/")({
698
+ validateSearch: z.object({ add: z.string().optional() }),
699
+ loader: async ({ context: { queryClient } }) => {
700
+ await queryClient.query({
701
+ ...credentialsQuery(),
702
+ staleTime: "static"
703
+ });
704
+ },
705
+ component: lazyRouteComponent($$splitComponentImporter$11, "component")
706
+ });
707
+ /** The installed connectors, one row each linking to its page; then the ones on npm, each with how to add it. */
708
+ /** Every vendor the config's operations are from. */
709
+ /** The connectors on npm the config does not install; the chosen one's steps to add it in a sheet. */
710
+ /**
711
+ * How to add a connector: install the package, import it in the config, set its credentials. The
712
+ * README has the exact import, as npm does not say what the package exports.
713
+ */
714
+ /** The npm packages the config's connectors are from. */
715
+ /** An available connector's logo, decorative beside its title; a plug when it has none. */
716
+ /** Whether the drivers' environment variables are all ready, or how many are not. */
717
+ // src/routes/connectors/$vendor.tsx
718
+ var $$splitNotFoundComponentImporter$4 = () => import("./_vendor-CcEviOki.js");
719
+ var $$splitComponentImporter$10 = () => import("./_vendor-CNB03LWX.js");
720
+ /** Where an OAuth callback sends the person back: the attempt to follow on its card, or why none. */
721
+ var ConnectorSearch = z.object({
722
+ connection: z.string().optional(),
723
+ attempt: z.string().optional(),
724
+ error: z.enum(Object.keys(CALLBACK_ERRORS)).optional().catch(void 0)
725
+ });
726
+ var Route$21 = createFileRoute("/connectors/$vendor")({
727
+ validateSearch: ConnectorSearch,
728
+ loader: async ({ context: { queryClient }, params }) => {
729
+ const config = await queryClient.query({
730
+ ...configQuery(),
731
+ staleTime: "static"
732
+ });
733
+ const connector = connectorNamed(params.vendor)(config);
734
+ if (!connector) throw notFound();
735
+ await Promise.all([queryClient.query({
736
+ ...scenariosQuery(),
737
+ staleTime: "static"
738
+ }), queryClient.query({
739
+ ...credentialsQuery(),
740
+ staleTime: "static"
741
+ })]);
742
+ return { crumb: connector.vendor.title };
743
+ },
744
+ head: ({ loaderData, params }) => pageTitle(loaderData?.crumb ?? params.vendor),
745
+ component: lazyRouteComponent($$splitComponentImporter$10, "component"),
746
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$4, "notFoundComponent")
747
+ });
748
+ /** One connector: where it lives, its resource types, every operation with its contract and scenarios, and who uses it. */
749
+ /** Under an operation: its contract, the steps that name it, and the scenarios about it. */
750
+ /**
751
+ * What a scenario does with the operation, in the order a scenario says it, as verbs: the
752
+ * graph's badges say the same of a node as states ("seeded", "not called").
753
+ */
754
+ // src/routes/data/index.tsx
755
+ var $$splitComponentImporter$9 = () => import("./data-aEdhwcqy.js");
756
+ var Route$20 = createFileRoute("/data/")({
757
+ validateSearch: AppSearch,
758
+ component: lazyRouteComponent($$splitComponentImporter$9, "component")
759
+ });
760
+ /**
761
+ * The config's collections grouped by the folder that declares them (`appGroupsOf`), each row with
762
+ * the workflows whose `uses` save to it (`data.<name>.save`, the built-ins left out) and the sites
763
+ * whose calls name it.
764
+ */
765
+ /** A link inside a row that opens the grid: its own page, not the row's. */
766
+ /**
767
+ * Every collection of the config, with how many there are; while they are in more than one folder,
768
+ * the tabs All, Yours (the root's) and each app's (`?app=`), with how many each, and the rows under
769
+ * a heading per folder. One card holds the table: a row opens its grid. With sites, the header
770
+ * leads to the Sites page, which the bar has no tile for.
771
+ */
772
+ /** A collection's row, opening its grid; each name in it links to its own page. */
773
+ /** Names in a cell, between commas; a dash for none. */
774
+ // src/routes/data/$name/route.tsx
775
+ var $$splitNotFoundComponentImporter$3 = () => import("./route-BTT7nMJq.js");
776
+ /**
777
+ * Layout for a collection's grid (`index.tsx`) and its import (`import.tsx`), with no component:
778
+ * finds the collection, else not-found, and names its crumb, the collection's title.
779
+ */
780
+ var Route$19 = createFileRoute("/data/$name")({
781
+ loader: async ({ context: { queryClient }, params }) => {
782
+ const config = await queryClient.query({
783
+ ...configQuery(),
784
+ staleTime: "static"
785
+ });
786
+ const collection = collectionNamed(params.name)(config);
787
+ if (!collection) throw notFound();
788
+ return { crumb: collection.title ?? collection.name };
789
+ },
790
+ head: ({ loaderData, params }) => pageTitle(loaderData?.crumb ?? params.name),
791
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$3, "notFoundComponent")
792
+ });
793
+ // src/routes/hosting/index.tsx?tsr-shared=1
794
+ /** The slots on top of Hosting, each a contract a resource type meets (`capabilities`), in the order they show. */
795
+ var SLOTS = [
796
+ {
797
+ capability: "source",
798
+ title: "Repository"
799
+ },
800
+ {
801
+ capability: "database",
802
+ title: "Database"
803
+ },
804
+ {
805
+ capability: "host",
806
+ title: "Host"
807
+ },
808
+ {
809
+ capability: "wakeup",
810
+ title: "Wakeup"
811
+ },
812
+ {
813
+ capability: "sandbox",
814
+ title: "Agent box"
815
+ }
816
+ ];
817
+ /**
818
+ * Which declared resource fills each slot: the first whose type meets its contract, the
819
+ * repository being the one the host names (its `refs`) when the host names one. Whether the
820
+ * company is declared live (a host or a database is), and whether going live's steps show: while
821
+ * it is not, and while going live is between its first apply and its host's. Whether a Wakeup
822
+ * starts the host again (`woken`).
823
+ */
824
+ function slotsOf(config) {
825
+ const capabilities = new Map(config.resourceTypes.map((t) => [t.id, t.capabilities ?? []]));
826
+ const meets = (r, capability) => capabilities.get(`${r.vendor}.${r.type}`)?.includes(capability) ?? false;
827
+ const first = (capability) => config.resources.find((r) => meets(r, capability));
828
+ const host = first("host");
829
+ const named = new Set(Object.values(host?.refs ?? {}));
830
+ const filled = SLOTS.flatMap((slot) => {
831
+ const resource = slot.capability === "source" && config.resources.find((r) => named.has(r.id) && meets(r, "source")) || first(slot.capability);
832
+ return resource ? [{
833
+ ...slot,
834
+ resource
835
+ }] : [];
836
+ });
837
+ const live = host !== void 0 || first("database") !== void 0;
838
+ const byId = (id) => config.resources.find((r) => r.id === id);
839
+ const infraHost = byId(`${INFRA}#host`);
840
+ const pushing = infraHost !== void 0 && infraHost.binding === void 0 && byId(`resources/sanoma/infra.ts#repo`)?.binding !== void 0;
841
+ const woken = host !== void 0 && config.resources.some((r) => meets(r, "wakeup") && Object.values(r.refs).includes(host.id));
842
+ return {
843
+ filled,
844
+ live,
845
+ goingLive: !live || pushing,
846
+ woken
847
+ };
848
+ }
849
+ /** The built-in drift workflow's name, when the config has it: its connectors declare resource types. */
850
+ var driftOf = (config) => config.workflows.find((wf) => wf.name === DRIFT_WORKFLOW)?.name;
851
+ /** The latest drift run, whatever its status. */
852
+ var latestQuery = (drift) => runsQuery({
853
+ workflow: drift,
854
+ limit: 1
855
+ });
856
+ /** The latest drift run that finished. */
857
+ var finishedQuery = (drift) => runsQuery({
858
+ workflow: drift,
859
+ status: "finished",
860
+ limit: 1
861
+ });
862
+ // src/components/go-live.tsx
863
+ /**
864
+ * What `GoLive` reads, into the query client: for the loader of the page that shows it. A query
865
+ * that fails is left failed, for `GoLive` to say, never the page.
866
+ */
867
+ var loadGoLive = (queryClient) => Promise.all([queryClient.prefetchQuery({
868
+ ...setupStatusQuery(),
869
+ staleTime: "static"
870
+ }), queryClient.prefetchQuery({
871
+ ...goLiveProgressQuery(),
872
+ staleTime: "static"
873
+ })]);
874
+ /**
875
+ * Going live, on Hosting while no host and no database are declared, or once its repository is
876
+ * bound until its host is: connect GitHub and the config's vendors, choose where the company goes,
877
+ * then apply the repository and the database, push this repository to the new one, and apply the
878
+ * host. Each step shows once the one before is done; it reads how far it is from the files, the
879
+ * lockfile and the runs, so it picks up where it was. What it cannot read fails it alone, said in
880
+ * its place, with the rest of the page as it is.
881
+ */
882
+ function GoLive() {
883
+ return /* @__PURE__ */ jsx(CatchBoundary, {
884
+ getResetKey: () => "go-live",
885
+ errorComponent: GoLiveFailed,
886
+ children: /* @__PURE__ */ jsx(Suspense, {
887
+ fallback: /* @__PURE__ */ jsx(Skeleton, { className: "h-48 w-full" }),
888
+ children: /* @__PURE__ */ jsx(GoLiveSteps, {})
889
+ })
890
+ });
891
+ }
892
+ /** Going live's place when how far it is could not be read. */
893
+ function GoLiveFailed({ error, reset }) {
894
+ const { reset: refetch } = useQueryErrorResetBoundary();
895
+ return /* @__PURE__ */ jsxs(Notice, {
896
+ variant: "destructive",
897
+ children: [
898
+ "Could not read how far going live is: ",
899
+ errorMessage(error),
900
+ " ",
901
+ /* @__PURE__ */ jsx(Button, {
902
+ variant: "outline",
903
+ size: "xs",
904
+ onClick: () => {
905
+ refetch();
906
+ reset();
907
+ },
908
+ children: "Try again"
909
+ })
910
+ ]
911
+ });
912
+ }
913
+ function GoLiveSteps() {
914
+ const { data: status } = useSuspenseQuery(setupStatusQuery());
915
+ const { data: progress } = useSuspenseQuery(goLiveProgressQuery());
916
+ const isSet = (name) => status.tokens.some((t) => t.name === name && t.status === "set");
917
+ const github = status.githubApp !== null || isSet("GITHUB_TOKEN");
918
+ const asked = new Set(status.tokens.map((t) => t.name));
919
+ const vendors = SETUP_VENDORS.filter((v) => v.tokens.some((name) => asked.has(name))).map((v) => ({
920
+ ...v,
921
+ connected: v.tokens.every(isSet)
922
+ }));
923
+ const { data: titles } = useSuspenseQuery({
924
+ ...configQuery(),
925
+ select: (config) => config.vendors
926
+ });
927
+ const named = senderVendorOf(status.signIn);
928
+ const sender = named !== void 0 && !vendors.some((v) => v.vendor === named) ? named : void 0;
929
+ const { run, bound } = progress;
930
+ const data = bound.beforeHost;
931
+ const hostRun = run && data && (!isEnded(run.status) || run.results?.some((r) => r.id === `resources/sanoma/infra.ts#host`));
932
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
933
+ /* @__PURE__ */ jsxs(Region, {
934
+ title: "1. Connect",
935
+ children: [/* @__PURE__ */ jsxs(ItemGroup, { children: [
936
+ /* @__PURE__ */ jsx(Item, {
937
+ role: "listitem",
938
+ variant: "outline",
939
+ size: "xs",
940
+ children: /* @__PURE__ */ jsxs(ItemContent, { children: [/* @__PURE__ */ jsxs(ItemHeading, { children: ["GitHub", /* @__PURE__ */ jsx(ToneBadge, {
941
+ tone: github ? "ok" : "off",
942
+ children: github ? "connected" : "not connected"
943
+ })] }), /* @__PURE__ */ jsxs(ItemDescription, { children: [
944
+ status.githubApp ? `The App ${status.githubApp.slug}` : "No App",
945
+ isSet("GITHUB_TOKEN") ? ", and a token of your own" : "",
946
+ "."
947
+ ] })] })
948
+ }),
949
+ vendors.map((v) => /* @__PURE__ */ jsx(Item, {
950
+ role: "listitem",
951
+ variant: "outline",
952
+ size: "xs",
953
+ children: /* @__PURE__ */ jsxs(ItemContent, { children: [/* @__PURE__ */ jsxs(ItemHeading, { children: [v.title, /* @__PURE__ */ jsx(ToneBadge, {
954
+ tone: v.connected ? "ok" : "off",
955
+ children: v.connected ? "connected" : "not connected"
956
+ })] }), /* @__PURE__ */ jsx(ItemDescription, { children: v.about })] })
957
+ }, v.title)),
958
+ sender && /* @__PURE__ */ jsx(Item, {
959
+ role: "listitem",
960
+ variant: "outline",
961
+ size: "xs",
962
+ children: /* @__PURE__ */ jsxs(ItemContent, { children: [/* @__PURE__ */ jsxs(ItemHeading, { children: [titles[sender]?.title ?? sender, /* @__PURE__ */ jsx(ToneBadge, {
963
+ tone: status.signIn.senderConnected ? "ok" : "off",
964
+ children: status.signIn.senderConnected ? "connected" : "not connected"
965
+ })] }), /* @__PURE__ */ jsx(ItemDescription, { children: "Sends email, including sign-in codes, as the sender." })] })
966
+ }),
967
+ /* @__PURE__ */ jsx(SignInItem, {
968
+ signIn: status.signIn,
969
+ app: status.githubApp
970
+ })
971
+ ] }), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ButtonLink, {
972
+ variant: "outline",
973
+ children: /* @__PURE__ */ jsx(Link, {
974
+ to: "/hosting/connect",
975
+ children: "Connect…"
976
+ })
977
+ }) })]
978
+ }),
979
+ /* @__PURE__ */ jsx(Region, {
980
+ title: "2. Choose where it goes",
981
+ children: progress.infra !== null ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("p", {
982
+ className: "text-muted-foreground",
983
+ children: [/* @__PURE__ */ jsx("code", { children: "resources/sanoma/infra.ts" }), " declares the repository, its deploy key, the database and the host:"]
984
+ }), /* @__PURE__ */ jsx("pre", {
985
+ className: "overflow-x-auto rounded-lg border p-3 text-xs",
986
+ children: progress.infra
987
+ })] }) : github ? /* @__PURE__ */ jsx(ChooseForm, {}) : /* @__PURE__ */ jsx("p", {
988
+ className: "text-muted-foreground",
989
+ children: "Connect GitHub first."
990
+ })
991
+ }),
992
+ /* @__PURE__ */ jsx(Region, {
993
+ title: "3. Create the repository, its deploy key and the database",
994
+ children: data ? /* @__PURE__ */ jsx("p", { children: "The repository, its deploy key and the database are made, and bound in the lockfile." }) : run && progress.infra !== null ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RunStatus, { run }), isEnded(run.status) && /* @__PURE__ */ jsx(ApplyAgain, { only: progress.beforeHost })] }) : /* @__PURE__ */ jsx("p", {
995
+ className: "text-muted-foreground",
996
+ children: "Apply creates them once the file is written."
997
+ })
998
+ }),
999
+ /* @__PURE__ */ jsx(Region, {
1000
+ title: "4. Push and start the host",
1001
+ children: !data ? /* @__PURE__ */ jsx("p", {
1002
+ className: "text-muted-foreground",
1003
+ children: "Once the repository is made, this repository is pushed to it."
1004
+ }) : progress.host ? /* @__PURE__ */ jsx(HostAnswer, {
1005
+ host: progress.host,
1006
+ you: status.signIn.you
1007
+ }) : hostRun ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RunStatus, { run }), isEnded(run.status) && /* @__PURE__ */ jsx(PushButton, {})] }) : /* @__PURE__ */ jsx(PushButton, {})
1008
+ })
1009
+ ] });
1010
+ }
1011
+ /** The choices, and the button that writes `infra.ts` and starts apply on the repository and the database. */
1012
+ function ChooseForm() {
1013
+ const { data: choices, isPending } = useQuery(goLiveChoicesQuery());
1014
+ if (isPending || !choices) return /* @__PURE__ */ jsx(Spinner, {});
1015
+ return /* @__PURE__ */ jsx(ChooseFields, { choices });
1016
+ }
1017
+ function ChooseFields({ choices }) {
1018
+ const { database, host, organizations } = choices;
1019
+ const regions = database?.regions ?? null;
1020
+ const [form, setForm] = useState({
1021
+ owner: choices.owners[0]?.login ?? "",
1022
+ name: choices.name,
1023
+ ...organizations?.[0] && { organization: organizations[0].id },
1024
+ region: regions?.includes("us-east-1") ? "us-east-1" : regions?.[0] ?? "",
1025
+ ...database && { database: database.type },
1026
+ ...host && { host: host.type },
1027
+ port: 8080
1028
+ });
1029
+ const set = (field) => (e) => {
1030
+ const { value } = e.target;
1031
+ setForm({
1032
+ ...form,
1033
+ [field]: field === "port" ? Number(value) : field === "size" && !value ? void 0 : value
1034
+ });
1035
+ };
1036
+ const queryClient = useQueryClient();
1037
+ const mutation = useMutation({
1038
+ mutationFn: () => appApi.goLive(form),
1039
+ onSuccess: async () => {
1040
+ toast.success("Wrote infra.ts and started apply");
1041
+ await queryClient.invalidateQueries({ queryKey: RUNS_KEY });
1042
+ }
1043
+ });
1044
+ const body = errorBodyOf(mutation.error);
1045
+ const issue = (field) => body?.issues?.find((i) => i.path[0] === field)?.message;
1046
+ const error = mutation.error && !body?.issues?.length ? body?.error ?? mutation.error.message : void 0;
1047
+ return /* @__PURE__ */ jsxs("form", {
1048
+ className: "flex max-w-xl flex-col gap-4",
1049
+ onSubmit: (e) => {
1050
+ e.preventDefault();
1051
+ mutation.mutate();
1052
+ },
1053
+ children: [
1054
+ choices.missing.length > 0 && /* @__PURE__ */ jsxs(Notice, {
1055
+ variant: "destructive",
1056
+ children: [
1057
+ "The config's connectors declare no ",
1058
+ choices.missing.join(", "),
1059
+ ": add their connectors to",
1060
+ " ",
1061
+ /* @__PURE__ */ jsx("code", { children: "sanoma.config.ts" }),
1062
+ "."
1063
+ ]
1064
+ }),
1065
+ choices.connect.length > 0 && /* @__PURE__ */ jsxs(Notice, {
1066
+ variant: "destructive",
1067
+ children: [
1068
+ "Connect ",
1069
+ choices.connect.join(" and "),
1070
+ " first: going live makes what this page shows with",
1071
+ " ",
1072
+ choices.connect.length > 1 ? "them" : "it",
1073
+ "."
1074
+ ]
1075
+ }),
1076
+ choices.errors.map((e) => /* @__PURE__ */ jsx(Notice, {
1077
+ variant: "destructive",
1078
+ children: e
1079
+ }, e)),
1080
+ /* @__PURE__ */ jsxs(FieldGroup, { children: [
1081
+ /* @__PURE__ */ jsxs(Field, {
1082
+ "data-invalid": issue("owner") ? true : void 0,
1083
+ children: [
1084
+ /* @__PURE__ */ jsx(FieldLabel, {
1085
+ htmlFor: "go-live-owner",
1086
+ children: "GitHub account"
1087
+ }),
1088
+ /* @__PURE__ */ jsx(NativeSelect, {
1089
+ id: "go-live-owner",
1090
+ value: form.owner,
1091
+ onChange: set("owner"),
1092
+ children: choices.owners.map((o) => /* @__PURE__ */ jsxs(NativeSelectOption, {
1093
+ value: o.login,
1094
+ children: [
1095
+ o.login,
1096
+ " (",
1097
+ o.kind,
1098
+ o.via === "app" ? ", through the App" : "",
1099
+ ")"
1100
+ ]
1101
+ }, o.login))
1102
+ }),
1103
+ /* @__PURE__ */ jsx(FieldDescription, { children: "The new private repository is made here." }),
1104
+ /* @__PURE__ */ jsx(FieldError, { children: issue("owner") })
1105
+ ]
1106
+ }),
1107
+ /* @__PURE__ */ jsxs(Field, {
1108
+ "data-invalid": issue("name") ? true : void 0,
1109
+ children: [
1110
+ /* @__PURE__ */ jsx(FieldLabel, {
1111
+ htmlFor: "go-live-name",
1112
+ children: "Name"
1113
+ }),
1114
+ /* @__PURE__ */ jsx(Input, {
1115
+ id: "go-live-name",
1116
+ value: form.name,
1117
+ onChange: set("name"),
1118
+ autoComplete: "off"
1119
+ }),
1120
+ /* @__PURE__ */ jsx(FieldDescription, { children: "The repository's, the database's and the host's." }),
1121
+ /* @__PURE__ */ jsx(FieldError, { children: issue("name") })
1122
+ ]
1123
+ }),
1124
+ /* @__PURE__ */ jsxs(Field, { children: [
1125
+ /* @__PURE__ */ jsx(FieldLabel, { children: "Database" }),
1126
+ /* @__PURE__ */ jsx("span", { children: database?.title ?? "None" }),
1127
+ /* @__PURE__ */ jsx(FieldDescription, { children: "The company's records, its runs and its ledger are kept here." })
1128
+ ] }),
1129
+ organizations && /* @__PURE__ */ jsxs(Field, {
1130
+ "data-invalid": issue("organization") ? true : void 0,
1131
+ children: [
1132
+ /* @__PURE__ */ jsx(FieldLabel, {
1133
+ htmlFor: "go-live-organization",
1134
+ children: "Supabase organization"
1135
+ }),
1136
+ /* @__PURE__ */ jsx(NativeSelect, {
1137
+ id: "go-live-organization",
1138
+ value: form.organization ?? "",
1139
+ onChange: set("organization"),
1140
+ children: organizations.map((o) => /* @__PURE__ */ jsx(NativeSelectOption, {
1141
+ value: o.id,
1142
+ children: o.name
1143
+ }, o.id))
1144
+ }),
1145
+ /* @__PURE__ */ jsx(FieldError, { children: issue("organization") })
1146
+ ]
1147
+ }),
1148
+ /* @__PURE__ */ jsxs(Field, {
1149
+ "data-invalid": issue("region") ? true : void 0,
1150
+ children: [
1151
+ /* @__PURE__ */ jsx(FieldLabel, {
1152
+ htmlFor: "go-live-region",
1153
+ children: "Region"
1154
+ }),
1155
+ regions ? /* @__PURE__ */ jsx(NativeSelect, {
1156
+ id: "go-live-region",
1157
+ value: form.region,
1158
+ onChange: set("region"),
1159
+ children: regions.map((r) => /* @__PURE__ */ jsx(NativeSelectOption, {
1160
+ value: r,
1161
+ children: r
1162
+ }, r))
1163
+ }) : /* @__PURE__ */ jsx(Input, {
1164
+ id: "go-live-region",
1165
+ value: form.region,
1166
+ onChange: set("region"),
1167
+ autoComplete: "off"
1168
+ }),
1169
+ /* @__PURE__ */ jsx(FieldError, { children: issue("region") })
1170
+ ]
1171
+ }),
1172
+ database?.size && /* @__PURE__ */ jsxs(Field, {
1173
+ "data-invalid": issue("size") ? true : void 0,
1174
+ children: [
1175
+ /* @__PURE__ */ jsx(FieldLabel, {
1176
+ htmlFor: "go-live-size",
1177
+ children: "Size"
1178
+ }),
1179
+ /* @__PURE__ */ jsx(Input, {
1180
+ id: "go-live-size",
1181
+ value: form.size ?? "",
1182
+ onChange: set("size"),
1183
+ autoComplete: "off"
1184
+ }),
1185
+ /* @__PURE__ */ jsxs(FieldDescription, { children: [
1186
+ "The database's compute size, as ",
1187
+ database.title,
1188
+ " names it; empty for its default."
1189
+ ] }),
1190
+ /* @__PURE__ */ jsx(FieldError, { children: issue("size") })
1191
+ ]
1192
+ }),
1193
+ /* @__PURE__ */ jsxs(Field, {
1194
+ "data-invalid": issue("port") ? true : void 0,
1195
+ children: [
1196
+ /* @__PURE__ */ jsx(FieldLabel, {
1197
+ htmlFor: "go-live-port",
1198
+ children: "Host"
1199
+ }),
1200
+ /* @__PURE__ */ jsxs("div", {
1201
+ className: "flex items-center gap-2",
1202
+ children: [/* @__PURE__ */ jsxs("span", { children: [
1203
+ host?.title ?? "None",
1204
+ host && !host.publicUrl ? " on this machine" : "",
1205
+ ", port"
1206
+ ] }), /* @__PURE__ */ jsx(Input, {
1207
+ id: "go-live-port",
1208
+ className: "w-24",
1209
+ type: "number",
1210
+ value: form.port,
1211
+ onChange: set("port"),
1212
+ "aria-invalid": issue("port") ? true : void 0
1213
+ })]
1214
+ }),
1215
+ /* @__PURE__ */ jsxs(FieldDescription, { children: [
1216
+ "It runs this company from the repository's ",
1217
+ /* @__PURE__ */ jsx("code", { children: "main" }),
1218
+ host && !host.publicUrl ? /* @__PURE__ */ jsxs(Fragment$1, { children: [", answering at ", /* @__PURE__ */ jsxs("code", { children: ["http://127.0.0.1:", form.port] })] }) : ", listening on this port",
1219
+ "."
1220
+ ] }),
1221
+ /* @__PURE__ */ jsx(FieldError, { children: issue("port") })
1222
+ ]
1223
+ })
1224
+ ] }),
1225
+ error && /* @__PURE__ */ jsx(Notice, {
1226
+ variant: "destructive",
1227
+ children: error
1228
+ }),
1229
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Button, {
1230
+ type: "submit",
1231
+ disabled: mutation.isPending || choices.missing.length > 0 || choices.connect.length > 0,
1232
+ children: [mutation.isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : /* @__PURE__ */ jsx(RocketIcon, {
1233
+ "aria-hidden": "true",
1234
+ "data-icon": "inline-start"
1235
+ }), "Write infra.ts and apply"]
1236
+ }) })
1237
+ ]
1238
+ });
1239
+ }
1240
+ /** An apply run as going live follows it: what it waits on (with its plan), what failed, or its status. */
1241
+ function RunStatus({ run }) {
1242
+ const failed = run.results?.filter((r) => r.status === "failed") ?? [];
1243
+ return /* @__PURE__ */ jsxs("div", {
1244
+ className: "flex flex-col gap-3",
1245
+ children: [
1246
+ /* @__PURE__ */ jsxs("p", {
1247
+ className: "flex flex-wrap items-center gap-2",
1248
+ children: [
1249
+ "Apply is ",
1250
+ /* @__PURE__ */ jsx(ToneBadge, {
1251
+ tone: failed.length ? "bad" : RUN_TONE[run.status],
1252
+ children: run.status
1253
+ }),
1254
+ /* @__PURE__ */ jsx(Link, {
1255
+ ...runLink({
1256
+ runId: run.runId,
1257
+ workflow: "apply"
1258
+ }),
1259
+ children: "Open the run"
1260
+ })
1261
+ ]
1262
+ }),
1263
+ run.pending && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Notice, { children: [
1264
+ "It waits for a person to approve these changes in the",
1265
+ " ",
1266
+ /* @__PURE__ */ jsx(Link, {
1267
+ to: "/inbox",
1268
+ search: { approval: run.pending.approvalId },
1269
+ children: "Inbox"
1270
+ }),
1271
+ "."
1272
+ ] }), run.pending.plan && /* @__PURE__ */ jsx(ApplyPlanView, { plan: run.pending.plan })] }),
1273
+ run.error && /* @__PURE__ */ jsx(Notice, {
1274
+ variant: "destructive",
1275
+ children: run.error
1276
+ }),
1277
+ failed.map((r) => /* @__PURE__ */ jsxs(Notice, {
1278
+ variant: "destructive",
1279
+ children: [
1280
+ r.id,
1281
+ ": ",
1282
+ r.error
1283
+ ]
1284
+ }, r.id))
1285
+ ]
1286
+ });
1287
+ }
1288
+ /** Starts apply again on what the first apply makes (`only`), as Hosting's Apply would on those. */
1289
+ function ApplyAgain({ only }) {
1290
+ const start = useStartRun();
1291
+ return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Button, {
1292
+ variant: "outline",
1293
+ onClick: () => start.mutate({
1294
+ workflow: APPLY_WORKFLOW,
1295
+ input: { only }
1296
+ }),
1297
+ disabled: start.isPending,
1298
+ children: [start.isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : /* @__PURE__ */ jsx(PlayIcon, {
1299
+ "aria-hidden": "true",
1300
+ "data-icon": "inline-start"
1301
+ }), "Apply again"]
1302
+ }) });
1303
+ }
1304
+ /** Pushes this repository to the new one, then starts apply on the host. */
1305
+ function PushButton() {
1306
+ const queryClient = useQueryClient();
1307
+ const mutation = useMutation({
1308
+ mutationFn: () => appApi.goLiveHost({}),
1309
+ onSuccess: async () => {
1310
+ toast.success("Pushed, and started apply on the host");
1311
+ await queryClient.invalidateQueries({ queryKey: RUNS_KEY });
1312
+ },
1313
+ onError: (err) => toast.error(errorBodyOf(err)?.error ?? err.message)
1314
+ });
1315
+ return /* @__PURE__ */ jsxs("div", {
1316
+ className: "flex flex-col gap-2",
1317
+ children: [/* @__PURE__ */ jsxs("p", {
1318
+ className: "text-muted-foreground",
1319
+ children: [
1320
+ "This repository's ",
1321
+ /* @__PURE__ */ jsx("code", { children: "main" }),
1322
+ ", with ",
1323
+ /* @__PURE__ */ jsx("code", { children: "infra.ts" }),
1324
+ " and the lockfile, goes to the new repository; the host then runs it."
1325
+ ]
1326
+ }), /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Button, {
1327
+ onClick: () => mutation.mutate(),
1328
+ disabled: mutation.isPending,
1329
+ children: [mutation.isPending ? /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }) : /* @__PURE__ */ jsx(UploadIcon, {
1330
+ "aria-hidden": "true",
1331
+ "data-icon": "inline-start"
1332
+ }), "Push and start the host"]
1333
+ }) })]
1334
+ });
1335
+ }
1336
+ /**
1337
+ * How people will sign in on the host, a line a way: you, by the invite going live mints once the
1338
+ * host answers (when your email is declared); an email code through the config's sender; GitHub
1339
+ * through the App. Without a connected sender, a warning that does not block going live, and the
1340
+ * ways to fix it; invite links work whatever this says. With GitHub, the public sites whose
1341
+ * visitors can sign in with it too, and the callback URL each needs on the App; and, when the App
1342
+ * lacks the permission to read email addresses, where to add it.
1343
+ */
1344
+ function SignInItem({ signIn, app }) {
1345
+ const code = signIn.sender !== null && signIn.senderConnected;
1346
+ const vendor = senderVendorOf(signIn);
1347
+ const ready = code || signIn.github || signIn.you !== null;
1348
+ return /* @__PURE__ */ jsx(Item, {
1349
+ role: "listitem",
1350
+ variant: "outline",
1351
+ size: "xs",
1352
+ children: /* @__PURE__ */ jsxs(ItemContent, {
1353
+ className: "gap-2",
1354
+ children: [/* @__PURE__ */ jsxs(ItemHeading, { children: ["Sign-in", /* @__PURE__ */ jsx(ToneBadge, {
1355
+ tone: ready ? "ok" : "waiting",
1356
+ children: ready ? "ready" : "invite links only"
1357
+ })] }), /* @__PURE__ */ jsxs("ul", {
1358
+ className: "flex flex-col gap-1.5 text-xs",
1359
+ children: [
1360
+ /* @__PURE__ */ jsx(SignInLine, {
1361
+ ok: signIn.you !== null,
1362
+ children: signIn.you !== null ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
1363
+ className: "font-medium",
1364
+ children: "You"
1365
+ }), " · signed in from this machine when the host starts"] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
1366
+ className: "font-medium",
1367
+ children: "You"
1368
+ }), " · declare your email in the people file to be signed in on the host when it first answers"] })
1369
+ }),
1370
+ /* @__PURE__ */ jsx(SignInLine, {
1371
+ ok: code,
1372
+ children: /* @__PURE__ */ jsxs("span", {
1373
+ className: "flex flex-col gap-2",
1374
+ children: [/* @__PURE__ */ jsxs("span", {
1375
+ className: "flex flex-wrap items-center gap-2",
1376
+ children: [/* @__PURE__ */ jsxs("span", { children: [
1377
+ /* @__PURE__ */ jsx("span", {
1378
+ className: "font-medium",
1379
+ children: "Email code"
1380
+ }),
1381
+ " ·",
1382
+ " ",
1383
+ code ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("code", { children: vendor }), " connected"] }) : vendor ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("code", { children: vendor }), ", the sender, not connected yet"] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: ["no sender yet, name one in ", /* @__PURE__ */ jsx("code", { children: "sanoma.config.ts" })] })
1384
+ ] }), !code && /* @__PURE__ */ jsx(ToneBadge, {
1385
+ tone: "waiting",
1386
+ children: "warning · not blocking"
1387
+ })]
1388
+ }), !code && /* @__PURE__ */ jsx(SignInFixes, {
1389
+ vendor,
1390
+ github: signIn.github
1391
+ })]
1392
+ })
1393
+ }),
1394
+ signIn.github && /* @__PURE__ */ jsx(SignInLine, {
1395
+ ok: true,
1396
+ children: /* @__PURE__ */ jsxs("span", { children: [
1397
+ /* @__PURE__ */ jsx("span", {
1398
+ className: "font-medium",
1399
+ children: "GitHub"
1400
+ }),
1401
+ " · the company's App",
1402
+ app?.missing?.some((p) => p.startsWith("emails:")) && /* @__PURE__ */ jsxs("span", {
1403
+ className: "text-muted-foreground",
1404
+ children: [
1405
+ ". The App may not read email addresses, which Sign in with GitHub needs when someone's GitHub email is private: ",
1406
+ /* @__PURE__ */ jsx(Link, {
1407
+ to: "/hosting/connect",
1408
+ children: "Connect"
1409
+ }),
1410
+ " says what to add."
1411
+ ]
1412
+ }),
1413
+ signIn.sites.length > 0 && /* @__PURE__ */ jsxs("span", {
1414
+ className: "text-muted-foreground",
1415
+ children: [
1416
+ ". Visitors on ",
1417
+ signIn.sites.map((site) => siteDir(site.name)).join(", "),
1418
+ " can sign in with GitHub too, once the App lists",
1419
+ " ",
1420
+ /* @__PURE__ */ jsx("code", { children: [...new Set(signIn.sites.map((site) => `https://<site host>/auth/${site.login}/callback/github`))].join(", ") }),
1421
+ " ",
1422
+ "among its callback URLs, for each site's host."
1423
+ ]
1424
+ })
1425
+ ] })
1426
+ })
1427
+ ]
1428
+ })]
1429
+ })
1430
+ });
1431
+ }
1432
+ /** A line of the Sign-in item: a check when the way works, a warning when it does not yet. */
1433
+ function SignInLine({ ok, children }) {
1434
+ return /* @__PURE__ */ jsxs("li", {
1435
+ className: "flex items-start gap-2",
1436
+ children: [ok ? /* @__PURE__ */ jsx(CheckIcon, {
1437
+ "aria-hidden": "true",
1438
+ className: "mt-0.5 size-3.5 shrink-0 text-tone-ok-foreground"
1439
+ }) : /* @__PURE__ */ jsx(WarningIcon, {
1440
+ "aria-hidden": "true",
1441
+ className: "mt-0.5 size-3.5 shrink-0 text-tone-waiting-foreground"
1442
+ }), /* @__PURE__ */ jsx("span", {
1443
+ className: "min-w-0",
1444
+ children
1445
+ })]
1446
+ });
1447
+ }
1448
+ /** The sign-in sender's connector (`resend` of `resend.emails.send`), when the config names one. */
1449
+ var senderVendorOf = (signIn) => signIn.sender?.split(".")[0];
1450
+ /** Where a fix's email codes go, said under each. */
1451
+ var CODES_GO_TO = /* @__PURE__ */ jsxs("span", {
1452
+ className: "text-muted-foreground",
1453
+ children: [
1454
+ "Codes then go to the emails declared in ",
1455
+ /* @__PURE__ */ jsx("code", { children: "resources/people.ts" }),
1456
+ "."
1457
+ ]
1458
+ });
1459
+ /**
1460
+ * How to let people sign in themselves without an email code: name a sender (or connect the one
1461
+ * named, `vendor`), and, while the App is not there, connect it for Continue with GitHub.
1462
+ */
1463
+ function SignInFixes({ vendor, github }) {
1464
+ const steps = [vendor ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
1465
+ className: "font-medium",
1466
+ children: [
1467
+ "Connect ",
1468
+ /* @__PURE__ */ jsx("code", { children: vendor }),
1469
+ ", the sender, on ",
1470
+ /* @__PURE__ */ jsx(Link, {
1471
+ to: "/hosting/connect",
1472
+ children: "Hosting › Connect"
1473
+ })
1474
+ ]
1475
+ }), CODES_GO_TO] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
1476
+ /* @__PURE__ */ jsxs("span", {
1477
+ className: "font-medium",
1478
+ children: ["Name a sender in ", /* @__PURE__ */ jsx("code", { children: "sanoma.config.ts" })]
1479
+ }),
1480
+ /* @__PURE__ */ jsx("code", {
1481
+ className: "block overflow-x-auto rounded-md border bg-muted px-2 py-1.5 whitespace-pre",
1482
+ children: "login: { sender: resend.emails.send, from: \"Acme <login@acme.example>\" }"
1483
+ }),
1484
+ CODES_GO_TO
1485
+ ] }), !github && /* @__PURE__ */ jsxs("span", { children: [
1486
+ "Or connect the GitHub App on ",
1487
+ /* @__PURE__ */ jsx(Link, {
1488
+ to: "/hosting/connect",
1489
+ children: "Hosting › Connect"
1490
+ }),
1491
+ ": people declared with a GitHub login can use Continue with GitHub."
1492
+ ] })].filter(Boolean);
1493
+ return /* @__PURE__ */ jsxs("section", {
1494
+ "aria-label": "Ways to fix it",
1495
+ className: "flex flex-col gap-2 rounded-lg border bg-muted/50 p-2",
1496
+ children: [/* @__PURE__ */ jsx("h3", {
1497
+ className: "font-medium",
1498
+ children: steps.length > 1 ? "Two ways to fix it" : "How to fix it"
1499
+ }), /* @__PURE__ */ jsx("ol", {
1500
+ className: "flex flex-col gap-2.5",
1501
+ children: steps.map((step, i) => /* @__PURE__ */ jsxs("li", {
1502
+ className: "flex items-start gap-2",
1503
+ children: [/* @__PURE__ */ jsx("span", {
1504
+ className: "flex size-4.5 shrink-0 items-center justify-center rounded-full bg-muted font-semibold",
1505
+ children: i + 1
1506
+ }), /* @__PURE__ */ jsx("span", {
1507
+ className: "flex min-w-0 flex-col gap-1",
1508
+ children: step
1509
+ })]
1510
+ }, i))
1511
+ })]
1512
+ });
1513
+ }
1514
+ /** Where the host answers, once it does: Open signs the person in there by an invite when their email is declared. */
1515
+ function HostAnswer({ host, you }) {
1516
+ const signIn = useServerFn(goLiveSignInFn);
1517
+ const mutation = useMutation({
1518
+ mutationFn: async (tab) => ({
1519
+ tab,
1520
+ ...await signIn()
1521
+ }),
1522
+ onSuccess: ({ tab, url }) => {
1523
+ if (tab) tab.location.href = url;
1524
+ else window.location.assign(url);
1525
+ },
1526
+ onError: (err, tab) => {
1527
+ tab?.close();
1528
+ toast.error(errorBodyOf(err)?.error ?? err.message);
1529
+ }
1530
+ });
1531
+ const open = () => {
1532
+ const tab = window.open("", "_blank");
1533
+ if (tab) tab.opener = null;
1534
+ mutation.mutate(tab);
1535
+ };
1536
+ return /* @__PURE__ */ jsx(ItemGroup, { children: /* @__PURE__ */ jsxs(Item, {
1537
+ role: "listitem",
1538
+ variant: "outline",
1539
+ size: "xs",
1540
+ children: [
1541
+ /* @__PURE__ */ jsxs(ItemContent, { children: [/* @__PURE__ */ jsxs(ItemHeading, { children: [host.healthy ? "Live" : "Starting", /* @__PURE__ */ jsx(ToneBadge, {
1542
+ tone: host.healthy ? "ok" : "off",
1543
+ children: host.healthy ? "healthy" : "not answering yet"
1544
+ })] }), /* @__PURE__ */ jsx(ItemDescription, { children: /* @__PURE__ */ jsx("code", { children: host.url }) })] }),
1545
+ host.healthy && you !== null && /* @__PURE__ */ jsx(ItemActions, { children: /* @__PURE__ */ jsxs(Button, {
1546
+ variant: "outline",
1547
+ size: "sm",
1548
+ onClick: open,
1549
+ disabled: mutation.isPending,
1550
+ children: [
1551
+ mutation.isPending && /* @__PURE__ */ jsx(Spinner, { "data-icon": "inline-start" }),
1552
+ "Open, signed in as ",
1553
+ you,
1554
+ /* @__PURE__ */ jsx(ArrowSquareOutIcon, {
1555
+ "aria-hidden": "true",
1556
+ "data-icon": "inline-end"
1557
+ })
1558
+ ]
1559
+ }) }),
1560
+ host.healthy && you === null && /* @__PURE__ */ jsx(ItemActions, { children: /* @__PURE__ */ jsx(ButtonLink, {
1561
+ variant: "outline",
1562
+ size: "sm",
1563
+ children: /* @__PURE__ */ jsxs("a", {
1564
+ href: host.url,
1565
+ target: "_blank",
1566
+ rel: "noreferrer",
1567
+ children: ["Open", /* @__PURE__ */ jsx(ArrowSquareOutIcon, {
1568
+ "aria-hidden": "true",
1569
+ "data-icon": "inline-end"
1570
+ })]
1571
+ })
1572
+ }) })
1573
+ ]
1574
+ }) });
1575
+ }
1576
+ // src/routes/hosting/index.tsx
1577
+ var $$splitComponentImporter$8 = () => import("./hosting-bbn9UvDc.js");
1578
+ var Route$18 = createFileRoute("/hosting/")({
1579
+ validateSearch: HostingSearch,
1580
+ loader: async ({ context: { queryClient } }) => {
1581
+ const config = await queryClient.query({
1582
+ ...configQuery(),
1583
+ staleTime: "static"
1584
+ });
1585
+ const drift = driftOf(config);
1586
+ await Promise.all([drift && loadLastCheck(queryClient, drift), slotsOf(config).goingLive && loadGoLive(queryClient)]);
1587
+ },
1588
+ component: lazyRouteComponent($$splitComponentImporter$8, "component")
1589
+ });
1590
+ /**
1591
+ * Which declared resource fills each slot: the first whose type meets its contract, the
1592
+ * repository being the one the host names (its `refs`) when the host names one. Whether the
1593
+ * company is declared live (a host or a database is), and whether going live's steps show: while
1594
+ * it is not, and while going live is between its first apply and its host's. Whether a Wakeup
1595
+ * starts the host again (`woken`).
1596
+ */
1597
+ /** The latest drift run, and the latest finished one's report, into the query client: for the loader. */
1598
+ async function loadLastCheck(queryClient, drift) {
1599
+ const [latest] = await queryClient.query({
1600
+ ...latestQuery(drift),
1601
+ staleTime: "static"
1602
+ });
1603
+ const [finished] = latest === void 0 || latest.status === "finished" ? [latest] : await queryClient.query({
1604
+ ...finishedQuery(drift),
1605
+ staleTime: "static"
1606
+ });
1607
+ if (finished) await queryClient.query({
1608
+ ...driftReportQuery(finished.runId),
1609
+ staleTime: "static"
1610
+ });
1611
+ }
1612
+ /**
1613
+ * The description's resources, as the app read the data files when it started, then any the
1614
+ * last check read that it does not have (a data file changed since), each with its result.
1615
+ */
1616
+ /** A problem, as text: where it is and what it says. */
1617
+ /** The description's problems, then any other the last check found. */
1618
+ /**
1619
+ * Where the company runs, and the rest of what the data files declare at vendors: the repository,
1620
+ * database, host and wakeup on top, each with the latest drift check's verdict; then every other
1621
+ * resource (people are on People, collections on Data), the lockfile's orphans and what is wrong
1622
+ * in the files; and the declaration itself in its file. While no host and no database are
1623
+ * declared, or going live has bound the repository but not yet the host, going live's steps show first.
1624
+ */
1625
+ /** The fields a slot's card shows of what its resource declares: the plain values, at most this many. */
1626
+ /** A declared field's value as the card shows it, when it is a plain one. */
1627
+ /**
1628
+ * A slot's resource: its name (to its declaration), type, a few of its declared fields, its
1629
+ * binding, the latest check's verdict and the fields that differ; the host's with where the last
1630
+ * apply that made it says it answers, and its `lifetime`: always on, or stops when quiet, with
1631
+ * what starts it again, the Wakeup (`woken`: one naming this host is declared), or a notice that none does.
1632
+ */
1633
+ /**
1634
+ * Whether each key a vendor's connector takes is set (`credentialsQuery`, never a value), with its
1635
+ * connector's page, where it is set: what an agent box opens its boxes with.
1636
+ */
1637
+ /**
1638
+ * What apply gives a host that derives, read-only: its runtime image, the repository and branch
1639
+ * it runs, the public sites' domains it attaches, and whether each key it is given is stored, and
1640
+ * since when. Nothing for a host that does not derive: its data file says all of it.
1641
+ */
1642
+ /**
1643
+ * Where the host answers, from the last apply that made or changed it (going live's progress),
1644
+ * once it does; and the hostname it declares, beside it until an apply serves the app there.
1645
+ */
1646
+ /** When the resources were last checked, by which run, what it found, and a check under way. */
1647
+ /** Starts the drift workflow, as any workflow starts, on the data files as they are now. */
1648
+ /**
1649
+ * Starts the apply workflow on every declared resource: its plan waits for a person in the Inbox
1650
+ * wherever the policy holds a change. The config registers apply beside drift, so it is here too.
1651
+ */
1652
+ /** A declaration, by its id unless `children` name it, linking to it shown in its data file below the tables. */
1653
+ /** A resource's row, and under it the fields that differ, or why it could not be read. */
1654
+ /**
1655
+ * The lockfile's bindings that no data file declares: apply asks of each whether to forget it or
1656
+ * delete its object at the vendor.
1657
+ */
1658
+ /** The latest check's verdict on a resource; "not checked" when it was not in that check. */
1659
+ /**
1660
+ * A declaration's export in its data file, marked as its text gives it (`exportSpan`): a
1661
+ * resource's or a collection's. A resource's (`editable`) has Edit, which opens its form above the
1662
+ * file (`?edit`): its literal fields, saved into the file as a change, or committed without a remote.
1663
+ */
1664
+ // src/routes/hosting/connect.tsx
1665
+ var $$splitComponentImporter$7 = () => import("./connect-BpPiu5s6.js");
1666
+ var Route$17 = createFileRoute("/hosting/connect")({
1667
+ validateSearch: ConnectSearch,
1668
+ staticData: { crumb: "Connect" },
1669
+ head: ({ match }) => pageTitle(match.staticData.crumb),
1670
+ loader: ({ context: { queryClient } }) => queryClient.query({
1671
+ ...setupStatusQuery(),
1672
+ staleTime: "static"
1673
+ }),
1674
+ component: lazyRouteComponent($$splitComponentImporter$7, "component")
1675
+ });
1676
+ /** What the callback came back with, said on the page. */
1677
+ /** The pasted tokens' rows store through the setup function, which takes these names only; nothing clears them here. */
1678
+ /**
1679
+ * Going live, step 1: the GitHub App (or a token of your own), and the tokens of each vendor the
1680
+ * config declares (Supabase, Neon, Cloudflare, a wakeup service: `SETUP_VENDORS`), and what is
1681
+ * connected; for a control plane, its identity enrollment writer.
1682
+ */
1683
+ /**
1684
+ * The company's GitHub App: its slug and Install once created; until then, a form that creates it
1685
+ * on GitHub from the app's manifest, in a personal account or an organization.
1686
+ */
1687
+ // src/routes/hosting/existing.tsx
1688
+ var $$splitComponentImporter$6 = () => import("./existing-B4d4NrC8.js");
1689
+ var Route$16 = createFileRoute("/hosting/existing")({
1690
+ staticData: { crumb: "Connect an existing repository or database" },
1691
+ head: ({ match }) => pageTitle(match.staticData.crumb),
1692
+ component: lazyRouteComponent($$splitComponentImporter$6, "component")
1693
+ });
1694
+ /**
1695
+ * Going live with what the company has already: a GitHub repository and/or a Supabase project,
1696
+ * read, declared in `resources/sanoma/infra.ts` and bound by an apply that creates nothing.
1697
+ */
1698
+ // src/routes/runs/index.tsx
1699
+ var Route$15 = createFileRoute("/runs/")({ beforeLoad: () => {
1700
+ throw redirect({
1701
+ to: "/workflows",
1702
+ search: { view: "runs" }
1703
+ });
1704
+ } });
1705
+ // src/routes/runs/$id.tsx
1706
+ var $$splitNotFoundComponentImporter$2 = () => import("./_id-wuJIq2ZZ.js");
1707
+ var Route$14 = createFileRoute("/runs/$id")({
1708
+ beforeLoad: async ({ context: { queryClient }, params }) => {
1709
+ const { run } = await queryClient.query({
1710
+ ...runQuery(params.id),
1711
+ staleTime: "static"
1712
+ });
1713
+ throw redirect(runLink(run));
1714
+ },
1715
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$2, "notFoundComponent")
1716
+ });
1717
+ // src/routes/setup/index.tsx
1718
+ /** `/setup`, the Go live page: going live is Hosting's state while nothing is declared to run on. */
1719
+ var Route$13 = createFileRoute("/setup/")({ beforeLoad: () => {
1720
+ throw redirect({ to: "/hosting" });
1721
+ } });
1722
+ // src/routes/setup/connect.tsx
1723
+ /** `/setup/connect`: redirects to its page under Hosting, with how creating the GitHub App went. */
1724
+ var Route$12 = createFileRoute("/setup/connect")({
1725
+ validateSearch: ConnectSearch,
1726
+ beforeLoad: ({ search }) => {
1727
+ throw redirect({
1728
+ to: "/hosting/connect",
1729
+ search
1730
+ });
1731
+ }
1732
+ });
1733
+ // src/routes/setup/existing.tsx
1734
+ /** `/setup/existing`: redirects to its page under Hosting. */
1735
+ var Route$11 = createFileRoute("/setup/existing")({ beforeLoad: () => {
1736
+ throw redirect({ to: "/hosting/existing" });
1737
+ } });
1738
+ // src/routes/sites.index.tsx
1739
+ var $$splitComponentImporter$5 = () => import("./sites.index-1l0BtgVf.js");
1740
+ var Route$10 = createFileRoute("/sites/")({
1741
+ staticData: { crumb: "Sites" },
1742
+ head: ({ match }) => pageTitle(match.staticData.crumb),
1743
+ component: lazyRouteComponent($$splitComponentImporter$5, "component")
1744
+ });
1745
+ /** The config's public sites, by name. */
1746
+ /**
1747
+ * The company's sites, with how many, as a table in one card: each site under its icon, title,
1748
+ * its app (a badge) and folder, its pages (those with no path parameter, its home first), a public site's own
1749
+ * address, where visitors see it at the root of its host, and its languages.
1750
+ */
1751
+ /**
1752
+ * A public site's own address and its sitemap, each in a new tab; its domain alone while the server
1753
+ * renders (`usePublicAddress`).
1754
+ */
1755
+ /**
1756
+ * A public site's languages (`defineSite({ locales })`), its default first and so marked, each the
1757
+ * prefix its pages answer under but the default's; one, unsaid, for a site that names none.
1758
+ */
1759
+ // src/routes/workflows/index.tsx?tsr-shared=1
1760
+ /** The overview's filters (`?filter=`): every workflow, those waiting on you, those whose last run failed, the built-in. */
1761
+ var WORKFLOW_FILTERS = [
1762
+ "all",
1763
+ "waiting",
1764
+ "failed",
1765
+ "builtin"
1766
+ ];
1767
+ /**
1768
+ * `?view=runs` shows every run as a table, `?status=` and `?workflow=` (a workflow's name, as its
1769
+ * page links here) filtering it; anything else, a row per workflow, `?filter=` picking them and
1770
+ * `?app=` the folder they are in.
1771
+ */
1772
+ var HomeSearch = z.object({
1773
+ ...AppSearch.shape,
1774
+ view: z.literal("runs").optional().catch(void 0),
1775
+ status: z.enum(RUN_STATUSES).optional().catch(void 0),
1776
+ workflow: z.string().optional().catch(void 0),
1777
+ filter: z.enum(WORKFLOW_FILTERS).optional().catch(void 0)
1778
+ });
1779
+ /**
1780
+ * The All runs table's runs: the latest of every workflow or of one, or the latest with a status.
1781
+ * Polled as a workflow's runs are.
1782
+ */
1783
+ var allRunsQuery = (status, workflow) => queryOptions({
1784
+ ...runsQuery({
1785
+ status,
1786
+ workflow,
1787
+ limit: RUNS_LIMIT.default
1788
+ }),
1789
+ refetchInterval: runsRefetchInterval(POLL_MS)
1790
+ });
1791
+ // src/routes/workflows/index.tsx
1792
+ var $$splitComponentImporter$4 = () => import("./workflows-C0kJoGf1.js");
1793
+ /**
1794
+ * `?view=runs` shows every run as a table, `?status=` and `?workflow=` (a workflow's name, as its
1795
+ * page links here) filtering it; anything else, a row per workflow, `?filter=` picking them and
1796
+ * `?app=` the folder they are in.
1797
+ */
1798
+ var Route$9 = createFileRoute("/workflows/")({
1799
+ validateSearch: HomeSearch,
1800
+ loaderDeps: ({ search: { view, status, workflow } }) => ({
1801
+ view,
1802
+ status,
1803
+ workflow
1804
+ }),
1805
+ loader: async ({ context: { queryClient }, deps }) => {
1806
+ await Promise.all([
1807
+ queryClient.query({
1808
+ ...waitingRunsQuery(),
1809
+ staleTime: "static"
1810
+ }),
1811
+ queryClient.query({
1812
+ ...lastRunsQuery(),
1813
+ staleTime: "static"
1814
+ }),
1815
+ deps.view === "runs" && queryClient.query({
1816
+ ...allRunsQuery(deps.status, deps.workflow),
1817
+ staleTime: "static"
1818
+ })
1819
+ ]);
1820
+ },
1821
+ staticData: { wide: true },
1822
+ component: lazyRouteComponent($$splitComponentImporter$4, "component")
1823
+ });
1824
+ /** A tab's link lit only while the URL lacks what its search leaves `undefined`. */
1825
+ /**
1826
+ * The overview: how many workflows, the config's version, New workflow; then the tabs, a filter
1827
+ * of the workflows each (`?filter=`, with how many it holds) and All runs (`?view=runs`); then
1828
+ * one card holding the tab's table.
1829
+ */
1830
+ /** Whether the workflow's title or name holds what was typed, whatever its case. */
1831
+ /**
1832
+ * The workflows the tabs pick as a table, in one card under a find box that filters them
1833
+ * by title or name, in the browser; under a heading per folder while more than one holds some.
1834
+ * Those whose runs wait on an approval you may decide come first, then the rest by their last run,
1835
+ * those never run last. A row: its title, how it starts,
1836
+ * the vendors it calls, its last run and how many approvals its runs wait on (yours among them).
1837
+ * The page reads each query in one pass and hands each row its share: a poll that changed one
1838
+ * row's run draws that row alone. `none` when the config has no workflows at all.
1839
+ */
1840
+ /**
1841
+ * A workflow's row, opening its page: `waiting` approvals its runs wait on, `yours` of them for
1842
+ * you, which a waiting pill beside its title says.
1843
+ */
1844
+ /** Every workflow's latest runs as a table in the page's card, filtered by `?status=` and `?workflow=`. */
1845
+ // src/routes/workflows/$name/route.tsx
1846
+ var $$splitNotFoundComponentImporter$1 = () => import("./route-CF_8jQYY.js");
1847
+ /**
1848
+ * Layout for a workflow's page and its runs' pages, with no component: loads the workflow, its
1849
+ * source and its scenarios, which the pages read from the query client, and names the
1850
+ * workflow's crumb.
1851
+ */
1852
+ var Route$8 = createFileRoute("/workflows/$name")({
1853
+ staticData: { wide: true },
1854
+ validateSearch: WorkflowSearch,
1855
+ loader: async ({ context: { queryClient }, params }) => {
1856
+ const [workflow] = await Promise.all([loadWorkflow(queryClient, params.name), queryClient.query({
1857
+ ...scenariosQuery(),
1858
+ staleTime: "static"
1859
+ })]);
1860
+ return { crumb: workflow?.title ?? params.name };
1861
+ },
1862
+ head: ({ loaderData, params }) => pageTitle(loaderData?.crumb ?? params.name),
1863
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter$1, "notFoundComponent")
1864
+ });
1865
+ /**
1866
+ * The config's workflow of this name, with its file's source loaded. None for a retired workflow,
1867
+ * one the config no longer has: its page stays while it has runs to show; without, not-found.
1868
+ */
1869
+ async function loadWorkflow(queryClient, name) {
1870
+ const config = await queryClient.query({
1871
+ ...configQuery(),
1872
+ staleTime: "static"
1873
+ });
1874
+ const workflow = workflowNamed(name)(config);
1875
+ if (!workflow) {
1876
+ if ((await queryClient.query({
1877
+ ...workflowRunsQuery(name),
1878
+ staleTime: "static"
1879
+ })).length === 0) throw notFound();
1880
+ return;
1881
+ }
1882
+ const file = workflowFile(workflow);
1883
+ if (file !== void 0) await queryClient.query({
1884
+ ...sourceQuery(file),
1885
+ staleTime: "static"
1886
+ });
1887
+ return workflow;
1888
+ }
1889
+ // src/routes/connect/$vendor/callback.ts
1890
+ /** Where an OAuth provider sends the person back after consent: the attempt received (server/connect.ts). */
1891
+ var Route$7 = createFileRoute("/connect/$vendor/callback")({ server: { handlers: { GET: ({ request, context, params }) => connectionCallback(context.app, request, params.vendor) } } });
1892
+ // src/routes/data/$name/index.tsx
1893
+ var $$splitComponentImporter$3 = () => import("./_name-D_-MhjNf.js");
1894
+ /** No records view yet: nothing staged to be told of. */
1895
+ var Route$6 = createFileRoute("/data/$name/")({
1896
+ validateSearch: DataSearch,
1897
+ staticData: { wide: true },
1898
+ loaderDeps: ({ search: { order, limit, key, where } }) => ({
1899
+ order,
1900
+ limit,
1901
+ key,
1902
+ where
1903
+ }),
1904
+ loader: async ({ context: { queryClient }, params, deps, location }) => {
1905
+ const config = await queryClient.query({
1906
+ ...configQuery(),
1907
+ staleTime: "static"
1908
+ });
1909
+ const collection = collectionNamed(params.name)(config);
1910
+ if (collection && true) {
1911
+ const { record } = location.search;
1912
+ await Promise.all([queryClient.prefetchQuery(recordsQuery(collection.name, listQueryOf(collection, deps))), record !== void 0 && queryClient.prefetchQuery(historyQuery(collection.name, record))]);
1913
+ }
1914
+ },
1915
+ component: lazyRouteComponent($$splitComponentImporter$3, "component")
1916
+ });
1917
+ /**
1918
+ * A collection: where it is declared, its records in a grid you edit in place, with Add record,
1919
+ * the record form beside it while a record is open (`?record=`, or `?new`; Space on a cell opens
1920
+ * its record), and the workflows that use it.
1921
+ */
1922
+ // src/routes/data/$name/import.tsx
1923
+ var $$splitComponentImporter$2 = () => import("./import-DIwvzHb6.js");
1924
+ /** The import's steps after Upload, in the search so Back and Forward move between them: `?step=match`, `?step=review`. */
1925
+ var ImportSearch = z.object({ step: z.enum(["match", "review"]).optional().catch(void 0) });
1926
+ var Route$5 = createFileRoute("/data/$name/import")({
1927
+ validateSearch: ImportSearch,
1928
+ staticData: {
1929
+ crumb: "Import",
1930
+ wide: true
1931
+ },
1932
+ head: ({ params }) => pageTitle(`Import into ${params.name}`),
1933
+ component: lazyRouteComponent($$splitComponentImporter$2, "component")
1934
+ });
1935
+ /**
1936
+ * A sheet imported into the collection, in three steps: Upload (a CSV file, its first rows),
1937
+ * Match columns (each column's field, the values to map, the rows the fields refuse) and Review
1938
+ * (what each row will do, read against the records there as you), whose Add n, update m starts a
1939
+ * run of the built-in `import` and opens it. The sheet is the page's: reloaded, it starts again.
1940
+ */
1941
+ // src/routes/setup/github/callback.ts
1942
+ /** Where GitHub sends the person back with the new App's code: its keys are stored (server/setup.ts). */
1943
+ var Route$4 = createFileRoute("/setup/github/callback")({ server: { handlers: { GET: ({ request, context }) => githubCallback(context.app, request) } } });
1944
+ // src/routes/setup/github/manifest.ts
1945
+ /** Creates the company's GitHub App: a page that posts the App's manifest to GitHub (server/setup.ts). */
1946
+ var Route$3 = createFileRoute("/setup/github/manifest")({ server: { handlers: { GET: ({ request, context }) => manifestPage(context, request) } } });
1947
+ // src/routes/workflows/$name/index.tsx
1948
+ var $$splitComponentImporter$1 = () => import("./_name-DntbHE-b.js");
1949
+ /**
1950
+ * A workflow's page: its header with New run, then its tabs, each a URL (`?view=`): the Graph
1951
+ * (marked with the scenario `?scenario=` names), with About, a selected node or New run (`?new`)
1952
+ * floating over it; its Runs, the one `?run=` names floating over them; its Code; and its
1953
+ * Scenarios, when it has any. The layout loads the workflow, its source and scenarios, and titles
1954
+ * the tab; this loads its runs (the Runs tab and its count) and the open run. A retired workflow
1955
+ * has only its Runs to show.
1956
+ */
1957
+ var Route$2 = createFileRoute("/workflows/$name/")({
1958
+ validateSearch: WorkflowPageSearch,
1959
+ loaderDeps: ({ search }) => ({
1960
+ runs: search.runs,
1961
+ run: search.view === "runs" ? search.run : void 0
1962
+ }),
1963
+ loader: async ({ context: { queryClient }, params, deps }) => {
1964
+ const open = deps.run === void 0 ? void 0 : queryClient.query({
1965
+ ...runQuery(deps.run),
1966
+ staleTime: "static"
1967
+ }).catch(() => void 0);
1968
+ await Promise.all([queryClient.query({
1969
+ ...workflowRunsQuery(params.name, deps.runs),
1970
+ staleTime: "static"
1971
+ }), open]);
1972
+ },
1973
+ component: lazyRouteComponent($$splitComponentImporter$1, "component")
1974
+ });
1975
+ /**
1976
+ * A tab's link: its view, keeping the rest of the search (the runs' filter, the scenario, New
1977
+ * run) but the run open on Runs, which no other tab shows.
1978
+ */
1979
+ /**
1980
+ * The Runs tab, with how many runs its filter keeps: on its own, so the runs' poll draws the tab
1981
+ * again and not the graph beside it.
1982
+ */
1983
+ // src/routes/workflows/$name/new.tsx
1984
+ var Route$1 = createFileRoute("/workflows/$name/new")({ beforeLoad: ({ params }) => {
1985
+ throw redirect({
1986
+ to: "/workflows/$name",
1987
+ params,
1988
+ search: (prev) => ({
1989
+ ...prev,
1990
+ new: true
1991
+ })
1992
+ });
1993
+ } });
1994
+ // src/routes/workflows/$name/runs/$id.tsx
1995
+ var $$splitNotFoundComponentImporter = () => import("./_id-Dt9tTylX.js");
1996
+ var $$splitComponentImporter = () => import("./_id-wB8khGTz.js");
1997
+ var Route = createFileRoute("/workflows/$name/runs/$id")({
1998
+ beforeLoad: async ({ context: { queryClient }, params }) => {
1999
+ const { run } = await queryClient.query({
2000
+ ...runQuery(params.id),
2001
+ staleTime: "static"
2002
+ });
2003
+ if (run.workflow !== params.name) throw redirect(runLink(run));
2004
+ },
2005
+ loader: ({ params }) => {
2006
+ return { crumb: runName(params.id) };
2007
+ },
2008
+ head: ({ params }) => pageTitle(runName(params.id)),
2009
+ component: lazyRouteComponent($$splitComponentImporter, "component"),
2010
+ notFoundComponent: lazyRouteComponent($$splitNotFoundComponentImporter, "notFoundComponent")
2011
+ });
2012
+ /**
2013
+ * One run of the workflow: under the workflow's crumbs, its name, status and who started it when,
2014
+ * New run (on the workflow's page; a change's run has Review, its page, instead: only sending a
2015
+ * draft for review starts one), then its `WorkflowView`: the banner of a waiting or failed
2016
+ * run, the graph with the run's facts and approvals floating over it, then Ledger and Code.
2017
+ */
2018
+ // src/routeTree.gen.ts
2019
+ var IndexRoute = Route$41.update({
2020
+ id: "/",
2021
+ path: "/",
2022
+ getParentRoute: () => Route$42
2023
+ });
2024
+ var AppsRouteRoute = Route$40.update({
2025
+ id: "/apps",
2026
+ path: "/apps",
2027
+ getParentRoute: () => Route$42
2028
+ });
2029
+ var ChangesRouteRoute = Route$39.update({
2030
+ id: "/changes",
2031
+ path: "/changes",
2032
+ getParentRoute: () => Route$42
2033
+ });
2034
+ var ConnectorsRouteRoute = Route$38.update({
2035
+ id: "/connectors",
2036
+ path: "/connectors",
2037
+ getParentRoute: () => Route$42
2038
+ });
2039
+ var DataRouteRoute = Route$37.update({
2040
+ id: "/data",
2041
+ path: "/data",
2042
+ getParentRoute: () => Route$42
2043
+ });
2044
+ var HostingRouteRoute = Route$36.update({
2045
+ id: "/hosting",
2046
+ path: "/hosting",
2047
+ getParentRoute: () => Route$42
2048
+ });
2049
+ var InboxRoute = Route$35.update({
2050
+ id: "/inbox",
2051
+ path: "/inbox",
2052
+ getParentRoute: () => Route$42
2053
+ });
2054
+ var PeopleRoute = Route$34.update({
2055
+ id: "/people",
2056
+ path: "/people",
2057
+ getParentRoute: () => Route$42
2058
+ });
2059
+ var PermissionsRoute = Route$33.update({
2060
+ id: "/permissions",
2061
+ path: "/permissions",
2062
+ getParentRoute: () => Route$42
2063
+ });
2064
+ var ResourcesRoute = Route$32.update({
2065
+ id: "/resources",
2066
+ path: "/resources",
2067
+ getParentRoute: () => Route$42
2068
+ });
2069
+ var StartRoute = Route$31.update({
2070
+ id: "/start",
2071
+ path: "/start",
2072
+ getParentRoute: () => Route$42
2073
+ });
2074
+ var WorkflowsRouteRoute = Route$30.update({
2075
+ id: "/workflows",
2076
+ path: "/workflows",
2077
+ getParentRoute: () => Route$42
2078
+ });
2079
+ var ApiCallRoute = Route$29.update({
2080
+ id: "/api/call",
2081
+ path: "/api/call",
2082
+ getParentRoute: () => Route$42
2083
+ });
2084
+ var ApiChatRoute = Route$28.update({
2085
+ id: "/api/chat",
2086
+ path: "/api/chat",
2087
+ getParentRoute: () => Route$42
2088
+ });
2089
+ var ApiSignInRoute = Route$27.update({
2090
+ id: "/api/sign-in",
2091
+ path: "/api/sign-in",
2092
+ getParentRoute: () => Route$42
2093
+ });
2094
+ var AppsIndexRoute = Route$26.update({
2095
+ id: "/",
2096
+ path: "/",
2097
+ getParentRoute: () => AppsRouteRoute
2098
+ });
2099
+ var AppsNameRoute = Route$25.update({
2100
+ id: "/$name",
2101
+ path: "/$name",
2102
+ getParentRoute: () => AppsRouteRoute
2103
+ });
2104
+ var ChangesIndexRoute = Route$24.update({
2105
+ id: "/",
2106
+ path: "/",
2107
+ getParentRoute: () => ChangesRouteRoute
2108
+ });
2109
+ var ChangesIdRoute = Route$23.update({
2110
+ id: "/$id",
2111
+ path: "/$id",
2112
+ getParentRoute: () => ChangesRouteRoute
2113
+ });
2114
+ var ConnectorsIndexRoute = Route$22.update({
2115
+ id: "/",
2116
+ path: "/",
2117
+ getParentRoute: () => ConnectorsRouteRoute
2118
+ });
2119
+ var ConnectorsVendorRoute = Route$21.update({
2120
+ id: "/$vendor",
2121
+ path: "/$vendor",
2122
+ getParentRoute: () => ConnectorsRouteRoute
2123
+ });
2124
+ var DataIndexRoute = Route$20.update({
2125
+ id: "/",
2126
+ path: "/",
2127
+ getParentRoute: () => DataRouteRoute
2128
+ });
2129
+ var DataNameRouteRoute = Route$19.update({
2130
+ id: "/$name",
2131
+ path: "/$name",
2132
+ getParentRoute: () => DataRouteRoute
2133
+ });
2134
+ var HostingIndexRoute = Route$18.update({
2135
+ id: "/",
2136
+ path: "/",
2137
+ getParentRoute: () => HostingRouteRoute
2138
+ });
2139
+ var HostingConnectRoute = Route$17.update({
2140
+ id: "/connect",
2141
+ path: "/connect",
2142
+ getParentRoute: () => HostingRouteRoute
2143
+ });
2144
+ var HostingExistingRoute = Route$16.update({
2145
+ id: "/existing",
2146
+ path: "/existing",
2147
+ getParentRoute: () => HostingRouteRoute
2148
+ });
2149
+ var RunsIndexRoute = Route$15.update({
2150
+ id: "/runs/",
2151
+ path: "/runs/",
2152
+ getParentRoute: () => Route$42
2153
+ });
2154
+ var RunsIdRoute = Route$14.update({
2155
+ id: "/runs/$id",
2156
+ path: "/runs/$id",
2157
+ getParentRoute: () => Route$42
2158
+ });
2159
+ var SetupIndexRoute = Route$13.update({
2160
+ id: "/setup/",
2161
+ path: "/setup/",
2162
+ getParentRoute: () => Route$42
2163
+ });
2164
+ var SetupConnectRoute = Route$12.update({
2165
+ id: "/setup/connect",
2166
+ path: "/setup/connect",
2167
+ getParentRoute: () => Route$42
2168
+ });
2169
+ var SetupExistingRoute = Route$11.update({
2170
+ id: "/setup/existing",
2171
+ path: "/setup/existing",
2172
+ getParentRoute: () => Route$42
2173
+ });
2174
+ var SitesIndexRoute = Route$10.update({
2175
+ id: "/sites/",
2176
+ path: "/sites/",
2177
+ getParentRoute: () => Route$42
2178
+ });
2179
+ var WorkflowsIndexRoute = Route$9.update({
2180
+ id: "/",
2181
+ path: "/",
2182
+ getParentRoute: () => WorkflowsRouteRoute
2183
+ });
2184
+ var WorkflowsNameRouteRoute = Route$8.update({
2185
+ id: "/$name",
2186
+ path: "/$name",
2187
+ getParentRoute: () => WorkflowsRouteRoute
2188
+ });
2189
+ var ConnectVendorCallbackRoute = Route$7.update({
2190
+ id: "/connect/$vendor/callback",
2191
+ path: "/connect/$vendor/callback",
2192
+ getParentRoute: () => Route$42
2193
+ });
2194
+ var DataNameIndexRoute = Route$6.update({
2195
+ id: "/",
2196
+ path: "/",
2197
+ getParentRoute: () => DataNameRouteRoute
2198
+ });
2199
+ var DataNameImportRoute = Route$5.update({
2200
+ id: "/import",
2201
+ path: "/import",
2202
+ getParentRoute: () => DataNameRouteRoute
2203
+ });
2204
+ var SetupGithubCallbackRoute = Route$4.update({
2205
+ id: "/setup/github/callback",
2206
+ path: "/setup/github/callback",
2207
+ getParentRoute: () => Route$42
2208
+ });
2209
+ var SetupGithubManifestRoute = Route$3.update({
2210
+ id: "/setup/github/manifest",
2211
+ path: "/setup/github/manifest",
2212
+ getParentRoute: () => Route$42
2213
+ });
2214
+ var WorkflowsNameIndexRoute = Route$2.update({
2215
+ id: "/",
2216
+ path: "/",
2217
+ getParentRoute: () => WorkflowsNameRouteRoute
2218
+ });
2219
+ var WorkflowsNameNewRoute = Route$1.update({
2220
+ id: "/new",
2221
+ path: "/new",
2222
+ getParentRoute: () => WorkflowsNameRouteRoute
2223
+ });
2224
+ var WorkflowsNameRunsIdRoute = Route.update({
2225
+ id: "/runs/$id",
2226
+ path: "/runs/$id",
2227
+ getParentRoute: () => WorkflowsNameRouteRoute
2228
+ });
2229
+ var AppsRouteRouteChildren = {
2230
+ AppsNameRoute,
2231
+ AppsIndexRoute
2232
+ };
2233
+ var AppsRouteRouteWithChildren = AppsRouteRoute._addFileChildren(AppsRouteRouteChildren);
2234
+ var ChangesRouteRouteChildren = {
2235
+ ChangesIdRoute,
2236
+ ChangesIndexRoute
2237
+ };
2238
+ var ChangesRouteRouteWithChildren = ChangesRouteRoute._addFileChildren(ChangesRouteRouteChildren);
2239
+ var ConnectorsRouteRouteChildren = {
2240
+ ConnectorsVendorRoute,
2241
+ ConnectorsIndexRoute
2242
+ };
2243
+ var ConnectorsRouteRouteWithChildren = ConnectorsRouteRoute._addFileChildren(ConnectorsRouteRouteChildren);
2244
+ var DataNameRouteRouteChildren = {
2245
+ DataNameImportRoute,
2246
+ DataNameIndexRoute
2247
+ };
2248
+ var DataRouteRouteChildren = {
2249
+ DataNameRouteRoute: DataNameRouteRoute._addFileChildren(DataNameRouteRouteChildren),
2250
+ DataIndexRoute
2251
+ };
2252
+ var DataRouteRouteWithChildren = DataRouteRoute._addFileChildren(DataRouteRouteChildren);
2253
+ var HostingRouteRouteChildren = {
2254
+ HostingConnectRoute,
2255
+ HostingExistingRoute,
2256
+ HostingIndexRoute
2257
+ };
2258
+ var HostingRouteRouteWithChildren = HostingRouteRoute._addFileChildren(HostingRouteRouteChildren);
2259
+ var WorkflowsNameRouteRouteChildren = {
2260
+ WorkflowsNameNewRoute,
2261
+ WorkflowsNameIndexRoute,
2262
+ WorkflowsNameRunsIdRoute
2263
+ };
2264
+ var WorkflowsRouteRouteChildren = {
2265
+ WorkflowsNameRouteRoute: WorkflowsNameRouteRoute._addFileChildren(WorkflowsNameRouteRouteChildren),
2266
+ WorkflowsIndexRoute
2267
+ };
2268
+ var rootRouteChildren = {
2269
+ IndexRoute,
2270
+ AppsRouteRoute: AppsRouteRouteWithChildren,
2271
+ ChangesRouteRoute: ChangesRouteRouteWithChildren,
2272
+ ConnectorsRouteRoute: ConnectorsRouteRouteWithChildren,
2273
+ DataRouteRoute: DataRouteRouteWithChildren,
2274
+ HostingRouteRoute: HostingRouteRouteWithChildren,
2275
+ WorkflowsRouteRoute: WorkflowsRouteRoute._addFileChildren(WorkflowsRouteRouteChildren),
2276
+ InboxRoute,
2277
+ PeopleRoute,
2278
+ PermissionsRoute,
2279
+ ResourcesRoute,
2280
+ StartRoute,
2281
+ ApiCallRoute,
2282
+ ApiChatRoute,
2283
+ ApiSignInRoute,
2284
+ RunsIdRoute,
2285
+ SetupConnectRoute,
2286
+ SetupExistingRoute,
2287
+ RunsIndexRoute,
2288
+ SetupIndexRoute,
2289
+ SitesIndexRoute,
2290
+ ConnectVendorCallbackRoute,
2291
+ SetupGithubCallbackRoute,
2292
+ SetupGithubManifestRoute
2293
+ };
2294
+ var routeTree = Route$42._addFileChildren(rootRouteChildren)._addFileTypes();
2295
+ // src/router.tsx
2296
+ var router_exports = /* @__PURE__ */ __exportAll({ getRouter: () => getRouter });
2297
+ /** `/…` on the site's host ↔ `/sites/<site>/…` in the route tree: the site's routes at the root of its host. */
2298
+ function siteRewrite(site) {
2299
+ return {
2300
+ input: ({ url }) => {
2301
+ url.pathname = `/sites/${site}${url.pathname}`;
2302
+ return url;
2303
+ },
2304
+ output: ({ url }) => {
2305
+ url.pathname = sitePath(site, url.pathname);
2306
+ return url;
2307
+ }
2308
+ };
2309
+ }
2310
+ /** A router per request on the server, one for the page's life in the browser. */
2311
+ function getRouter() {
2312
+ const queryClient = new QueryClient({ defaultOptions: { queries: { staleTime: 1e3 } } });
2313
+ const { site } = pageHost();
2314
+ const router = createRouter({
2315
+ routeTree,
2316
+ context: {
2317
+ queryClient,
2318
+ site
2319
+ },
2320
+ ...site && { rewrite: siteRewrite(site) },
2321
+ defaultPreload: "intent",
2322
+ defaultPreloadStaleTime: 0,
2323
+ scrollRestoration: true,
2324
+ defaultErrorComponent: site ? SiteError : RouteError,
2325
+ defaultNotFoundComponent: site ? SiteNotFound : NotFound,
2326
+ defaultPendingComponent: PagePending
2327
+ });
2328
+ setupRouterSsrQueryIntegration({
2329
+ router,
2330
+ queryClient
2331
+ });
2332
+ return router;
2333
+ }
2334
+ export { useDensity as A, Route$23 as C, Route$34 as D, Route$33 as E, CHAT_COOKIE as M, rememberPref as N, Route$35 as O, __exportAll as P, Route$22 as S, Route$25 as T, latestQuery as _, Route$6 as a, Route$20 as b, HomeSearch as c, Route$14 as d, Route$17 as f, finishedQuery as g, getRouter, driftOf as h, Route$5 as i, BESIDE_PAGE as j, DensityProvider as k, WORKFLOW_FILTERS as l, GoLive as m, Route as n, Route$8 as o, Route$18 as p, Route$2 as r, Route$9 as s, router_exports as t, allRunsQuery as u, slotsOf as v, Route$24 as w, Route$21 as x, Route$19 as y };