dineway 0.2.25 → 0.2.27

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 (414) hide show
  1. package/dist/{activity-Bm5x0dik.mjs → activity-DWlF3FUa.mjs} +2 -2
  2. package/dist/{activity-events-DpvhcjTP.mjs → activity-events-BYksOnTL.mjs} +1 -1
  3. package/dist/{adapters-DUVI3Mpc.d.mts → adapters-C-iHnQYy.d.mts} +8 -1
  4. package/dist/{allowed-origins-M5Rcl6XL.mjs → allowed-origins-DeknDs56.mjs} +1 -1
  5. package/dist/api/route-utils.d.mts +10 -10
  6. package/dist/api/route-utils.mjs +16 -15
  7. package/dist/api/schemas/index.d.mts +1 -1
  8. package/dist/api/schemas/index.mjs +5 -4
  9. package/dist/{api-Cod3v4JU.mjs → api-BTrQ7bjs.mjs} +21 -20
  10. package/dist/{api-tokens-BFgXg0l2.mjs → api-tokens-d43xs7C1.mjs} +1 -1
  11. package/dist/{apply-Hodkn7PL.mjs → apply-CS_138du.mjs} +22 -19
  12. package/dist/astro/index.d.mts +11 -11
  13. package/dist/astro/index.mjs +29 -7
  14. package/dist/astro/middleware/auth.d.mts +9 -9
  15. package/dist/astro/middleware/auth.mjs +6 -6
  16. package/dist/astro/middleware/redirect.mjs +5 -5
  17. package/dist/astro/middleware/request-context.mjs +3 -3
  18. package/dist/astro/middleware/seed.d.mts +1 -1
  19. package/dist/astro/middleware/seed.mjs +2 -2
  20. package/dist/astro/middleware/setup.mjs +1 -1
  21. package/dist/astro/middleware.mjs +203 -91
  22. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -6
  23. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -6
  24. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
  25. package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
  26. package/dist/astro/routes/api/admin/briefing.mjs +20 -19
  27. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
  28. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +10 -9
  29. package/dist/astro/routes/api/admin/byline-fields/index.mjs +10 -9
  30. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +10 -9
  31. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +17 -16
  32. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +17 -16
  33. package/dist/astro/routes/api/admin/bylines/index.mjs +17 -16
  34. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +14 -13
  35. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  36. package/dist/astro/routes/api/admin/comments/bulk.mjs +11 -10
  37. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  38. package/dist/astro/routes/api/admin/comments/index.mjs +11 -10
  39. package/dist/astro/routes/api/admin/context/_id_/history.mjs +28 -26
  40. package/dist/astro/routes/api/admin/context/_id_/index.mjs +28 -26
  41. package/dist/astro/routes/api/admin/context/_id_/review.mjs +33 -31
  42. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +33 -31
  43. package/dist/astro/routes/api/admin/context/diff.mjs +32 -30
  44. package/dist/astro/routes/api/admin/context/index.mjs +33 -31
  45. package/dist/astro/routes/api/admin/context/stale.mjs +32 -30
  46. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +28 -26
  47. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +32 -30
  48. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +32 -30
  49. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +29 -27
  50. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
  51. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  52. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  53. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +59 -57
  54. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +59 -57
  55. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +51 -49
  56. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +58 -56
  57. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +58 -56
  58. package/dist/astro/routes/api/admin/plugins/index.mjs +51 -49
  59. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
  60. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +51 -49
  61. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +58 -56
  62. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +51 -49
  63. package/dist/astro/routes/api/admin/plugins/updates.mjs +51 -49
  64. package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
  65. package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +33 -31
  66. package/dist/astro/routes/api/admin/review-requests/index.mjs +33 -31
  67. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +51 -49
  68. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
  69. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +51 -49
  70. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
  71. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
  72. package/dist/astro/routes/api/admin/users/_id_/index.mjs +8 -7
  73. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
  74. package/dist/astro/routes/api/admin/users/index.mjs +7 -6
  75. package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
  76. package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
  77. package/dist/astro/routes/api/auth/invite/complete.mjs +12 -11
  78. package/dist/astro/routes/api/auth/invite/index.mjs +9 -8
  79. package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -10
  80. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  81. package/dist/astro/routes/api/auth/magic-link/send.mjs +11 -10
  82. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  83. package/dist/astro/routes/api/auth/me.mjs +10 -9
  84. package/dist/astro/routes/api/auth/mode.mjs +1 -1
  85. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
  86. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  87. package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -6
  88. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
  89. package/dist/astro/routes/api/auth/passkey/options.mjs +13 -12
  90. package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -10
  91. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -11
  92. package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -11
  93. package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
  94. package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
  95. package/dist/astro/routes/api/auth/signup/complete.mjs +12 -11
  96. package/dist/astro/routes/api/auth/signup/request.mjs +11 -10
  97. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
  98. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +15 -14
  99. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +14 -13
  100. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
  101. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -6
  102. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -6
  103. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -6
  104. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +54 -15
  105. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +19 -18
  106. package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +9 -8
  107. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
  108. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
  109. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +19 -18
  110. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +16 -14
  111. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
  112. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
  113. package/dist/astro/routes/api/content/_collection_/_id_.mjs +12 -11
  114. package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
  115. package/dist/astro/routes/api/content/_collection_/index.mjs +12 -11
  116. package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -7
  117. package/dist/astro/routes/api/dashboard.mjs +9 -8
  118. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  119. package/dist/astro/routes/api/health.mjs +1 -1
  120. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  121. package/dist/astro/routes/api/import/probe.mjs +21 -20
  122. package/dist/astro/routes/api/import/wordpress/analyze.mjs +9 -8
  123. package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
  124. package/dist/astro/routes/api/import/wordpress/execute.mjs +38 -36
  125. package/dist/astro/routes/api/import/wordpress/media.d.mts +9 -9
  126. package/dist/astro/routes/api/import/wordpress/media.mjs +13 -12
  127. package/dist/astro/routes/api/import/wordpress/prepare.mjs +37 -35
  128. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +10 -10
  129. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +34 -32
  130. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  131. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +24 -23
  132. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +9 -9
  133. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +43 -41
  134. package/dist/astro/routes/api/integrations/_provider_.mjs +7 -7
  135. package/dist/astro/routes/api/integrations/index.mjs +6 -6
  136. package/dist/astro/routes/api/manifest.mjs +5 -5
  137. package/dist/astro/routes/api/mcp.mjs +70 -68
  138. package/dist/astro/routes/api/media/_id_/confirm.mjs +11 -10
  139. package/dist/astro/routes/api/media/_id_.mjs +9 -8
  140. package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
  141. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
  142. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
  143. package/dist/astro/routes/api/media/providers/index.mjs +2 -2
  144. package/dist/astro/routes/api/media/upload-url.mjs +12 -11
  145. package/dist/astro/routes/api/media.mjs +15 -14
  146. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +33 -31
  147. package/dist/astro/routes/api/menus/_name_/items.mjs +33 -31
  148. package/dist/astro/routes/api/menus/_name_/reorder.mjs +33 -31
  149. package/dist/astro/routes/api/menus/_name_/translations.mjs +33 -31
  150. package/dist/astro/routes/api/menus/_name_.mjs +33 -31
  151. package/dist/astro/routes/api/menus/index.mjs +33 -31
  152. package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
  153. package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
  154. package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
  155. package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
  156. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  157. package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
  158. package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
  159. package/dist/astro/routes/api/oauth/token.mjs +6 -6
  160. package/dist/astro/routes/api/openapi.json.mjs +5 -4
  161. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
  162. package/dist/astro/routes/api/redirects/404s/index.mjs +12 -11
  163. package/dist/astro/routes/api/redirects/404s/summary.mjs +12 -11
  164. package/dist/astro/routes/api/redirects/_id_.mjs +34 -32
  165. package/dist/astro/routes/api/redirects/index.mjs +34 -32
  166. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
  167. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
  168. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +53 -51
  169. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +53 -51
  170. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +53 -51
  171. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +53 -51
  172. package/dist/astro/routes/api/schema/collections/index.mjs +53 -51
  173. package/dist/astro/routes/api/schema/index.mjs +9 -8
  174. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +51 -49
  175. package/dist/astro/routes/api/schema/orphans/index.mjs +51 -49
  176. package/dist/astro/routes/api/search/enable.mjs +12 -11
  177. package/dist/astro/routes/api/search/index.mjs +11 -10
  178. package/dist/astro/routes/api/search/rebuild.mjs +12 -11
  179. package/dist/astro/routes/api/search/stats.mjs +6 -6
  180. package/dist/astro/routes/api/search/suggest.mjs +11 -10
  181. package/dist/astro/routes/api/sections/_slug_.mjs +33 -31
  182. package/dist/astro/routes/api/sections/index.mjs +33 -31
  183. package/dist/astro/routes/api/settings/email.mjs +4 -4
  184. package/dist/astro/routes/api/settings.mjs +33 -31
  185. package/dist/astro/routes/api/setup/admin-verify.mjs +14 -13
  186. package/dist/astro/routes/api/setup/admin.mjs +12 -11
  187. package/dist/astro/routes/api/setup/dev-bypass.mjs +28 -26
  188. package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
  189. package/dist/astro/routes/api/setup/index.mjs +30 -28
  190. package/dist/astro/routes/api/setup/status.mjs +3 -3
  191. package/dist/astro/routes/api/snapshot.mjs +7 -7
  192. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +36 -34
  193. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +36 -34
  194. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +36 -34
  195. package/dist/astro/routes/api/taxonomies/index.mjs +36 -34
  196. package/dist/astro/routes/api/themes/preview.mjs +5 -5
  197. package/dist/astro/routes/api/typegen.mjs +4 -4
  198. package/dist/astro/routes/api/well-known/auth.mjs +3 -3
  199. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
  200. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
  201. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +32 -30
  202. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +33 -31
  203. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +33 -31
  204. package/dist/astro/routes/api/widget-areas/_name_.mjs +30 -28
  205. package/dist/astro/routes/api/widget-areas/index.mjs +33 -31
  206. package/dist/astro/routes/api/widget-components.mjs +2 -2
  207. package/dist/astro/routes/robots.txt.mjs +7 -7
  208. package/dist/astro/routes/sitemap-_collection_.xml.mjs +14 -13
  209. package/dist/astro/routes/sitemap.xml.mjs +13 -12
  210. package/dist/astro/session-driver.d.mts +1 -1
  211. package/dist/astro/session-driver.mjs +2 -2
  212. package/dist/astro/types.d.mts +13 -12
  213. package/dist/{audit-nenmMR-2.mjs → audit-CmiNnrbj.mjs} +1 -1
  214. package/dist/auth/providers/github.d.mts +1 -1
  215. package/dist/auth/providers/google.d.mts +1 -1
  216. package/dist/{auth-control-guard-B7PdECn6.mjs → auth-control-guard-Bg93z3D6.mjs} +1 -1
  217. package/dist/{authorize-DTvHe9bm.mjs → authorize-Dg75h4BN.mjs} +1 -1
  218. package/dist/{briefing-PxagUoJJ.mjs → briefing-BoIXsh3Y.mjs} +1 -1
  219. package/dist/{briefing-CpU_z8qH.mjs → briefing-Cd2HhhHi.mjs} +7 -7
  220. package/dist/{bundle-dsO2-7eh.mjs → bundle-DicQY2p2.mjs} +2 -2
  221. package/dist/{byline-DEBDPF8R.mjs → byline-MGIfM2Is.mjs} +6 -6
  222. package/dist/{byline-fields-HoyRUnBy.d.mts → byline-fields-BJ5_tYj8.d.mts} +31 -7
  223. package/dist/{byline-fields-BQRx17y_.mjs → byline-fields-C4OeOttq.mjs} +3 -3
  224. package/dist/{byline-fields-DPi4Ri_5.mjs → byline-fields-GoUVaGw4.mjs} +1 -1
  225. package/dist/{byline-registry-BLgrU3dA.mjs → byline-registry-CF9nobxT.mjs} +2 -2
  226. package/dist/{bylines-YK6eGHvV.mjs → bylines-CL8Z6AxI.mjs} +5 -5
  227. package/dist/{bylines-C7hm1-iI.mjs → bylines-t_uHsP44.mjs} +3 -3
  228. package/dist/{cache-BuVpjvBc.mjs → cache-DrNKKDn0.mjs} +2 -2
  229. package/dist/{chunks-B-1_U3oF.mjs → chunks-Bw3_BuVW.mjs} +1 -1
  230. package/dist/cli/index.d.mts +1 -1
  231. package/dist/cli/index.mjs +399 -135
  232. package/dist/cli/plugin-kit.d.mts +9 -9
  233. package/dist/cli/plugin-kit.mjs +2 -2
  234. package/dist/client/external-auth-headers.d.mts +1 -1
  235. package/dist/client/index.d.mts +11 -11
  236. package/dist/client/index.mjs +2 -2
  237. package/dist/{client-factory-Nyp2sznG.mjs → client-factory-DXfeovxp.mjs} +3 -2
  238. package/dist/{comment-BX6H4NF-.mjs → comment-DuDtCn-f.mjs} +1 -1
  239. package/dist/{comment-reaction-QSENU_3S.mjs → comment-reaction-NZjadbiB.mjs} +1 -1
  240. package/dist/{comments-BHSYG53k.mjs → comments-Csi3B9JI.mjs} +1 -1
  241. package/dist/{connection-CiJWiWya.mjs → connection-DJ3GzHVH.mjs} +2 -3
  242. package/dist/{content-Bg_hMt4Q.mjs → content-CzUrmMC3.mjs} +5 -117
  243. package/dist/{content-refresh-CHBBZGwf.mjs → content-refresh-C_jcjzOr.mjs} +5 -5
  244. package/dist/{context-BGt7zfQ-.mjs → context-BET1jeas.mjs} +11 -11
  245. package/dist/{context-BHXgPEPC.mjs → context-D1WiuHGe.mjs} +2 -2
  246. package/dist/{context-route-helpers-SwM-_GT4.mjs → context-route-helpers-CgVXswZ_.mjs} +2 -2
  247. package/dist/{dashboard-ByLUL4c3.mjs → dashboard-CKAH1KwM.mjs} +4 -4
  248. package/dist/db/index.d.mts +4 -4
  249. package/dist/db/index.mjs +10 -2
  250. package/dist/db/libsql-http.d.mts +27 -0
  251. package/dist/db/libsql-http.mjs +29 -0
  252. package/dist/db/libsql.d.mts +1 -1
  253. package/dist/db/libsql.mjs +3 -43
  254. package/dist/db/postgres.d.mts +1 -1
  255. package/dist/db/sqlite.d.mts +1 -1
  256. package/dist/{device-flow-XqdFNsv_.mjs → device-flow-BED7L-O7.mjs} +5 -5
  257. package/dist/{discovery-DvuRcbP-.mjs → discovery-SVnRaAxj.mjs} +9 -49
  258. package/dist/{enrich-Ck9tfMqe.mjs → enrich-Uw_OA9Ve.mjs} +1 -1
  259. package/dist/{field-defs-cache-sSdDeJXP.mjs → field-defs-cache-BIHTU5Yj.mjs} +4 -4
  260. package/dist/{fts-manager-C7pxxk6B.mjs → fts-manager-BB44uXMm.mjs} +1 -1
  261. package/dist/{hitl-requests-D7pfIM6q.mjs → hitl-requests-D117gyhv.mjs} +2 -2
  262. package/dist/{hitl-route-helpers-Br9uvIQs.mjs → hitl-route-helpers-BasbaWwG.mjs} +5 -5
  263. package/dist/{import-CrsquhXj.mjs → import-BCY1k1zB.mjs} +8 -8
  264. package/dist/{index-NdJMMO48.d.mts → index-DNNw5fp0.d.mts} +3 -3
  265. package/dist/index.d.mts +16 -16
  266. package/dist/index.mjs +87 -84
  267. package/dist/{integration-credentials-B7Pj6YCv.mjs → integration-credentials-CTrvXgEc.mjs} +2 -2
  268. package/dist/{jsonld-CfUj_enm.d.mts → jsonld-CxMRDv02.d.mts} +2 -2
  269. package/dist/libsql-dialect-DMqpBfJI.mjs +47 -0
  270. package/dist/{load-Bul8Tk6e.mjs → load-C-cMlsPv.mjs} +1 -1
  271. package/dist/{loader-BCr2VSzt.mjs → loader-CsX5pTud.mjs} +2 -2
  272. package/dist/{manifest-schema-U5qGq-iB.mjs → manifest-schema-owbEUmv1.mjs} +1 -1
  273. package/dist/{mcp-reviewed-executor-C1lIimd0.mjs → mcp-reviewed-executor-BwI0ylf3.mjs} +6 -6
  274. package/dist/media/image-endpoint.mjs +1 -1
  275. package/dist/media/index.d.mts +1 -1
  276. package/dist/media/index.mjs +2 -2
  277. package/dist/media/local-runtime.d.mts +11 -11
  278. package/dist/media/local-runtime.mjs +2 -2
  279. package/dist/{media-D8pQJSug.mjs → media-4xtXwq7L.mjs} +1 -1
  280. package/dist/{media-allowlist-9u_gxMG2.mjs → media-allowlist-BdbIzYO3.mjs} +1 -1
  281. package/dist/{menus-3B-PGTX3.mjs → menus-CRmcWAM5.mjs} +2 -2
  282. package/dist/{menus-DSWeEWXl.mjs → menus-Cu3TUXyl.mjs} +6 -6
  283. package/dist/{oauth-authorization-CMU5kREy.mjs → oauth-authorization-TG2Kxgur.mjs} +5 -5
  284. package/dist/{oauth-clients-CLdR0WyA.mjs → oauth-clients-DLJMG4h7.mjs} +2 -2
  285. package/dist/object-cache/memory.d.mts +1 -1
  286. package/dist/page/index.d.mts +10 -10
  287. package/dist/page/index.mjs +1 -1
  288. package/dist/{parse-DEG06jjr.mjs → parse-CJC9DGe9.mjs} +1 -1
  289. package/dist/plugin-utils.d.mts +9 -9
  290. package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
  291. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  292. package/dist/{plugins-D8YxTh9q.mjs → plugins-BC9Rb6PJ.mjs} +6 -6
  293. package/dist/{preview-Bn59ztjn.mjs → preview-CjL_29aE.mjs} +3 -3
  294. package/dist/{provider-loader-jdkZM6xZ.d.mts → provider-loader-CGoW_-Bs.d.mts} +1 -1
  295. package/dist/public-discovery-CyDzK1-S.mjs +30 -0
  296. package/dist/{public-url-DifBmsDt.d.mts → public-url-BPnL5sTj.d.mts} +1 -1
  297. package/dist/public-url-DjWfilkD.mjs +46 -0
  298. package/dist/{public-url-DFX2c_20.d.mts → public-url-UpDevWVD.d.mts} +17 -2
  299. package/dist/{publication-authorization-BmazS4K0.mjs → publication-authorization-Bq4B0KIL.mjs} +15 -10
  300. package/dist/{query-CrUftarl.mjs → query-BAfn0Uxp.mjs} +13 -13
  301. package/dist/{query-DPC5GT6e.mjs → query-MvFwA1uK.mjs} +3 -3
  302. package/dist/{rate-limit-DvGL45wH.mjs → rate-limit-JhnJUEno.mjs} +2 -2
  303. package/dist/{redirect-8B-gorhg.mjs → redirect-CnG6nJ4H.mjs} +2 -2
  304. package/dist/{redirects-DdPaQiWQ.mjs → redirects-C9pg6Dcg.mjs} +6 -2
  305. package/dist/{redirects-D2SVS1zo.mjs → redirects-lCwNKPUn.mjs} +5 -5
  306. package/dist/{registry-D3n4-yUl.mjs → registry-QxrUJAWY.mjs} +14 -8
  307. package/dist/{request-meta-DZTiCIQR.mjs → request-meta-DnZm9Kbu.mjs} +1 -1
  308. package/dist/{review-payload-BysRWpxS.mjs → review-payload-BuLgXTY6.mjs} +1 -1
  309. package/dist/{review-requests-D5CJ4JCy.mjs → review-requests-DaYnr3XR.mjs} +1 -1
  310. package/dist/{review-requests-BQbmYLnz.mjs → review-requests-uI-yUXcr.mjs} +2 -2
  311. package/dist/{review-route-helpers-DYiujAPM.mjs → review-route-helpers-BvX04ahf.mjs} +2 -2
  312. package/dist/revision-De7OmYVD.mjs +118 -0
  313. package/dist/{runner-BWZ87FK-.mjs → runner-CQnzfBpD.mjs} +475 -461
  314. package/dist/{runner-BITx7yBF.d.mts → runner-o39FihbH.d.mts} +1 -1
  315. package/dist/runtime.d.mts +10 -10
  316. package/dist/runtime.mjs +3 -3
  317. package/dist/schema-CD3EA3nN.mjs +8 -0
  318. package/dist/{search-B_ir6H6m.mjs → search-BtCHwx_Z.mjs} +3 -3
  319. package/dist/{secrets-Dw3lXI42.mjs → secrets-MqvM60s_.mjs} +2 -2
  320. package/dist/{sections-pRy07N5I.mjs → sections-BM88PvRO.mjs} +2 -2
  321. package/dist/seed/index.d.mts +2 -2
  322. package/dist/seed/index.mjs +22 -20
  323. package/dist/seo/index.d.mts +4 -4
  324. package/dist/seo/index.mjs +9 -7
  325. package/dist/{seo-C4nlxiaY.mjs → seo-BhMH6i2e.mjs} +1 -1
  326. package/dist/{seo-DdNntVj-.mjs → seo-CTXMR4YD.mjs} +1 -1
  327. package/dist/{service-D6fJX7D7.mjs → service-evnf21UO.mjs} +2 -2
  328. package/dist/{settings-D-a7uy2z.mjs → settings-CCqefqC9.mjs} +6 -6
  329. package/dist/{settings-C4OMR0zf.mjs → settings-COtVNdOx.mjs} +2 -2
  330. package/dist/{setup-complete-Blqo_adb.mjs → setup-complete-C8LTo8cO.mjs} +1 -1
  331. package/dist/{site-activity-CnrmnFRy.mjs → site-activity-kfZ9X0no.mjs} +1 -1
  332. package/dist/{site-context-Bdsobbh9.mjs → site-context-D2DmqFnD.mjs} +15 -15
  333. package/dist/{site-url-CK5vBdFu.mjs → site-url-AGgA46Lw.mjs} +1 -1
  334. package/dist/storage/local.d.mts +1 -1
  335. package/dist/storage/local.mjs +1 -1
  336. package/dist/storage/s3.d.mts +1 -1
  337. package/dist/storage/s3.mjs +1 -1
  338. package/dist/{store-DerEE3jG.mjs → store-BtCoeap4.mjs} +1 -1
  339. package/dist/{taxonomies-6bWkaa_G.mjs → taxonomies-DxtqEjcj.mjs} +3 -3
  340. package/dist/{taxonomies-FKTevd14.mjs → taxonomies-xvaQ7gVM.mjs} +6 -6
  341. package/dist/{taxonomy-BU0eCfij.mjs → taxonomy--vcXXfwc.mjs} +2 -2
  342. package/dist/{types-C8cUW9dh.d.mts → types-B2W3CeZN.d.mts} +1 -0
  343. package/dist/{types-BkQ-l1Y5.d.mts → types-BcpWwh4c.d.mts} +51 -24
  344. package/dist/{types-C9F2TLQV.mjs → types-CFvpEEOl.mjs} +1 -1
  345. package/dist/{types-B2kbOwSj.d.mts → types-Cd_2Jeqp.d.mts} +12 -1
  346. package/dist/{types-B6r_SMeR.d.mts → types-m37xNtUj.d.mts} +1 -1
  347. package/dist/ui/server-runtime.d.mts +13 -13
  348. package/dist/ui/server-runtime.mjs +23 -22
  349. package/dist/{user-BV02bsWz.mjs → user-Dn3wV227.mjs} +2 -2
  350. package/dist/{utils-BPzpVHqR.mjs → utils-iGiCys50.mjs} +1 -1
  351. package/dist/{validate-Drps_jbV.mjs → validate-BHVQSpUy.mjs} +8 -2
  352. package/dist/{validate-Bc9gaua6.d.mts → validate-BiPYhXNZ.d.mts} +4 -3
  353. package/dist/version-BbuynKOY.mjs +6 -0
  354. package/dist/{widgets-BFqy7PYs.mjs → widgets-CBCHUg_u.mjs} +3 -3
  355. package/dist/{wordpress-slugs-fMvfO22_.mjs → wordpress-slugs-BYW2B_5x.mjs} +1 -1
  356. package/dist/{zod-generator-BlY_vGgR.mjs → zod-generator-DMlY4cI3.mjs} +2 -2
  357. package/package.json +11 -4
  358. package/src/components/DinewayImage.astro +4 -0
  359. package/dist/schema-kk9-6bUd.mjs +0 -8
  360. package/dist/version-BohmuXyf.mjs +0 -6
  361. /package/dist/{actor-D3A5PNkH.mjs → actor-BraTCiOp.mjs} +0 -0
  362. /package/dist/{api-tokens-CbMAy6xF.mjs → api-tokens-CZ472rzA.mjs} +0 -0
  363. /package/dist/{challenge-store-DtdQHXf5.mjs → challenge-store-ugPhBaVf.mjs} +0 -0
  364. /package/dist/{components-DGu-rih7.mjs → components-CINP4h-l.mjs} +0 -0
  365. /package/dist/{context-types-eBuMDAg-.mjs → context-types-fEeyXC1D.mjs} +0 -0
  366. /package/dist/{cron-BjKHo0QD.mjs → cron-DIsnItPn.mjs} +0 -0
  367. /package/dist/{default-CO47mlSA.mjs → default-D8jeKsT3.mjs} +0 -0
  368. /package/dist/{email-console-CFE1ay18.mjs → email-console-DRb6jkoC.mjs} +0 -0
  369. /package/dist/{error-Jz0EtEwI.mjs → error-BPA9T0AW.mjs} +0 -0
  370. /package/dist/{escape-HmHTC1Is.mjs → escape-DgNqnHuj.mjs} +0 -0
  371. /package/dist/{experimental-workflows-EYZRNkRR.mjs → experimental-workflows-DOo7QDRn.mjs} +0 -0
  372. /package/dist/{hash-mxxx2oPW.mjs → hash-CEky-IDp.mjs} +0 -0
  373. /package/dist/{media-url-DVoOhf4X.mjs → media-url-BhbJfG3Y.mjs} +0 -0
  374. /package/dist/{mime-C0vOHFm7.mjs → mime-Bg7yUeHW.mjs} +0 -0
  375. /package/dist/{mode-DqpBaEOy.mjs → mode-CgD_xAEJ.mjs} +0 -0
  376. /package/dist/{normalize-Cyt7JdF7.mjs → normalize-BY2gOygP.mjs} +0 -0
  377. /package/dist/{oauth-state-store-HdGg_nSm.mjs → oauth-state-store-Dbj-J0K5.mjs} +0 -0
  378. /package/dist/{oauth-user-lookup-CP16vyFW.mjs → oauth-user-lookup-D2NAYPjU.mjs} +0 -0
  379. /package/dist/{options-DQPTH5n0.mjs → options-1dBRkoCl.mjs} +0 -0
  380. /package/dist/{output-CXOC3BFr.mjs → output-A4ZfzzA0.mjs} +0 -0
  381. /package/dist/{parser-buoH2frr.mjs → parser-C3ux7a3Y.mjs} +0 -0
  382. /package/dist/{passkey-config-T47FwLtS.mjs → passkey-config-DUc1iP_-.mjs} +0 -0
  383. /package/dist/{patterns-CoqlXUvk.mjs → patterns-CP9gkiCE.mjs} +0 -0
  384. /package/dist/{placeholder-BsYSFPjY.d.mts → placeholder-0cGpMonY.d.mts} +0 -0
  385. /package/dist/{portable-text-Dm0bgrdZ.d.mts → portable-text-Cu4n_8zI.d.mts} +0 -0
  386. /package/dist/{portable-text-DQHE3b5v.mjs → portable-text-U85hOafW.mjs} +0 -0
  387. /package/dist/{process-cache-CCDgti7j.mjs → process-cache-DsMwJ3LM.mjs} +0 -0
  388. /package/dist/{provider-loader-Dxka0BDp.mjs → provider-loader-BPHG3BR5.mjs} +0 -0
  389. /package/dist/{public-url-CIAtNGEg.mjs → public-url-CmBKcpsJ.mjs} +0 -0
  390. /package/dist/{redirect-CzqnLxK-.mjs → redirect-D_bb_Cc3.mjs} +0 -0
  391. /package/dist/{request-cache-CBFjCwSt.mjs → request-cache-DoT2mKBT.mjs} +0 -0
  392. /package/dist/{resolve-CThKf9_X.mjs → resolve-BDWXnk_V.mjs} +0 -0
  393. /package/dist/{seo-contributions-BGBehNCN.mjs → seo-contributions-DzusM9lG.mjs} +0 -0
  394. /package/dist/{service-DOdvCW-9.mjs → service-BB1n90wh.mjs} +0 -0
  395. /package/dist/{session-user-CYjNeJoD.mjs → session-user-BQZHuGOS.mjs} +0 -0
  396. /package/dist/{setup-nonce-CGUTFWgQ.mjs → setup-nonce-220YhE1R.mjs} +0 -0
  397. /package/dist/{sidecar-client-C6ylL-0S.mjs → sidecar-client-SDgPreXV.mjs} +0 -0
  398. /package/dist/{ssrf-Dz2hqAiG.mjs → ssrf-D00lPvtF.mjs} +0 -0
  399. /package/dist/{stable-hash-DshcXvRE.mjs → stable-hash-_A3p1ln2.mjs} +0 -0
  400. /package/dist/{status-xz9JACSX.mjs → status-BdZSXIP_.mjs} +0 -0
  401. /package/dist/{tokens-DiodRT2y.mjs → tokens-ShJZm_QS.mjs} +0 -0
  402. /package/dist/{transaction-Chz7SBGr.mjs → transaction-L0tzAOfM.mjs} +0 -0
  403. /package/dist/{transport-zquJ7Bzm.mjs → transport-DtrY0-hI.mjs} +0 -0
  404. /package/dist/{transport-DKy93p6V.d.mts → transport-SoRbXDM4.d.mts} +0 -0
  405. /package/dist/{trusted-proxy-NySPw95m.mjs → trusted-proxy-9b2fSXK2.mjs} +0 -0
  406. /package/dist/{types-DY9lJRpo.d.mts → types-B-KSspMO.d.mts} +0 -0
  407. /package/dist/{types-ftxcMx5-.mjs → types-B-nDjnzA.mjs} +0 -0
  408. /package/dist/{types-C2LBO0t8.d.mts → types-BdsNqnHA.d.mts} +0 -0
  409. /package/dist/{types-B7TDDFMG.mjs → types-D1l9cCKM.mjs} +0 -0
  410. /package/dist/{types-Gd4kXLsa.d.mts → types-D8iukuuI.d.mts} +0 -0
  411. /package/dist/{types-BaKec6bx.d.mts → types-ZdWRfUsC.d.mts} +0 -0
  412. /package/dist/{types-C1LdZbQb.mjs → types-dgGPmsl_.mjs} +0 -0
  413. /package/dist/{url-guoXQQcV.mjs → url-C_pLSrGZ.mjs} +0 -0
  414. /package/dist/{url-C05Zz4pW.mjs → url-CmjWycVK.mjs} +0 -0
@@ -1,54 +1,60 @@
1
1
  #!/usr/bin/env node
2
- import { i as runMigrations, n as getMigrationStatus, t as getMigrationFingerprint } from "../runner-BWZ87FK-.mjs";
3
- import { t as createDatabase } from "../connection-CiJWiWya.mjs";
2
+ import { i as runMigrations, n as getMigrationStatus, t as getMigrationFingerprint } from "../runner-CQnzfBpD.mjs";
3
+ import { t as createDatabase } from "../connection-DJ3GzHVH.mjs";
4
4
  import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
5
5
  import { l as listTablesLike } from "../dialect-helpers-fk43GbDb.mjs";
6
6
  import { n as getI18nConfig, r as isI18nEnabled } from "../config-CVssduLe.mjs";
7
7
  import { i as encodeBase64url } from "../base64-F8-DUraK.mjs";
8
- import "../types-C9F2TLQV.mjs";
9
- import { o as isMissingTableError } from "../loader-BCr2VSzt.mjs";
8
+ import "../types-CFvpEEOl.mjs";
9
+ import { o as isMissingTableError } from "../loader-CsX5pTud.mjs";
10
10
  import "../object-cache-D51qOseS.mjs";
11
11
  import { n as slugify } from "../slugify-KSsVD_D3.mjs";
12
- import { t as ContentRepository } from "../content-Bg_hMt4Q.mjs";
13
- import { t as MediaRepository } from "../media-D8pQJSug.mjs";
14
- import { t as TaxonomyRepository } from "../taxonomy-BU0eCfij.mjs";
15
- import { t as OptionsRepository } from "../options-DQPTH5n0.mjs";
16
- import "../redirect-8B-gorhg.mjs";
17
- import "../request-cache-CBFjCwSt.mjs";
18
- import "../byline-registry-BLgrU3dA.mjs";
19
- import "../field-defs-cache-sSdDeJXP.mjs";
20
- import { t as BylineRepository } from "../byline-DEBDPF8R.mjs";
21
- import "../content-refresh-CHBBZGwf.mjs";
22
- import "../fts-manager-C7pxxk6B.mjs";
23
- import { n as SchemaRegistry } from "../registry-D3n4-yUl.mjs";
24
- import "../settings-D-a7uy2z.mjs";
25
- import { n as VERSION } from "../version-BohmuXyf.mjs";
26
- import { i as parseEncryptionKeys, n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-Dw3lXI42.mjs";
27
- import { t as IntegrationCredentialStore } from "../store-DerEE3jG.mjs";
28
- import { a as reconcileManifestAccess, i as pluginManifestSchema } from "../manifest-schema-U5qGq-iB.mjs";
29
- import { n as resolveAndValidateExternalUrl, t as SsrfError } from "../ssrf-Dz2hqAiG.mjs";
30
- import { t as validateSeed } from "../validate-Drps_jbV.mjs";
31
- import { t as applySeed } from "../apply-Hodkn7PL.mjs";
32
- import { _ as readForgewayCredentials, a as InvalidForgewayAccountCredentialsError, c as getForgewayDinewayAccount, d as normalizeForgewayEmail, f as readStoredForgewayAccount, g as listForgewayCredentials, h as sendForgewayAccountLoginLink, i as DEFAULT_FORGEWAY_API_BASE_URL, l as normalizeDinewayWebUrl, m as removeStoredForgewayAccount, n as DinewayToolsService, o as completeForgewayAccountLogin, p as refreshForgewayAccountCredentials, r as DEFAULT_DINEWAY_WEB_URL, s as createForgewayAccountClient, t as DinewayToolsError, u as normalizeForgewayApiUrl, v as writeForgewayCredentials } from "../service-DOdvCW-9.mjs";
33
- import { n as output, t as configureOutputMode } from "../output-CXOC3BFr.mjs";
12
+ import "../revision-De7OmYVD.mjs";
13
+ import { t as ContentRepository } from "../content-CzUrmMC3.mjs";
14
+ import { t as MediaRepository } from "../media-4xtXwq7L.mjs";
15
+ import { t as TaxonomyRepository } from "../taxonomy--vcXXfwc.mjs";
16
+ import { t as OptionsRepository } from "../options-1dBRkoCl.mjs";
17
+ import "../redirect-CnG6nJ4H.mjs";
18
+ import "../request-cache-DoT2mKBT.mjs";
19
+ import "../byline-registry-CF9nobxT.mjs";
20
+ import "../field-defs-cache-BIHTU5Yj.mjs";
21
+ import { t as BylineRepository } from "../byline-MGIfM2Is.mjs";
22
+ import "../content-refresh-C_jcjzOr.mjs";
23
+ import "../fts-manager-BB44uXMm.mjs";
24
+ import "../public-discovery-CyDzK1-S.mjs";
25
+ import { n as SchemaRegistry } from "../registry-QxrUJAWY.mjs";
26
+ import "../settings-CCqefqC9.mjs";
27
+ import { n as VERSION } from "../version-BbuynKOY.mjs";
28
+ import { i as parseEncryptionKeys, n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-MqvM60s_.mjs";
29
+ import { t as IntegrationCredentialStore } from "../store-BtCoeap4.mjs";
30
+ import { a as reconcileManifestAccess, i as pluginManifestSchema } from "../manifest-schema-owbEUmv1.mjs";
31
+ import { n as resolveAndValidateExternalUrl, t as SsrfError } from "../ssrf-D00lPvtF.mjs";
32
+ import { t as validateSeed } from "../validate-BHVQSpUy.mjs";
33
+ import { t as applySeed } from "../apply-CS_138du.mjs";
34
+ import { _ as readForgewayCredentials, a as InvalidForgewayAccountCredentialsError, c as getForgewayDinewayAccount, d as normalizeForgewayEmail, f as readStoredForgewayAccount, g as listForgewayCredentials, h as sendForgewayAccountLoginLink, i as DEFAULT_FORGEWAY_API_BASE_URL, l as normalizeDinewayWebUrl, m as removeStoredForgewayAccount, n as DinewayToolsService, o as completeForgewayAccountLogin, p as refreshForgewayAccountCredentials, r as DEFAULT_DINEWAY_WEB_URL, s as createForgewayAccountClient, t as DinewayToolsError, u as normalizeForgewayApiUrl, v as writeForgewayCredentials } from "../service-BB1n90wh.mjs";
35
+ import { n as output, t as configureOutputMode } from "../output-A4ZfzzA0.mjs";
34
36
  import { createHeaderAwareFetch, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
35
- import { t as convertDataForRead } from "../portable-text-DQHE3b5v.mjs";
36
- import { _ as saveMarketplaceCredential, a as ensureProjectGitignoreDinewayLocalState, c as resolveDinewayBaseUrl, d as getCredentials, f as getMarketplaceCredential, g as saveCredentials, h as resolveCredentialKey, i as DEFAULT_DINEWAY_URL, l as resolveDinewayToken, m as removeMarketplaceCredential, n as connectionArgs, o as ensureProjectGitignoreEntry, p as removeCredentials, r as createClientFromArgs, s as readProjectEnv, u as upsertProjectEnv } from "../client-factory-Nyp2sznG.mjs";
37
+ import { t as convertDataForRead } from "../portable-text-U85hOafW.mjs";
38
+ import { _ as saveMarketplaceCredential, a as ensureProjectGitignoreDinewayLocalState, c as resolveDinewayBaseUrl, d as getCredentials, f as getMarketplaceCredential, g as saveCredentials, h as resolveCredentialKey, i as DEFAULT_DINEWAY_URL, l as resolveDinewayToken, m as removeMarketplaceCredential, n as connectionArgs, o as ensureProjectGitignoreEntry, p as removeCredentials, r as createClientFromArgs, s as readProjectEnv, u as upsertProjectEnv } from "../client-factory-DXfeovxp.mjs";
37
39
  import { LocalStorage } from "../storage/local.mjs";
38
- import { r as fileExists$11, t as bundleCommand } from "../bundle-dsO2-7eh.mjs";
40
+ import { r as fileExists$11, t as bundleCommand } from "../bundle-DicQY2p2.mjs";
39
41
  import { createRequire } from "node:module";
40
42
  import { createHash } from "node:crypto";
41
43
  import { sql } from "kysely";
44
+ import { z } from "zod";
42
45
  import { createGzipDecoder, unpackTar } from "modern-tar";
43
- import { createReadStream, existsSync, readFileSync, writeFileSync } from "node:fs";
44
- import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
46
+ import { createReadStream, createWriteStream, existsSync, readFileSync, writeFileSync } from "node:fs";
47
+ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
45
48
  import sax from "sax";
46
49
  import { pathToFileURL } from "node:url";
47
50
  import { defineCommand, runCommand, runMain } from "citty";
48
51
  import { createInterface } from "node:readline/promises";
49
52
  import consola, { consola as consola$1 } from "consola";
50
53
  import pc from "picocolors";
51
- import { access, mkdir, readFile, readdir, stat, writeFile } from "node:fs/promises";
54
+ import { access, cp, lstat, mkdir, mkdtemp, readFile, readdir, realpath, rename, rm, stat, writeFile } from "node:fs/promises";
55
+ import { pipeline } from "node:stream/promises";
56
+ import { createGzip } from "node:zlib";
57
+ import { packTar } from "modern-tar/fs";
52
58
  import { spawn } from "node:child_process";
53
59
  import { parse } from "parse5";
54
60
 
@@ -1011,6 +1017,12 @@ async function handleCliPaywall(input) {
1011
1017
 
1012
1018
  //#endregion
1013
1019
  //#region src/cli/commands/deploy/utils/astro-adapter.ts
1020
+ const CLOUDFLARE_ADAPTER_PACKAGE = "@astrojs/cloudflare";
1021
+ const CLOUDFLARE_ADAPTER_VERSION = "14.0.0";
1022
+ const CLOUDFLARE_IMPORT_PATTERN = /^import\s+cloudflare\s+from\s+["']@astrojs\/cloudflare["'];\n?/m;
1023
+ const CLOUDFLARE_ADAPTER_PROPERTY_PATTERN = /\badapter\s*:\s*cloudflare\s*\(/;
1024
+ const ANY_ADAPTER_PROPERTY_PATTERN = /\badapter\s*:/;
1025
+ const SESSION_PROPERTY_PATTERN = /\bsession\s*:/;
1014
1026
  const NODE_ADAPTER_PACKAGE = "@astrojs/node";
1015
1027
  const VERCEL_ADAPTER_PACKAGE = "@astrojs/vercel";
1016
1028
  const NODE_ADAPTER_VERSION = "^10.1.0";
@@ -1020,7 +1032,7 @@ const VERCEL_IMPORT_PATTERN = /^import\s+vercel\s+from\s+["']@astrojs\/vercel["'
1020
1032
  const CONDITIONAL_ADAPTER_FLAG_PATTERN = /^const\s+isVercelDeploy\s*=\s*process\.env\.VERCEL\s*===\s*["']1["']\s*\|\|\s*process\.env\.DINEWAY_DEPLOY_TARGET\s*===\s*["']forgeway["'];\n?/m;
1021
1033
  const SERVER_OUTPUT_PATTERN = /output:\s*["']server["'],/;
1022
1034
  const KNOWN_ADAPTER_FLAG_PATTERN = /\bisVercelDeploy\b/;
1023
- const KNOWN_ADAPTER_CALL_PATTERN = /\b(?:node|vercel)\s*\(/;
1035
+ const KNOWN_ADAPTER_CALL_PATTERN = /\b(?:node|vercel|cloudflare)\s*\(/;
1024
1036
  const ADAPTER_PROPERTY_PATTERN = /\n?[ \t]*adapter\s*:/g;
1025
1037
  const COLLECT_UPLOAD_FUNCTION_PATTERN = /\bfunction\s+collectUploadIncludeFiles\s*\(/;
1026
1038
  const TRAILING_NEWLINES_PATTERN = /\n+$/;
@@ -1176,24 +1188,36 @@ function removeGeneratedVercelUploadHelper(source) {
1176
1188
  for (const statement of GENERATED_UPLOAD_HELPER_IMPORTS) next = next.replace(`${statement}\n`, "");
1177
1189
  return next;
1178
1190
  }
1191
+ function ensureWorkersSession(source) {
1192
+ return SESSION_PROPERTY_PATTERN.test(source) ? source : source.replace(SERVER_OUTPUT_PATTERN, (match) => `${match}\n\tsession: { driver: { entrypoint: "dineway/astro/session-driver" } },`);
1193
+ }
1179
1194
  function configureAstroConfigSource(source, adapter) {
1195
+ if (adapter === "cloudflare" && CLOUDFLARE_IMPORT_PATTERN.test(source) && CLOUDFLARE_ADAPTER_PROPERTY_PATTERN.test(source)) return ensureWorkersSession(source);
1180
1196
  let next = source.replace(CONDITIONAL_ADAPTER_FLAG_PATTERN, "").replace(adapter === "vercel" ? NODE_IMPORT_PATTERN : VERCEL_IMPORT_PATTERN, "");
1181
- if (adapter === "node") next = removeGeneratedVercelUploadHelper(next);
1182
- const wantedImport = adapter === "vercel" ? `import vercel from "${VERCEL_ADAPTER_PACKAGE}";` : `import node from "${NODE_ADAPTER_PACKAGE}";`;
1183
- const wantedAdapter = adapter === "vercel" ? createVercelAdapterConfig() : "adapter: node({ mode: \"standalone\" }),";
1197
+ if (adapter !== "cloudflare") next = next.replace(CLOUDFLARE_IMPORT_PATTERN, "");
1198
+ if (adapter === "cloudflare") next = next.replace(NODE_IMPORT_PATTERN, "");
1199
+ if (adapter !== "vercel") next = removeGeneratedVercelUploadHelper(next);
1200
+ const wantedImport = adapter === "cloudflare" ? `import cloudflare from "${CLOUDFLARE_ADAPTER_PACKAGE}";` : adapter === "vercel" ? `import vercel from "${VERCEL_ADAPTER_PACKAGE}";` : `import node from "${NODE_ADAPTER_PACKAGE}";`;
1201
+ const wantedAdapter = adapter === "cloudflare" ? "adapter: cloudflare({ imageService: \"passthrough\" })," : adapter === "vercel" ? createVercelAdapterConfig() : "adapter: node({ mode: \"standalone\" }),";
1184
1202
  if (!next.includes(wantedImport)) next = insertImport(next, wantedImport);
1185
1203
  if (adapter === "vercel") next = ensureGeneratedVercelUploadHelper(next);
1186
1204
  const adapterReplacement = replaceKnownAdapterEntries(next, wantedAdapter);
1187
1205
  next = adapterReplacement.source;
1188
1206
  if (!adapterReplacement.replaced) {
1207
+ if (adapter === "cloudflare" && ANY_ADAPTER_PROPERTY_PATTERN.test(next)) throw new Error("Cannot safely replace the custom Astro adapter. Configure @astrojs/cloudflare manually.");
1189
1208
  if (!SERVER_OUTPUT_PATTERN.test(next)) throw new Error("astro.config.mjs must include output: \"server\" before deploy adapter setup.");
1190
1209
  next = next.replace(SERVER_OUTPUT_PATTERN, (match) => `${match}\n\t${wantedAdapter}`);
1191
1210
  }
1192
- return next;
1211
+ return adapter === "cloudflare" ? ensureWorkersSession(next) : next;
1193
1212
  }
1194
1213
  function configurePackageJson(pkg, adapter) {
1195
1214
  const dependencies = { ...pkg.dependencies };
1196
- if (adapter === "vercel") {
1215
+ if (adapter !== "cloudflare") delete dependencies[CLOUDFLARE_ADAPTER_PACKAGE];
1216
+ if (adapter === "cloudflare") {
1217
+ delete dependencies[NODE_ADAPTER_PACKAGE];
1218
+ delete dependencies[VERCEL_ADAPTER_PACKAGE];
1219
+ dependencies[CLOUDFLARE_ADAPTER_PACKAGE] = dependencies[CLOUDFLARE_ADAPTER_PACKAGE] ?? CLOUDFLARE_ADAPTER_VERSION;
1220
+ } else if (adapter === "vercel") {
1197
1221
  delete dependencies[NODE_ADAPTER_PACKAGE];
1198
1222
  dependencies[VERCEL_ADAPTER_PACKAGE] = dependencies[VERCEL_ADAPTER_PACKAGE] ?? VERCEL_ADAPTER_VERSION;
1199
1223
  } else {
@@ -1249,6 +1273,331 @@ async function configureAstroDeployAdapter(cwd, adapter, dryRun = false) {
1249
1273
  return [...await configureAstroConfig(cwd, adapter, dryRun), ...await configurePackage(cwd, adapter, dryRun)];
1250
1274
  }
1251
1275
 
1276
+ //#endregion
1277
+ //#region src/cli/commands/deploy/utils/workers.ts
1278
+ const WORKERS_BUILD_CONFIG = "dist/server/wrangler.json";
1279
+ const INVALID_NAME = /[^a-z0-9-]+/g;
1280
+ const EDGE_HYPHENS = /^-+|-+$/g;
1281
+ const workerBuildSchema = z.object({
1282
+ main: z.string().min(1),
1283
+ compatibility_date: z.string(),
1284
+ compatibility_flags: z.array(z.string()),
1285
+ no_bundle: z.literal(true),
1286
+ assets: z.object({
1287
+ binding: z.literal("ASSETS"),
1288
+ directory: z.string().min(1)
1289
+ })
1290
+ }).passthrough();
1291
+ async function exists(path) {
1292
+ try {
1293
+ await access(path);
1294
+ return true;
1295
+ } catch {
1296
+ return false;
1297
+ }
1298
+ }
1299
+ async function writeNewFile(cwd, path, content, dryRun = false) {
1300
+ if (await exists(join(cwd, path))) return {
1301
+ path,
1302
+ action: "exists"
1303
+ };
1304
+ if (dryRun) return {
1305
+ path,
1306
+ action: "skipped"
1307
+ };
1308
+ await mkdir(dirname(join(cwd, path)), { recursive: true });
1309
+ await assertInsideDirectory(cwd, dirname(join(cwd, path)));
1310
+ await writeFile(join(cwd, path), content, "utf-8");
1311
+ return {
1312
+ path,
1313
+ action: "created"
1314
+ };
1315
+ }
1316
+ async function generateWorkersConfig(cwd, dryRun = false) {
1317
+ const files = await configureAstroDeployAdapter(cwd, "cloudflare", dryRun);
1318
+ for (const path of [
1319
+ "wrangler.jsonc",
1320
+ "wrangler.json",
1321
+ "wrangler.toml"
1322
+ ]) if (await exists(join(cwd, path))) return [...files, {
1323
+ path,
1324
+ action: "exists"
1325
+ }];
1326
+ const config = {
1327
+ name: (z.object({ name: z.string().optional() }).parse(JSON.parse(await readFile(join(cwd, "package.json"), "utf-8"))).name?.split("/").at(-1) ?? "dineway").toLowerCase().replace(INVALID_NAME, "-").replace(EDGE_HYPHENS, "").slice(0, 63).replace(EDGE_HYPHENS, "") || "dineway",
1328
+ main: "@astrojs/cloudflare/entrypoints/server",
1329
+ compatibility_date: "2026-09-01",
1330
+ compatibility_flags: ["nodejs_compat"],
1331
+ assets: { binding: "ASSETS" }
1332
+ };
1333
+ files.push(await writeNewFile(cwd, "wrangler.jsonc", JSON.stringify(config, null, " ") + "\n", dryRun));
1334
+ return files;
1335
+ }
1336
+ async function assertInsideDirectory(root, path) {
1337
+ if (!isInside(relative(await realpath(root), await realpath(path)))) throw new Error("Workers build files must stay inside the project output directory.");
1338
+ }
1339
+ function isInside(relativePath) {
1340
+ return relativePath !== ".." && !relativePath.startsWith(`..${sep}`) && !isAbsolute(relativePath);
1341
+ }
1342
+ async function readWorkersBuild(cwd) {
1343
+ const configPath = join(cwd, WORKERS_BUILD_CONFIG);
1344
+ if (!await exists(configPath)) throw new Error("Missing Cloudflare Worker build. Install @astrojs/cloudflare and wrangler, then run the Astro build before deploying.");
1345
+ await assertInsideDirectory(cwd, join(cwd, "dist"));
1346
+ await assertInsideDirectory(join(cwd, "dist"), configPath);
1347
+ const config = workerBuildSchema.parse(JSON.parse(await readFile(configPath, "utf-8")));
1348
+ if (!config.compatibility_flags.includes("nodejs_compat")) throw new Error("Dineway Workers require compatibility_flags: [\"nodejs_compat\"].");
1349
+ const serverDir = dirname(configPath);
1350
+ const entrypoint = resolve(serverDir, config.main);
1351
+ const assetsDir = resolve(serverDir, config.assets.directory);
1352
+ await assertInsideDirectory(serverDir, entrypoint);
1353
+ await assertInsideDirectory(join(cwd, "dist"), assetsDir);
1354
+ const [realServer, realAssets] = await Promise.all([realpath(serverDir), realpath(assetsDir)]);
1355
+ if (isInside(relative(realServer, realAssets)) || isInside(relative(realAssets, realServer))) throw new Error("Worker server modules and public assets must use separate output directories.");
1356
+ return {
1357
+ config,
1358
+ configPath,
1359
+ serverDir,
1360
+ entrypoint,
1361
+ assetsDir
1362
+ };
1363
+ }
1364
+
1365
+ //#endregion
1366
+ //#region src/cli/commands/deploy/targets/chatgpt-sites.ts
1367
+ const HOSTING_PATH = ".openai/hosting.json";
1368
+ const externalPersistence = z.unknown().refine((value) => value == null, "This Dineway Sites target uses external HTTP libSQL and S3; native D1/R2 bindings are not supported.");
1369
+ const hostingSchema = z.object({
1370
+ project_id: z.string().min(1),
1371
+ static: z.null().optional(),
1372
+ d1: externalPersistence.optional(),
1373
+ r2: externalPersistence.optional(),
1374
+ capabilities: z.array(z.string()).optional()
1375
+ }).strict();
1376
+ const NON_RUNTIME_ENTRIES = new Set([
1377
+ ".prerender",
1378
+ ".vite",
1379
+ "wrangler.json",
1380
+ ".dev.vars",
1381
+ ".env"
1382
+ ]);
1383
+ const BINDING_KEYS = [
1384
+ "kv_namespaces",
1385
+ "d1_databases",
1386
+ "r2_buckets",
1387
+ "services",
1388
+ "hyperdrive",
1389
+ "vectorize",
1390
+ "workflows",
1391
+ "worker_loaders",
1392
+ "queues",
1393
+ "durable_objects",
1394
+ "images",
1395
+ "ai"
1396
+ ];
1397
+ async function readHosting(cwd, projectId) {
1398
+ await assertInsideDirectory(cwd, join(cwd, HOSTING_PATH));
1399
+ if (!(await lstat(join(cwd, HOSTING_PATH))).isFile()) throw new Error("Sites hosting.json must be a regular file.");
1400
+ const config = hostingSchema.parse(JSON.parse(await readFile(join(cwd, HOSTING_PATH), "utf-8")));
1401
+ if (projectId && projectId !== config.project_id) throw new Error("--site does not match .openai/hosting.json. Reuse the existing Sites project ID.");
1402
+ return config;
1403
+ }
1404
+ async function assertRegularTree(path) {
1405
+ const stat = await lstat(path);
1406
+ if (stat.isDirectory()) for (const entry of await readdir(path)) await assertRegularTree(join(path, entry));
1407
+ else if (!stat.isFile()) throw new Error("Sites build output must not contain symlinks or special files.");
1408
+ }
1409
+ function hasBinding(value) {
1410
+ if (Array.isArray(value)) return value.length > 0;
1411
+ if (value && typeof value === "object") return Object.values(value).some(hasBinding);
1412
+ return value !== void 0 && value !== null && value !== false && value !== "";
1413
+ }
1414
+ const chatgptSitesTarget = {
1415
+ name: "chatgpt-sites",
1416
+ label: "ChatGPT Sites",
1417
+ description: "Prepare an Astro Worker archive for publishing through the Sites connector.",
1418
+ supportLevel: "experimental",
1419
+ async generateConfig(cwd, options) {
1420
+ if (await exists(join(cwd, HOSTING_PATH))) await readHosting(cwd, options.site);
1421
+ else if (!options.site && !options.dryRun) throw new Error("Register or select a Site with the Sites connector first, then pass its exact project ID with --site or save it in .openai/hosting.json.");
1422
+ const files = await generateWorkersConfig(cwd, options.dryRun);
1423
+ files.push(await writeNewFile(cwd, HOSTING_PATH, JSON.stringify({ project_id: options.site }, null, " ") + "\n", options.dryRun));
1424
+ return files;
1425
+ },
1426
+ async deploy(cwd, options) {
1427
+ if (options.dryRun) return { message: "[dry-run] Would prepare dist/server/index.js and dist/.openai/hosting.json for the Sites hosting skill. Publishing uses the Sites connector." };
1428
+ const hosting = await readHosting(cwd, options.site);
1429
+ if (await exists(join(cwd, "drizzle")) || await exists(join(cwd, "dist/.openai/drizzle"))) throw new Error("This Dineway Sites target does not support Drizzle/D1 migrations. Use external HTTP libSQL with Dineway's runtime migrations.");
1430
+ const build = await readWorkersBuild(cwd);
1431
+ const unsupported = BINDING_KEYS.filter((key) => hasBinding(build.config[key]));
1432
+ if (unsupported.length) throw new Error(`Sites cannot provision this Worker's Wrangler bindings: ${unsupported.join(", ")}. Use Dineway database sessions, libsqlHttp(), and S3 storage. Manage Sites bindings with the Sites connector.`);
1433
+ await assertRegularTree(build.serverDir);
1434
+ await assertRegularTree(build.assetsDir);
1435
+ await mkdir(join(cwd, ".dineway"), { recursive: true });
1436
+ await assertInsideDirectory(cwd, join(cwd, ".dineway"));
1437
+ const stage = await mkdtemp(join(cwd, ".dineway/sites-"));
1438
+ try {
1439
+ const dist = join(stage, "upload/dist");
1440
+ await mkdir(join(dist, ".openai"), { recursive: true });
1441
+ await cp(build.serverDir, join(dist, "server"), {
1442
+ recursive: true,
1443
+ filter: (path) => !NON_RUNTIME_ENTRIES.has(basename(path))
1444
+ });
1445
+ await cp(build.assetsDir, join(dist, "client"), { recursive: true });
1446
+ if (build.entrypoint !== join(build.serverDir, "index.js")) {
1447
+ const entry = "./" + relative(build.serverDir, build.entrypoint).split(sep).join("/");
1448
+ await writeFile(join(dist, "server/index.js"), `export { default } from ${JSON.stringify(entry)};\n`);
1449
+ }
1450
+ await writeFile(join(dist, ".openai/hosting.json"), JSON.stringify(hosting, null, " ") + "\n");
1451
+ const archivePath = join(cwd, ".dineway/sites-deploy.tar.gz");
1452
+ const preparedArchive = join(stage, "site.tar.gz");
1453
+ await pipeline(packTar(join(stage, "upload")), createGzip(), createWriteStream(preparedArchive, { mode: 384 }));
1454
+ await rename(preparedArchive, archivePath);
1455
+ return { message: `Sites archive prepared: ${archivePath}. Not published yet. Use the sites-hosting skill to push the matching source, save this version, and deploy through the Sites connector.` };
1456
+ } finally {
1457
+ await rm(stage, {
1458
+ recursive: true,
1459
+ force: true
1460
+ });
1461
+ }
1462
+ }
1463
+ };
1464
+
1465
+ //#endregion
1466
+ //#region src/cli/commands/deploy/utils/spawn.ts
1467
+ async function runCommand$1(command, args, options) {
1468
+ return new Promise((resolve, reject) => {
1469
+ const child = spawn(command, args, {
1470
+ cwd: options.cwd,
1471
+ env: {
1472
+ ...process.env,
1473
+ ...options.env
1474
+ },
1475
+ stdio: options.stdio === "inherit" ? "inherit" : [
1476
+ "ignore",
1477
+ "pipe",
1478
+ "pipe"
1479
+ ],
1480
+ shell: false
1481
+ });
1482
+ let stdout = "";
1483
+ let stderr = "";
1484
+ if (options.stdio !== "inherit") {
1485
+ child.stdout?.on("data", (chunk) => {
1486
+ stdout += chunk.toString();
1487
+ });
1488
+ child.stderr?.on("data", (chunk) => {
1489
+ stderr += chunk.toString();
1490
+ });
1491
+ }
1492
+ child.on("error", reject);
1493
+ child.on("close", (code) => {
1494
+ resolve({
1495
+ code: code ?? 0,
1496
+ stdout,
1497
+ stderr
1498
+ });
1499
+ });
1500
+ });
1501
+ }
1502
+ async function runCommandOrThrow(command, args, options) {
1503
+ const result = await runCommand$1(command, args, options);
1504
+ if (result.code !== 0) {
1505
+ const detail = result.stderr.trim() || result.stdout.trim() || `exit code ${result.code}`;
1506
+ throw new Error(`${command} ${args.join(" ")} failed: ${detail}`);
1507
+ }
1508
+ return result;
1509
+ }
1510
+
1511
+ //#endregion
1512
+ //#region src/cli/commands/deploy/utils/cli-resolver.ts
1513
+ async function confirm(message) {
1514
+ if (!process.stdin.isTTY) return false;
1515
+ const rl = createInterface({
1516
+ input: process.stdin,
1517
+ output: process.stdout
1518
+ });
1519
+ try {
1520
+ const answer = await rl.question(`${message} [y/N] `);
1521
+ return answer.trim().toLowerCase() === "y" || answer.trim().toLowerCase() === "yes";
1522
+ } finally {
1523
+ rl.close();
1524
+ }
1525
+ }
1526
+ function resolveProviderCli(cwd, binary) {
1527
+ const local = join(cwd, "node_modules", ".bin", process.platform === "win32" ? `${binary}.cmd` : binary);
1528
+ return existsSync(local) ? local : binary;
1529
+ }
1530
+ async function ensureTargetCli(target, cwd, options = {}) {
1531
+ if (!target.cli) return;
1532
+ if ((await runCommand$1(resolveProviderCli(cwd, target.cli.versionCommand.command), target.cli.versionCommand.args, { cwd }).catch(() => ({
1533
+ code: 1,
1534
+ stdout: "",
1535
+ stderr: ""
1536
+ }))).code === 0) return;
1537
+ if (options.dryRun) {
1538
+ consola.info(`[dry-run] Would verify ${target.cli.binary} CLI with ${target.cli.versionCommand.command} ${target.cli.versionCommand.args.join(" ")}`);
1539
+ if (target.cli.npmPackage) consola.info(`[dry-run] Would offer to install ${target.cli.npmPackage}`);
1540
+ else consola.info(`[dry-run] ${target.cli.installHint ?? `Install ${target.cli.binary} before deploying.`}`);
1541
+ return;
1542
+ }
1543
+ if (!target.cli.npmPackage) throw new Error(`${target.label} CLI is required. ${target.cli.installHint ?? `Install ${target.cli.binary} and try again.`}`);
1544
+ if (options.yes) throw new Error(`Install ${target.cli.npmPackage} and run this command again. The --yes flag does not approve global CLI installation.`);
1545
+ if (!await confirm(`${target.label} CLI is not installed. Install ${target.cli.npmPackage} globally now?`)) throw new Error(`Install ${target.cli.npmPackage} and run this command again.`);
1546
+ await runCommandOrThrow("npm", [
1547
+ "install",
1548
+ "--global",
1549
+ target.cli.npmPackage
1550
+ ], {
1551
+ cwd,
1552
+ stdio: "inherit"
1553
+ });
1554
+ }
1555
+
1556
+ //#endregion
1557
+ //#region src/cli/commands/deploy/targets/cloudflare.ts
1558
+ const cloudflareTarget = {
1559
+ name: "cloudflare",
1560
+ label: "Cloudflare Workers",
1561
+ description: "Deploy an Astro Worker with Wrangler and remote libSQL/object storage.",
1562
+ supportLevel: "experimental",
1563
+ cli: {
1564
+ npmPackage: null,
1565
+ binary: "wrangler",
1566
+ versionCommand: {
1567
+ command: "wrangler",
1568
+ args: ["--version"]
1569
+ },
1570
+ installHint: "Install wrangler in this project (for example: pnpm add -D wrangler@^4.131.1)."
1571
+ },
1572
+ async checkAuth(cwd) {
1573
+ return (await runCommand$1(resolveProviderCli(cwd, "wrangler"), ["whoami", "--json"], { cwd })).code === 0;
1574
+ },
1575
+ async login(cwd) {
1576
+ if (!process.stdin.isTTY) throw new Error("Cloudflare authentication is required. Set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID or run wrangler login interactively.");
1577
+ await runCommandOrThrow(resolveProviderCli(cwd, "wrangler"), ["login"], {
1578
+ cwd,
1579
+ stdio: "inherit"
1580
+ });
1581
+ },
1582
+ generateConfig(cwd, options) {
1583
+ return generateWorkersConfig(cwd, options.dryRun);
1584
+ },
1585
+ async deploy(cwd, options) {
1586
+ if (options.dryRun) return { message: `[dry-run] Would run wrangler deploy --config ${WORKERS_BUILD_CONFIG}.` };
1587
+ await readWorkersBuild(cwd);
1588
+ await runCommandOrThrow(resolveProviderCli(cwd, "wrangler"), [
1589
+ "deploy",
1590
+ "--config",
1591
+ WORKERS_BUILD_CONFIG
1592
+ ], {
1593
+ cwd,
1594
+ env: options.env,
1595
+ stdio: "inherit"
1596
+ });
1597
+ return { message: "Cloudflare deployment complete. Wrangler printed the deployed URL above." };
1598
+ }
1599
+ };
1600
+
1252
1601
  //#endregion
1253
1602
  //#region src/cli/commands/deploy/utils/dockerfile.ts
1254
1603
  const NODE_START_COMMAND = "node ./dist/server/entry.mjs";
@@ -1379,52 +1728,6 @@ const dockerTarget = {
1379
1728
  }
1380
1729
  };
1381
1730
 
1382
- //#endregion
1383
- //#region src/cli/commands/deploy/utils/spawn.ts
1384
- async function runCommand$1(command, args, options) {
1385
- return new Promise((resolve, reject) => {
1386
- const child = spawn(command, args, {
1387
- cwd: options.cwd,
1388
- env: {
1389
- ...process.env,
1390
- ...options.env
1391
- },
1392
- stdio: options.stdio === "inherit" ? "inherit" : [
1393
- "ignore",
1394
- "pipe",
1395
- "pipe"
1396
- ],
1397
- shell: false
1398
- });
1399
- let stdout = "";
1400
- let stderr = "";
1401
- if (options.stdio !== "inherit") {
1402
- child.stdout?.on("data", (chunk) => {
1403
- stdout += chunk.toString();
1404
- });
1405
- child.stderr?.on("data", (chunk) => {
1406
- stderr += chunk.toString();
1407
- });
1408
- }
1409
- child.on("error", reject);
1410
- child.on("close", (code) => {
1411
- resolve({
1412
- code: code ?? 0,
1413
- stdout,
1414
- stderr
1415
- });
1416
- });
1417
- });
1418
- }
1419
- async function runCommandOrThrow(command, args, options) {
1420
- const result = await runCommand$1(command, args, options);
1421
- if (result.code !== 0) {
1422
- const detail = result.stderr.trim() || result.stdout.trim() || `exit code ${result.code}`;
1423
- throw new Error(`${command} ${args.join(" ")} failed: ${detail}`);
1424
- }
1425
- return result;
1426
- }
1427
-
1428
1731
  //#endregion
1429
1732
  //#region src/cli/commands/deploy/targets/fly.ts
1430
1733
  const FLY_URL_RE = /https:\/\/[^\s"]+\.fly\.dev[^\s"]*/;
@@ -3168,47 +3471,6 @@ const railwayTarget = {
3168
3471
  }
3169
3472
  };
3170
3473
 
3171
- //#endregion
3172
- //#region src/cli/commands/deploy/utils/cli-resolver.ts
3173
- async function confirm(message) {
3174
- if (!process.stdin.isTTY) return false;
3175
- const rl = createInterface({
3176
- input: process.stdin,
3177
- output: process.stdout
3178
- });
3179
- try {
3180
- const answer = await rl.question(`${message} [y/N] `);
3181
- return answer.trim().toLowerCase() === "y" || answer.trim().toLowerCase() === "yes";
3182
- } finally {
3183
- rl.close();
3184
- }
3185
- }
3186
- async function ensureTargetCli(target, cwd, options = {}) {
3187
- if (!target.cli) return;
3188
- if ((await runCommand$1(target.cli.versionCommand.command, target.cli.versionCommand.args, { cwd }).catch(() => ({
3189
- code: 1,
3190
- stdout: "",
3191
- stderr: ""
3192
- }))).code === 0) return;
3193
- if (options.dryRun) {
3194
- consola.info(`[dry-run] Would verify ${target.cli.binary} CLI with ${target.cli.versionCommand.command} ${target.cli.versionCommand.args.join(" ")}`);
3195
- if (target.cli.npmPackage) consola.info(`[dry-run] Would offer to install ${target.cli.npmPackage}`);
3196
- else consola.info(`[dry-run] ${target.cli.installHint ?? `Install ${target.cli.binary} before deploying.`}`);
3197
- return;
3198
- }
3199
- if (!target.cli.npmPackage) throw new Error(`${target.label} CLI is required. ${target.cli.installHint ?? `Install ${target.cli.binary} and try again.`}`);
3200
- if (options.yes) throw new Error(`Install ${target.cli.npmPackage} and run this command again. The --yes flag does not approve global CLI installation.`);
3201
- if (!await confirm(`${target.label} CLI is not installed. Install ${target.cli.npmPackage} globally now?`)) throw new Error(`Install ${target.cli.npmPackage} and run this command again.`);
3202
- await runCommandOrThrow("npm", [
3203
- "install",
3204
- "--global",
3205
- target.cli.npmPackage
3206
- ], {
3207
- cwd,
3208
- stdio: "inherit"
3209
- });
3210
- }
3211
-
3212
3474
  //#endregion
3213
3475
  //#region src/cli/commands/deploy/index.ts
3214
3476
  const targets = [
@@ -3216,7 +3478,9 @@ const targets = [
3216
3478
  railwayTarget,
3217
3479
  dockerTarget,
3218
3480
  flyTarget,
3219
- gcpTarget
3481
+ gcpTarget,
3482
+ cloudflareTarget,
3483
+ chatgptSitesTarget
3220
3484
  ];
3221
3485
  const DEFAULT_TARGET = "forgeway";
3222
3486
  function getTarget(name) {
@@ -3266,7 +3530,7 @@ async function resolveTarget(cwd, explicitTarget) {
3266
3530
  const deployCommand = defineCommand({
3267
3531
  meta: {
3268
3532
  name: "deploy",
3269
- description: "Deploy a Dineway Node server through a provider CLI"
3533
+ description: "Deploy a Dineway site to a hosting provider"
3270
3534
  },
3271
3535
  args: {
3272
3536
  target: {
@@ -3302,7 +3566,7 @@ const deployCommand = defineCommand({
3302
3566
  },
3303
3567
  site: {
3304
3568
  type: "string",
3305
- description: "Forgeway deployment site ID or slug",
3569
+ description: "Forgeway site ID/slug or exact ChatGPT Sites project ID",
3306
3570
  required: false
3307
3571
  },
3308
3572
  "place-id": {
@@ -3396,10 +3660,8 @@ const deployCommand = defineCommand({
3396
3660
  const build = options.dryRun ? null : await runBuild(cwd, options.env);
3397
3661
  consola.info(options.dryRun ? "[dry-run] Would run build" : `Built with ${build?.display}`);
3398
3662
  }
3399
- if (!options.dryRun) {
3400
- await ensureProjectGitignoreDinewayLocalState(cwd);
3401
- await writeDeployTarget(cwd, target.name);
3402
- } else {
3663
+ if (!options.dryRun) await ensureProjectGitignoreDinewayLocalState(cwd);
3664
+ else {
3403
3665
  consola.info("[dry-run] Would ensure Dineway local state entries in .gitignore");
3404
3666
  consola.info(`[dry-run] Would save .dineway/deploy.json target=${target.name}`);
3405
3667
  }
@@ -3418,6 +3680,7 @@ const deployCommand = defineCommand({
3418
3680
  })) process.exit(2);
3419
3681
  throw error;
3420
3682
  });
3683
+ if (!options.dryRun) await writeDeployTarget(cwd, target.name);
3421
3684
  if (result.url) consola.success(result.url);
3422
3685
  consola.success(result.message);
3423
3686
  }
@@ -3545,7 +3808,7 @@ const devCommand = defineCommand({
3545
3808
  const remoteUrl = pkg.dineway?.url || process.env.DINEWAY_URL;
3546
3809
  if (!remoteUrl) consola.warn("No remote URL configured. Set DINEWAY_URL or dineway.url in package.json");
3547
3810
  else try {
3548
- const { createClientFromArgs } = await import("../client-factory-Nyp2sznG.mjs").then((n) => n.t);
3811
+ const { createClientFromArgs } = await import("../client-factory-DXfeovxp.mjs").then((n) => n.t);
3549
3812
  const client = createClientFromArgs({ url: remoteUrl });
3550
3813
  const schema = await client.schemaExport();
3551
3814
  const types = await client.schemaTypes();
@@ -3930,6 +4193,7 @@ async function exportCollections(db) {
3930
4193
  supports: collection.supports.length > 0 ? collection.supports : void 0,
3931
4194
  urlPattern: collection.urlPattern || void 0,
3932
4195
  urlField: collection.urlField || void 0,
4196
+ publicDiscovery: collection.publicDiscovery,
3933
4197
  fields: fields.map((field) => ({
3934
4198
  slug: field.slug,
3935
4199
  label: field.label,
@@ -5540,7 +5804,7 @@ const publishCommand = defineCommand({
5540
5804
  const pluginDir = resolve(args.dir);
5541
5805
  try {
5542
5806
  const { runCommand } = await import("citty");
5543
- const { bundleCommand } = await import("../bundle-dsO2-7eh.mjs").then((n) => n.n);
5807
+ const { bundleCommand } = await import("../bundle-DicQY2p2.mjs").then((n) => n.n);
5544
5808
  await runCommand(bundleCommand, { rawArgs: ["--dir", pluginDir] });
5545
5809
  } catch {
5546
5810
  consola.error("Build failed");
@@ -7853,7 +8117,7 @@ function isFileNotFound(error) {
7853
8117
  * - search: Full-text search
7854
8118
  * - taxonomy: Manage taxonomies and terms
7855
8119
  * - menu: Manage navigation menus
7856
- * - deploy: Deploy a standard Dineway Node server through a provider CLI
8120
+ * - deploy: Deploy a Dineway site to a hosting provider
7857
8121
  * - plugin: Plugin management (init, bundle, validate, publish, login, logout)
7858
8122
  */
7859
8123
  const builtInCommands = {