dineway 0.2.0 → 0.2.2

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 (409) hide show
  1. package/README.md +17 -17
  2. package/dist/activity-BDMlkpYY.mjs +79 -0
  3. package/dist/{activity-events-y6eT8UW6.mjs → activity-events-DEYmJhWd.mjs} +1 -77
  4. package/dist/{actor-CrObAPV0.mjs → actor-DA7yL9Yp.mjs} +1 -1
  5. package/dist/{allowed-origins-_oeyP6x-.mjs → allowed-origins-VLgv2PL1.mjs} +1 -1
  6. package/dist/api/route-utils.d.mts +9 -10
  7. package/dist/api/route-utils.mjs +14 -14
  8. package/dist/api/schemas/index.d.mts +2 -2
  9. package/dist/api/schemas/index.mjs +5 -5
  10. package/dist/{api-ByrU2q-Z.mjs → api-DsO87Qak.mjs} +51 -23
  11. package/dist/{api-tokens-CjVMQT-X.mjs → api-tokens-C4K9eocv.mjs} +1 -1
  12. package/dist/{apply-bZswmZPm.mjs → apply-DHT0l398.mjs} +19 -19
  13. package/dist/astro/index.d.mts +10 -11
  14. package/dist/astro/index.mjs +18 -5
  15. package/dist/astro/middleware/auth.d.mts +9 -19
  16. package/dist/astro/middleware/auth.mjs +6 -6
  17. package/dist/astro/middleware/redirect.mjs +5 -5
  18. package/dist/astro/middleware/request-context.mjs +2 -2
  19. package/dist/astro/middleware/seed.d.mts +1 -1
  20. package/dist/astro/middleware/seed.mjs +1 -1
  21. package/dist/astro/middleware/setup.mjs +1 -1
  22. package/dist/astro/middleware.mjs +142 -98
  23. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
  24. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
  25. package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
  26. package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
  27. package/dist/astro/routes/api/admin/briefing.mjs +18 -18
  28. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
  29. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
  30. package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
  31. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
  32. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +16 -16
  33. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +16 -16
  34. package/dist/astro/routes/api/admin/bylines/index.mjs +16 -16
  35. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
  36. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  37. package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
  38. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  39. package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
  40. package/dist/astro/routes/api/admin/context/_id_/history.mjs +25 -24
  41. package/dist/astro/routes/api/admin/context/_id_/index.mjs +25 -24
  42. package/dist/astro/routes/api/admin/context/_id_/review.mjs +30 -29
  43. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +30 -29
  44. package/dist/astro/routes/api/admin/context/diff.mjs +29 -28
  45. package/dist/astro/routes/api/admin/context/index.mjs +30 -29
  46. package/dist/astro/routes/api/admin/context/stale.mjs +29 -28
  47. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +25 -24
  48. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +29 -28
  49. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +29 -28
  50. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +26 -25
  51. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
  52. package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
  53. package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
  54. package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +55 -51
  55. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +55 -51
  56. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +47 -44
  57. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +54 -50
  58. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +54 -50
  59. package/dist/astro/routes/api/admin/plugins/index.mjs +47 -44
  60. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
  61. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +47 -44
  62. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +54 -50
  63. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +47 -44
  64. package/dist/astro/routes/api/admin/plugins/updates.mjs +47 -44
  65. package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
  66. package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +30 -65
  67. package/dist/astro/routes/api/admin/review-requests/index.d.mts +2 -1
  68. package/dist/astro/routes/api/admin/review-requests/index.mjs +58 -11
  69. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +47 -44
  70. package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
  71. package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +47 -44
  72. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
  73. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
  74. package/dist/astro/routes/api/admin/users/_id_/index.mjs +7 -7
  75. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  76. package/dist/astro/routes/api/admin/users/index.mjs +6 -6
  77. package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
  78. package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
  79. package/dist/astro/routes/api/auth/invite/complete.mjs +10 -10
  80. package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
  81. package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
  82. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  83. package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
  84. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  85. package/dist/astro/routes/api/auth/me.mjs +8 -8
  86. package/dist/astro/routes/api/auth/mode.mjs +1 -1
  87. package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
  88. package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
  89. package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
  90. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
  91. package/dist/astro/routes/api/auth/passkey/options.mjs +11 -11
  92. package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
  93. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
  94. package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
  95. package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
  96. package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
  97. package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
  98. package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
  99. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
  100. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
  101. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
  102. package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
  103. package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
  104. package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -5
  105. package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -5
  106. package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -10
  107. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +49 -21
  108. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -5
  109. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
  110. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +67 -33
  111. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +14 -14
  112. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
  113. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
  114. package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -10
  115. package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
  116. package/dist/astro/routes/api/content/_collection_/index.mjs +11 -10
  117. package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
  118. package/dist/astro/routes/api/dashboard.mjs +8 -8
  119. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  120. package/dist/astro/routes/api/health.mjs +1 -1
  121. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  122. package/dist/astro/routes/api/import/probe.mjs +19 -19
  123. package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
  124. package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -9
  125. package/dist/astro/routes/api/import/wordpress/execute.mjs +35 -34
  126. package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -9
  127. package/dist/astro/routes/api/import/wordpress/media.mjs +12 -12
  128. package/dist/astro/routes/api/import/wordpress/prepare.mjs +34 -33
  129. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -10
  130. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +31 -30
  131. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  132. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +22 -22
  133. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -9
  134. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +40 -39
  135. package/dist/astro/routes/api/integrations/_provider_.d.mts +8 -0
  136. package/dist/astro/routes/api/integrations/_provider_.mjs +51 -0
  137. package/dist/astro/routes/api/integrations/index.d.mts +7 -0
  138. package/dist/astro/routes/api/integrations/index.mjs +24 -0
  139. package/dist/astro/routes/api/manifest.mjs +4 -4
  140. package/dist/astro/routes/api/mcp.mjs +474 -167
  141. package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -10
  142. package/dist/astro/routes/api/media/_id_.mjs +8 -8
  143. package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
  144. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
  145. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
  146. package/dist/astro/routes/api/media/providers/index.mjs +2 -2
  147. package/dist/astro/routes/api/media/upload-url.mjs +11 -11
  148. package/dist/astro/routes/api/media.mjs +14 -14
  149. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +30 -29
  150. package/dist/astro/routes/api/menus/_name_/items.mjs +30 -29
  151. package/dist/astro/routes/api/menus/_name_/reorder.mjs +30 -29
  152. package/dist/astro/routes/api/menus/_name_/translations.mjs +30 -29
  153. package/dist/astro/routes/api/menus/_name_.mjs +30 -29
  154. package/dist/astro/routes/api/menus/index.mjs +30 -29
  155. package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
  156. package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
  157. package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
  158. package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
  159. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  160. package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
  161. package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
  162. package/dist/astro/routes/api/oauth/token.mjs +6 -6
  163. package/dist/astro/routes/api/openapi.json.mjs +4 -4
  164. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +20 -5
  165. package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
  166. package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
  167. package/dist/astro/routes/api/redirects/_id_.mjs +31 -30
  168. package/dist/astro/routes/api/redirects/index.mjs +31 -30
  169. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
  170. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
  171. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +49 -45
  172. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +49 -45
  173. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +49 -45
  174. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +49 -45
  175. package/dist/astro/routes/api/schema/collections/index.mjs +49 -45
  176. package/dist/astro/routes/api/schema/index.mjs +8 -8
  177. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +47 -44
  178. package/dist/astro/routes/api/schema/orphans/index.mjs +47 -44
  179. package/dist/astro/routes/api/search/enable.mjs +11 -11
  180. package/dist/astro/routes/api/search/index.mjs +10 -10
  181. package/dist/astro/routes/api/search/rebuild.mjs +11 -11
  182. package/dist/astro/routes/api/search/stats.mjs +6 -6
  183. package/dist/astro/routes/api/search/suggest.mjs +10 -10
  184. package/dist/astro/routes/api/sections/_slug_.mjs +30 -29
  185. package/dist/astro/routes/api/sections/index.mjs +30 -29
  186. package/dist/astro/routes/api/settings/email.mjs +3 -3
  187. package/dist/astro/routes/api/settings.mjs +30 -29
  188. package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
  189. package/dist/astro/routes/api/setup/admin.mjs +10 -10
  190. package/dist/astro/routes/api/setup/dev-bypass.mjs +25 -25
  191. package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
  192. package/dist/astro/routes/api/setup/index.mjs +27 -27
  193. package/dist/astro/routes/api/setup/status.mjs +3 -3
  194. package/dist/astro/routes/api/snapshot.mjs +6 -6
  195. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +33 -32
  196. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +33 -32
  197. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +33 -32
  198. package/dist/astro/routes/api/taxonomies/index.mjs +33 -32
  199. package/dist/astro/routes/api/themes/preview.mjs +4 -4
  200. package/dist/astro/routes/api/typegen.mjs +4 -4
  201. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  202. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
  203. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
  204. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +29 -28
  205. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +30 -29
  206. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +30 -29
  207. package/dist/astro/routes/api/widget-areas/_name_.mjs +27 -26
  208. package/dist/astro/routes/api/widget-areas/index.mjs +30 -29
  209. package/dist/astro/routes/api/widget-components.mjs +2 -2
  210. package/dist/astro/routes/robots.txt.mjs +6 -6
  211. package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
  212. package/dist/astro/routes/sitemap.xml.mjs +7 -7
  213. package/dist/astro/session-driver.d.mts +1 -1
  214. package/dist/astro/session-driver.mjs +2 -2
  215. package/dist/astro/types.d.mts +13 -12
  216. package/dist/{audit-ByVKIwWF.mjs → audit-BzhwRVym.mjs} +1 -1
  217. package/dist/auth/providers/github.d.mts +1 -1
  218. package/dist/auth/providers/google.d.mts +1 -1
  219. package/dist/{auth-control-guard-CqeUmQsv.mjs → auth-control-guard-B_Dx-epW.mjs} +1 -1
  220. package/dist/{authorize-CcBxcHtz.mjs → authorize-D6MkRtPw.mjs} +1 -1
  221. package/dist/{briefing-BJaJI8dm.mjs → briefing-Cl70iEH5.mjs} +1 -1
  222. package/dist/{briefing-CawZ59CY.mjs → briefing-GFhLTLJo.mjs} +7 -7
  223. package/dist/{bundle-7C_DpkEq.mjs → bundle-CIrUlrkQ.mjs} +2 -2
  224. package/dist/{byline-e51-fWRs.mjs → byline-BJa1MyKB.mjs} +6 -6
  225. package/dist/{byline-fields-D-N5qVIG.mjs → byline-fields-BKzA0fJU.mjs} +1 -1
  226. package/dist/{byline-fields-CUvbslGc.d.mts → byline-fields-DxMpdtsZ.d.mts} +57 -47
  227. package/dist/{byline-fields-DOJO16Gm.mjs → byline-fields-yT4herdN.mjs} +10 -4
  228. package/dist/{byline-registry-87nNnYl4.mjs → byline-registry-Ba54M74c.mjs} +2 -2
  229. package/dist/{bylines-CMQNCNFh.mjs → bylines-B53Saxdb.mjs} +3 -3
  230. package/dist/{bylines-y4LO-dTj.mjs → bylines-kixFoaRV.mjs} +5 -5
  231. package/dist/{cache-C-FNTFYK.mjs → cache-fpisdt5Q.mjs} +2 -2
  232. package/dist/{chunks-CxBt-GxR.mjs → chunks-DX_b8_4Z.mjs} +1 -1
  233. package/dist/cli/index.d.mts +29 -1
  234. package/dist/cli/index.mjs +1527 -1222
  235. package/dist/cli/plugin-kit.d.mts +75 -0
  236. package/dist/cli/plugin-kit.mjs +4 -0
  237. package/dist/client/external-auth-headers.d.mts +1 -1
  238. package/dist/client/index.d.mts +27 -52
  239. package/dist/client/index.mjs +34 -7
  240. package/dist/client-factory-DEtHApCc.mjs +323 -0
  241. package/dist/{comment-DlA4iChg.mjs → comment-B88XcvU1.mjs} +1 -1
  242. package/dist/{comment-reaction-DfFao1ST.mjs → comment-reaction-Ckn6vCmB.mjs} +1 -1
  243. package/dist/{comments-DApFGMsP.mjs → comments-BDXsbL7z.mjs} +1 -1
  244. package/dist/{content-Bh4BDjv8.mjs → content-Cbl8HbIR.mjs} +2 -2
  245. package/dist/{content-refresh-CgutSUfO.mjs → content-refresh-BmkilU5M.mjs} +5 -5
  246. package/dist/{context-CK4ym2Sf.mjs → context-AJNd0tcG.mjs} +2 -2
  247. package/dist/{context-C5W3G18y.mjs → context-DT0tIsfw.mjs} +24 -13
  248. package/dist/{context-route-helpers-MASyGgWf.mjs → context-route-helpers-DhP--tTq.mjs} +2 -2
  249. package/dist/{dashboard-DQkVT7Ei.mjs → dashboard-YvDEYbS3.mjs} +4 -4
  250. package/dist/db/index.d.mts +3 -3
  251. package/dist/db/index.mjs +1 -1
  252. package/dist/db/libsql.d.mts +1 -1
  253. package/dist/db/postgres.d.mts +1 -1
  254. package/dist/db/sqlite.d.mts +1 -1
  255. package/dist/{device-flow-BnqRH-T9.mjs → device-flow-BKKeobcV.mjs} +5 -5
  256. package/dist/{enrich-DIFIFA8O.mjs → enrich-Ck9tfMqe.mjs} +1 -1
  257. package/dist/{error-CytFlgcd.mjs → error-BW9f_ynq.mjs} +16 -2
  258. package/dist/{experimental-workflows-BMsUnIAw.mjs → experimental-workflows-CgO73K4e.mjs} +1 -1
  259. package/dist/{field-defs-cache-DRNdhBJv.mjs → field-defs-cache-CiXP3eO3.mjs} +4 -4
  260. package/dist/{fts-manager-Crzypjqu.mjs → fts-manager-Zo9uhGel.mjs} +1 -1
  261. package/dist/{hitl-requests-B4Vbcmaq.mjs → hitl-requests-Bee8Cjj8.mjs} +2 -2
  262. package/dist/{hitl-route-helpers-hEVzvP8l.mjs → hitl-route-helpers-DtHaKGgm.mjs} +5 -5
  263. package/dist/{import-Bh9biJfx.mjs → import-C-zxnT89.mjs} +7 -7
  264. package/dist/{index-D4y6NGiy.d.mts → index-DybFmYtZ.d.mts} +79 -3
  265. package/dist/index.d.mts +15 -17
  266. package/dist/index.mjs +83 -78
  267. package/dist/integration-credentials-D3ZneN0L.mjs +49 -0
  268. package/dist/{jsonld-Dq0gsnOH.d.mts → jsonld-CoTa8I1a.d.mts} +2 -2
  269. package/dist/{load-DmYeniXl.mjs → load-Cuiyh8LT.mjs} +1 -1
  270. package/dist/{loader-CjWqjweO.mjs → loader-WHf22FwU.mjs} +2 -2
  271. package/dist/{manifest-schema-BxVPYMJR.mjs → manifest-schema-DKa3ZaJL.mjs} +6 -2
  272. package/dist/{mcp-reviewed-executor-TwVbMzG6.mjs → mcp-reviewed-executor-DnlF7mIL.mjs} +6 -3
  273. package/dist/media/image-endpoint.mjs +1 -1
  274. package/dist/media/index.d.mts +1 -1
  275. package/dist/media/index.mjs +2 -2
  276. package/dist/media/local-runtime.d.mts +10 -11
  277. package/dist/media/local-runtime.mjs +2 -2
  278. package/dist/{media-DMj0grzC.mjs → media-B4m-cnmj.mjs} +1 -1
  279. package/dist/{media-allowlist-BlVCSzHx.mjs → media-allowlist-BQyIBPzd.mjs} +1 -1
  280. package/dist/{menus-TaW1gKnk.mjs → menus-LYALU2Mf.mjs} +2 -2
  281. package/dist/{menus-xvsnVZXw.mjs → menus-oYfViqfE.mjs} +6 -6
  282. package/dist/{oauth-authorization-DiaGvRVz.mjs → oauth-authorization-CX7aa8Ph.mjs} +5 -5
  283. package/dist/{oauth-clients-Dl9E8dEM.mjs → oauth-clients-D9Gg0WjF.mjs} +2 -2
  284. package/dist/object-cache/memory.d.mts +1 -1
  285. package/dist/output-13u4dvu-.mjs +68 -0
  286. package/dist/page/index.d.mts +9 -3
  287. package/dist/page/index.mjs +1 -1
  288. package/dist/{parse-CbymENaR.mjs → parse-B-Y84oJl.mjs} +1 -1
  289. package/dist/plugin-utils.d.mts +8 -9
  290. package/dist/plugins/adapt-sandbox-entry.d.mts +8 -9
  291. package/dist/plugins/adapt-sandbox-entry.mjs +3 -1
  292. package/dist/{plugins-BolVa-tl.mjs → plugins-B7-4Okii.mjs} +95 -10
  293. package/dist/portable-text-Ehqj3I_y.d.mts +45 -0
  294. package/dist/{preview-vSVg6fwG.mjs → preview-BMIReQGc.mjs} +2 -2
  295. package/dist/{provider-loader-MD8zAbnH.d.mts → provider-loader-BIbIiz0P.d.mts} +1 -1
  296. package/dist/{public-url-gsp3oUbu.d.mts → public-url-DYISdY_R.d.mts} +1 -1
  297. package/dist/publication-authorization-BVQ5rCAF.mjs +985 -0
  298. package/dist/{query-CfRCdaL3.mjs → query-C_m8sn-S.mjs} +13 -13
  299. package/dist/{query-jaAmw8E1.mjs → query-DNczixZr.mjs} +3 -3
  300. package/dist/{rate-limit-ZLdyWoZF.mjs → rate-limit-oUGexQO1.mjs} +2 -2
  301. package/dist/{redirect-BAjt4Z6b.mjs → redirect-DoDgOWIA.mjs} +2 -2
  302. package/dist/{redirects-BTdwpQtE.mjs → redirects-CrP6U4hZ.mjs} +4 -4
  303. package/dist/{redirects-CA-xylPG.mjs → redirects-E_B6hvuz.mjs} +18 -10
  304. package/dist/{registry-CtyVedcN.mjs → registry-SEJqFliS.mjs} +24 -10
  305. package/dist/{request-meta-CUypToDJ.mjs → request-meta-DHFIzWcf.mjs} +1 -1
  306. package/dist/review-payload-BysRWpxS.mjs +111 -0
  307. package/dist/{review-requests-DUyEmtmG.mjs → review-requests-CObSuTYU.mjs} +1 -1
  308. package/dist/review-requests-Cu9051_B.mjs +142 -0
  309. package/dist/review-route-helpers-Dp_7PH8r.mjs +41 -0
  310. package/dist/{runner-1tC2tIRV.d.mts → runner-Bcy5w0vj.d.mts} +1 -1
  311. package/dist/{runner-DB7CRfOF.mjs → runner-BfWbi9YY.mjs} +1166 -447
  312. package/dist/runtime.d.mts +9 -10
  313. package/dist/runtime.mjs +3 -3
  314. package/dist/schema-Dk_N31V4.mjs +8 -0
  315. package/dist/{search-DSaLgEFI.mjs → search-BXEQepxL.mjs} +3 -3
  316. package/dist/{secrets-CDZo2k8L.mjs → secrets-CpGpyGcO.mjs} +1 -1
  317. package/dist/{sections-PVVXHGfp.mjs → sections-DxvEF6Bj.mjs} +2 -2
  318. package/dist/seed/index.d.mts +2 -2
  319. package/dist/seed/index.mjs +19 -19
  320. package/dist/seo/index.d.mts +1 -1
  321. package/dist/seo/index.mjs +1 -1
  322. package/dist/{seo-CQG3GCHQ.mjs → seo-D1RiaooQ.mjs} +1 -1
  323. package/dist/service-CY0aH6eI.mjs +347 -0
  324. package/dist/{service-DiN4ZuPp.mjs → service-QdG0YHws.mjs} +2 -2
  325. package/dist/{settings-i4VPP8bT.mjs → settings-Dje-PHXo.mjs} +2 -2
  326. package/dist/{settings-BbqgHWpU.mjs → settings-SVDAB7_W.mjs} +5 -5
  327. package/dist/{site-activity-Dy3FROs0.mjs → site-activity-BVK40wCy.mjs} +1 -1
  328. package/dist/{site-context-DQiL8Fl5.mjs → site-context-CzaEGizi.mjs} +565 -129
  329. package/dist/stable-hash-DshcXvRE.mjs +19 -0
  330. package/dist/storage/local.d.mts +1 -1
  331. package/dist/storage/local.mjs +1 -1
  332. package/dist/storage/s3.d.mts +1 -1
  333. package/dist/storage/s3.mjs +1 -1
  334. package/dist/store-CCfMD6nw.mjs +262 -0
  335. package/dist/{taxonomies-9s-v03H-.mjs → taxonomies-DuhGjBa8.mjs} +3 -3
  336. package/dist/{taxonomies-DRiixp_E.mjs → taxonomies-WVnFki0o.mjs} +6 -6
  337. package/dist/{taxonomy-Dvsw6BOs.mjs → taxonomy-CCo2plmV.mjs} +2 -2
  338. package/dist/{types-DU0bU2Wu.d.mts → types-BFeoAIHl.d.mts} +596 -2
  339. package/dist/{types-Dq1qT19x.mjs → types-Bshd_6wQ.mjs} +1 -1
  340. package/dist/{runtime-BOeiQsCv.d.mts → types-CJezJeNE.d.mts} +3561 -1355
  341. package/dist/{types-4garmdWa.mjs → types-CK0r-Xq4.mjs} +5 -2
  342. package/dist/{types-C_ly5eTp.d.mts → types-GtwhHAg8.d.mts} +1 -1
  343. package/dist/{types-DW_-sFyz.d.mts → types-ywmuDETA.d.mts} +2 -0
  344. package/dist/ui/server-runtime.d.mts +12 -14
  345. package/dist/ui/server-runtime.mjs +21 -21
  346. package/dist/{user-BIZPzCb9.mjs → user-Bcvr5ihC.mjs} +2 -2
  347. package/dist/{utils-CMDhr5Xd.mjs → utils-B7gemXz5.mjs} +1 -1
  348. package/dist/{validate-CZvb-BKB.d.mts → validate-YiX3rly5.d.mts} +59 -5
  349. package/dist/{validate-DNs0pTSc.mjs → validate-qKzI3BCv.mjs} +2 -2
  350. package/dist/version-DEAV9k58.mjs +6 -0
  351. package/dist/{widgets-f0ibZUIq.mjs → widgets-DyGcotPM.mjs} +3 -3
  352. package/dist/{wordpress-slugs-BhHJX8XE.mjs → wordpress-slugs-D_LfQCan.mjs} +1 -1
  353. package/dist/{zod-generator-B7TMjyFJ.mjs → zod-generator-Cr3SiHsc.mjs} +2 -2
  354. package/package.json +16 -6
  355. package/dist/hitl-Hw1RmWOq.mjs +0 -677
  356. package/dist/review-requests-C9Ff11Vq.mjs +0 -79
  357. package/dist/schema-DXdYj4R3.mjs +0 -8
  358. package/dist/types-C46EvNdc.d.mts +0 -56
  359. package/dist/types-C8XW6L19.d.mts +0 -1468
  360. package/dist/version-BTvfRGc6.mjs +0 -6
  361. /package/dist/{adapters-NVSs4UH7.d.mts → adapters-DnMDRQ4e.d.mts} +0 -0
  362. /package/dist/{api-tokens-2r7OWi_I.mjs → api-tokens-D4tcY8R6.mjs} +0 -0
  363. /package/dist/{challenge-store-Bjlepa2E.mjs → challenge-store-BMkL2kmt.mjs} +0 -0
  364. /package/dist/{components-Bclf98Be.mjs → components-D0w9MzQe.mjs} +0 -0
  365. /package/dist/{context-types-DqTo6C79.mjs → context-types-eBuMDAg-.mjs} +0 -0
  366. /package/dist/{cron-cKcNTix_.mjs → cron-D_c3WUPN.mjs} +0 -0
  367. /package/dist/{default--K40jqm0.mjs → default-BxoI3SoK.mjs} +0 -0
  368. /package/dist/{email-console-ChgKFO8-.mjs → email-console-BEMwuxhV.mjs} +0 -0
  369. /package/dist/{escape-Bd4P_xKg.mjs → escape-smSUOb7u.mjs} +0 -0
  370. /package/dist/{hash-BPmX6P8I.mjs → hash-mxxx2oPW.mjs} +0 -0
  371. /package/dist/{media-url-lEKSrpr9.mjs → media-url-B6d-yVI6.mjs} +0 -0
  372. /package/dist/{mime-CA7Lgovc.mjs → mime-C0vOHFm7.mjs} +0 -0
  373. /package/dist/{mode-C4CIyjtR.mjs → mode-DPC7segX.mjs} +0 -0
  374. /package/dist/{normalize-5ek_z7de.mjs → normalize-Cyt7JdF7.mjs} +0 -0
  375. /package/dist/{oauth-state-store-CNoXafF7.mjs → oauth-state-store-DPVzeoyY.mjs} +0 -0
  376. /package/dist/{oauth-user-lookup-Ygw4bNyt.mjs → oauth-user-lookup-3E5jlXrr.mjs} +0 -0
  377. /package/dist/{parser-C1nYd-81.mjs → parser-DX_c5iG3.mjs} +0 -0
  378. /package/dist/{passkey-config-BUwu8BA3.mjs → passkey-config-DE_0EGEP.mjs} +0 -0
  379. /package/dist/{patterns-BhAvqO0S.mjs → patterns-CoqlXUvk.mjs} +0 -0
  380. /package/dist/{placeholder-uvNRZBX9.d.mts → placeholder-C6ZjZcmJ.d.mts} +0 -0
  381. /package/dist/{portable-text-dA_UlJwW.mjs → portable-text-BASHceim.mjs} +0 -0
  382. /package/dist/{process-cache-7xgAO9JY.mjs → process-cache-CCDgti7j.mjs} +0 -0
  383. /package/dist/{provider-loader-D0w9dqjm.mjs → provider-loader-BeQcnPN1.mjs} +0 -0
  384. /package/dist/{public-url-BEz_sM9n.mjs → public-url-BA-7LKvQ.mjs} +0 -0
  385. /package/dist/{redirect-wphRBv4y.mjs → redirect-CZFAqHLr.mjs} +0 -0
  386. /package/dist/{request-cache-D9GQBxMP.mjs → request-cache-CBFjCwSt.mjs} +0 -0
  387. /package/dist/{resolve-Cb6Dbz-C.mjs → resolve-B6BpqwAR.mjs} +0 -0
  388. /package/dist/{seo-qa7Dn0jK.mjs → seo-BLszyJxd.mjs} +0 -0
  389. /package/dist/{seo-contributions-C1EnikHB.mjs → seo-contributions-Ci8_12_r.mjs} +0 -0
  390. /package/dist/{session-user-CAKImna3.mjs → session-user-BwliEFp0.mjs} +0 -0
  391. /package/dist/{setup-complete-B8fl-mjV.mjs → setup-complete-PvF8I7Oh.mjs} +0 -0
  392. /package/dist/{setup-nonce-CoyjILvW.mjs → setup-nonce-DkpYROqg.mjs} +0 -0
  393. /package/dist/{sidecar-client-C3mqXg4C.mjs → sidecar-client-dt5fv23q.mjs} +0 -0
  394. /package/dist/{site-url-BML3GQYm.mjs → site-url-DfYDZyWl.mjs} +0 -0
  395. /package/dist/{ssrf-DWe8jwAp.mjs → ssrf-BZHvtFEv.mjs} +0 -0
  396. /package/dist/{status-DANd8ERo.mjs → status-BN40hMpr.mjs} +0 -0
  397. /package/dist/{tokens-1RK1n6ED.mjs → tokens-DIzhPT80.mjs} +0 -0
  398. /package/dist/{transaction-C2EOMTJA.mjs → transaction-0LEAAy8R.mjs} +0 -0
  399. /package/dist/{transport-CcJu3Co8.d.mts → transport-BZ3aqdu7.d.mts} +0 -0
  400. /package/dist/{transport-BNmCqLu7.mjs → transport-C46KHLMP.mjs} +0 -0
  401. /package/dist/{trusted-proxy-DTXQ2IMv.mjs → trusted-proxy-czZuby6G.mjs} +0 -0
  402. /package/dist/{types-B3t5cxhU.mjs → types-B7TDDFMG.mjs} +0 -0
  403. /package/dist/{types-CDpH6MA4.d.mts → types-BsTXSvKG.d.mts} +0 -0
  404. /package/dist/{types-DF7ZuGGk.d.mts → types-CDcuRd4z.d.mts} +0 -0
  405. /package/dist/{types-Rc3gQqqw.d.mts → types-S9VIopdY.d.mts} +0 -0
  406. /package/dist/{types-POH8PQZh.d.mts → types-YxFz4lDr.d.mts} +0 -0
  407. /package/dist/{types-C5CVgwsV.mjs → types-gvNBqijt.mjs} +0 -0
  408. /package/dist/{url-CpyFDFpO.mjs → url-D282S1Zw.mjs} +0 -0
  409. /package/dist/{url-Cac7a9QZ.mjs → url-guoXQQcV.mjs} +0 -0
@@ -0,0 +1,75 @@
1
+ import { DinewayClient, PluginRequestOptions } from "../client/index.mjs";
2
+ import { SubCommandsDef } from "citty";
3
+
4
+ //#region src/cli/contributions.d.ts
5
+ interface DinewayCliContribution {
6
+ commands: SubCommandsDef;
7
+ }
8
+ //#endregion
9
+ //#region src/cli/client-factory.d.ts
10
+ interface ClientArgs {
11
+ url?: string;
12
+ token?: string;
13
+ }
14
+ /**
15
+ * Shared connection args for all CLI commands that talk to a Dineway instance.
16
+ * Spread into each command's `args` definition.
17
+ */
18
+ declare const connectionArgs: {
19
+ url: {
20
+ type: "string";
21
+ alias: string;
22
+ description: string;
23
+ default: string;
24
+ };
25
+ token: {
26
+ type: "string";
27
+ alias: string;
28
+ description: string;
29
+ };
30
+ header: {
31
+ type: "string";
32
+ alias: string;
33
+ description: string;
34
+ };
35
+ json: {
36
+ type: "boolean";
37
+ description: string;
38
+ };
39
+ };
40
+ /**
41
+ * Create a DinewayClient from CLI args, env vars, and stored credentials.
42
+ *
43
+ * Auth resolution order:
44
+ * 1. --token flag
45
+ * 2. DINEWAY_TOKEN env var
46
+ * 3. Stored credentials (~/.config/dineway/auth.json)
47
+ * 4. Dev bypass (if URL is localhost)
48
+ *
49
+ * Custom headers are merged from (in priority order):
50
+ * 1. Stored credentials (persisted during `dineway login --header`)
51
+ * 2. DINEWAY_HEADERS env var
52
+ * 3. --header CLI flags
53
+ */
54
+ declare function createClientFromArgs(args: ClientArgs): DinewayClient;
55
+ //#endregion
56
+ //#region src/cli/output.d.ts
57
+ interface OutputArgs {
58
+ json?: boolean;
59
+ }
60
+ /**
61
+ * Redirect consola output to stderr so it doesn't pollute JSON on stdout.
62
+ *
63
+ * Call this early in any command that uses `output()` with `--json`.
64
+ * Safe to call multiple times — only applies the redirect once.
65
+ */
66
+ declare function configureOutputMode(args: OutputArgs): void;
67
+ /**
68
+ * Output data as JSON or pretty-printed.
69
+ *
70
+ * If stdout is not a TTY or --json is set, outputs JSON.
71
+ * Otherwise, outputs a formatted representation.
72
+ */
73
+ declare function output(data: unknown, args: OutputArgs): void;
74
+ //#endregion
75
+ export { type DinewayCliContribution, type PluginRequestOptions, configureOutputMode, connectionArgs, createClientFromArgs, output };
@@ -0,0 +1,4 @@
1
+ import { n as output, t as configureOutputMode } from "../output-13u4dvu-.mjs";
2
+ import { n as connectionArgs, r as createClientFromArgs } from "../client-factory-DEtHApCc.mjs";
3
+
4
+ export { configureOutputMode, connectionArgs, createClientFromArgs, output };
@@ -1,4 +1,4 @@
1
- import { t as Interceptor } from "../transport-CcJu3Co8.mjs";
1
+ import { t as Interceptor } from "../transport-BZ3aqdu7.mjs";
2
2
 
3
3
  //#region src/client/external-auth-headers.d.ts
4
4
  /**
@@ -1,49 +1,6 @@
1
- import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-CcJu3Co8.mjs";
1
+ import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-BZ3aqdu7.mjs";
2
+ import { n as markdownToPortableText, r as portableTextToMarkdown, t as PortableTextBlock } from "../portable-text-Ehqj3I_y.mjs";
2
3
 
3
- //#region src/client/portable-text.d.ts
4
- /**
5
- * Portable Text <-> Markdown conversion layer.
6
- *
7
- * Three tiers of block handling:
8
- * Tier 1: Standard PT blocks <-> standard Markdown (headings, paragraphs, lists, etc.)
9
- * Tier 2: Dineway custom blocks <-> Markdown directives (future)
10
- * Tier 3: Unknown blocks <-> opaque HTML comment fences (preserved, not editable)
11
- */
12
- /** Minimal Portable Text block shape */
13
- interface PortableTextBlock {
14
- _type: string;
15
- _key?: string;
16
- style?: string;
17
- level?: number;
18
- listItem?: string;
19
- markDefs?: MarkDef[];
20
- children?: PortableTextSpan[];
21
- [key: string]: unknown;
22
- }
23
- interface PortableTextSpan {
24
- _type: string;
25
- _key?: string;
26
- text?: string;
27
- marks?: string[];
28
- [key: string]: unknown;
29
- }
30
- interface MarkDef {
31
- _key: string;
32
- _type: string;
33
- href?: string;
34
- [key: string]: unknown;
35
- }
36
- /**
37
- * Convert Portable Text blocks to Markdown.
38
- * Unknown block types are serialized as opaque fences.
39
- */
40
- declare function portableTextToMarkdown(blocks: PortableTextBlock[]): string;
41
- /**
42
- * Convert Markdown to Portable Text blocks.
43
- * Opaque fences (<!--ec:block ... -->) are deserialized and spliced back in.
44
- */
45
- declare function markdownToPortableText(markdown: string): PortableTextBlock[];
46
- //#endregion
47
4
  //#region src/client/index.d.ts
48
5
  interface DinewayClientOptions {
49
6
  /** Base URL of the Dineway instance */
@@ -59,6 +16,11 @@ interface DinewayClientOptions {
59
16
  /** Additional request interceptors */
60
17
  interceptors?: Interceptor[];
61
18
  }
19
+ interface PluginRequestOptions {
20
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
21
+ query?: Record<string, string | number | boolean | null | undefined>;
22
+ body?: unknown;
23
+ }
62
24
  /** Standard API error shape */
63
25
  interface ApiError {
64
26
  code: string;
@@ -93,6 +55,18 @@ interface ContentItem {
93
55
  translationGroup: string | null;
94
56
  _rev?: string;
95
57
  }
58
+ interface ContentPublishOptions {
59
+ reviewRequestId: string;
60
+ releaseAuthorizationId?: string;
61
+ publishedAt?: string;
62
+ locale?: string;
63
+ }
64
+ interface ContentScheduleOptions {
65
+ at: string;
66
+ reviewRequestId: string;
67
+ releaseAuthorizationId?: string;
68
+ locale?: string;
69
+ }
96
70
  /** Collection metadata */
97
71
  interface Collection {
98
72
  slug: string;
@@ -105,6 +79,7 @@ interface Collection {
105
79
  /** Collection with fields */
106
80
  interface CollectionWithFields extends Collection {
107
81
  fields: Field[];
82
+ schemaFingerprint: string;
108
83
  }
109
84
  /** Field metadata */
110
85
  interface Field {
@@ -320,14 +295,12 @@ declare class DinewayClient {
320
295
  }): Promise<ContentItem>;
321
296
  /** Delete (soft) a content item */
322
297
  delete(collection: string, id: string): Promise<void>;
323
- /** Publish a content item */
324
- publish(collection: string, id: string): Promise<void>;
298
+ /** Publish an exact, editorially approved Draft Revision */
299
+ publish(collection: string, id: string, options: ContentPublishOptions): Promise<void>;
325
300
  /** Unpublish a content item */
326
301
  unpublish(collection: string, id: string): Promise<void>;
327
- /** Schedule publishing */
328
- schedule(collection: string, id: string, options: {
329
- at: string;
330
- }): Promise<void>;
302
+ /** Schedule an exact, editorially approved Draft Revision */
303
+ schedule(collection: string, id: string, options: ContentScheduleOptions): Promise<void>;
331
304
  /** Restore a trashed content item */
332
305
  restore(collection: string, id: string): Promise<void>;
333
306
  /** Compare live and draft revisions */
@@ -394,6 +367,8 @@ declare class DinewayClient {
394
367
  menu(name: string): Promise<MenuWithItems>;
395
368
  /** Create a one-time browser setup link for the current admin user. */
396
369
  createSetupLink(): Promise<SetupLinkResult>;
370
+ /** Invoke a deterministic application-service route contributed by an active plugin. */
371
+ pluginRequest<T>(pluginId: string, routePath: string, options?: PluginRequestOptions): Promise<T>;
397
372
  /** Make a typed JSON request to the API */
398
373
  private request;
399
374
  /** Make a raw request — caller handles response */
@@ -404,4 +379,4 @@ declare class DinewayClient {
404
379
  private getFieldSchemas;
405
380
  }
406
381
  //#endregion
407
- export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, type PortableTextBlock, SchemaExport, SearchResult, SetupLinkResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
382
+ export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, ContentPublishOptions, ContentScheduleOptions, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, PluginRequestOptions, type PortableTextBlock, SchemaExport, SearchResult, SetupLinkResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
@@ -1,5 +1,5 @@
1
- import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-dA_UlJwW.mjs";
2
- import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-BNmCqLu7.mjs";
1
+ import { i as portableTextToMarkdown, n as convertDataForWrite, r as markdownToPortableText, t as convertDataForRead } from "../portable-text-BASHceim.mjs";
2
+ import { a as tokenInterceptor, i as refreshInterceptor, n as csrfInterceptor, r as devBypassInterceptor, t as createTransport } from "../transport-C46KHLMP.mjs";
3
3
  import mime from "mime/lite";
4
4
 
5
5
  //#region src/client/index.ts
@@ -22,6 +22,8 @@ import mime from "mime/lite";
22
22
  * ```
23
23
  */
24
24
  const TRAILING_SLASH_PATTERN = /\/$/;
25
+ const LEADING_TRAILING_SLASH_PATTERN = /^\/+|\/+$/g;
26
+ const PLUGIN_ID_PATTERN = /^[a-z][a-z0-9-]*$/;
25
27
  function mimeFromFilename(filename) {
26
28
  return mime.getType(filename) ?? "application/octet-stream";
27
29
  }
@@ -189,17 +191,31 @@ var DinewayClient = class {
189
191
  async delete(collection, id) {
190
192
  await this.request("DELETE", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}`);
191
193
  }
192
- /** Publish a content item */
193
- async publish(collection, id) {
194
- await this.request("POST", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}/publish`);
194
+ /** Publish an exact, editorially approved Draft Revision */
195
+ async publish(collection, id, options) {
196
+ const params = new URLSearchParams();
197
+ if (options.locale) params.set("locale", options.locale);
198
+ const qs = params.toString();
199
+ await this.request("POST", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}/publish${qs ? `?${qs}` : ""}`, {
200
+ reviewRequestId: options.reviewRequestId,
201
+ releaseAuthorizationId: options.releaseAuthorizationId,
202
+ publishedAt: options.publishedAt
203
+ });
195
204
  }
196
205
  /** Unpublish a content item */
197
206
  async unpublish(collection, id) {
198
207
  await this.request("POST", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}/unpublish`);
199
208
  }
200
- /** Schedule publishing */
209
+ /** Schedule an exact, editorially approved Draft Revision */
201
210
  async schedule(collection, id, options) {
202
- await this.request("POST", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}/schedule`, { scheduledAt: options.at });
211
+ const params = new URLSearchParams();
212
+ if (options.locale) params.set("locale", options.locale);
213
+ const qs = params.toString();
214
+ await this.request("POST", `/content/${encodeURIComponent(collection)}/${encodeURIComponent(id)}/schedule${qs ? `?${qs}` : ""}`, {
215
+ scheduledAt: options.at,
216
+ reviewRequestId: options.reviewRequestId,
217
+ releaseAuthorizationId: options.releaseAuthorizationId
218
+ });
203
219
  }
204
220
  /** Restore a trashed content item */
205
221
  async restore(collection, id) {
@@ -292,6 +308,17 @@ var DinewayClient = class {
292
308
  async createSetupLink() {
293
309
  return this.request("POST", "/auth/setup-token");
294
310
  }
311
+ /** Invoke a deterministic application-service route contributed by an active plugin. */
312
+ async pluginRequest(pluginId, routePath, options = {}) {
313
+ if (!PLUGIN_ID_PATTERN.test(pluginId)) throw new Error("Invalid plugin ID");
314
+ const segments = routePath.replace(LEADING_TRAILING_SLASH_PATTERN, "").split("/");
315
+ if (segments.length === 0 || segments.some((segment) => !segment || segment === "." || segment === "..")) throw new Error("Invalid plugin route path");
316
+ const encodedPath = segments.map((segment) => encodeURIComponent(segment)).join("/");
317
+ const query = new URLSearchParams();
318
+ for (const [key, value] of Object.entries(options.query ?? {})) if (value !== void 0 && value !== null) query.set(key, String(value));
319
+ const suffix = query.size > 0 ? `?${query.toString()}` : "";
320
+ return this.request(options.method ?? "GET", `/plugins/${encodeURIComponent(pluginId)}/${encodedPath}${suffix}`, options.body);
321
+ }
295
322
  /** Make a typed JSON request to the API */
296
323
  async request(method, path, body) {
297
324
  const response = await this.requestRaw(method, path, body);
@@ -0,0 +1,323 @@
1
+ import { a as __exportAll } from "./runner-BfWbi9YY.mjs";
2
+ import { customHeadersInterceptor, resolveCustomHeaders } from "./client/external-auth-headers.mjs";
3
+ import { DinewayClient } from "./client/index.mjs";
4
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
5
+ import { join, resolve } from "node:path";
6
+ import { readFile, writeFile } from "node:fs/promises";
7
+ import { homedir } from "node:os";
8
+
9
+ //#region src/cli/credentials.ts
10
+ /**
11
+ * Credential storage for CLI auth tokens.
12
+ *
13
+ * Stores OAuth tokens in ~/.config/dineway/auth.json.
14
+ * Remote URLs are keyed by origin, local dev by project path.
15
+ */
16
+ function getConfigDir() {
17
+ const xdg = process.env["XDG_CONFIG_HOME"];
18
+ if (xdg) return join(xdg, "dineway");
19
+ return join(homedir(), ".config", "dineway");
20
+ }
21
+ function getCredentialPath() {
22
+ return join(getConfigDir(), "auth.json");
23
+ }
24
+ /**
25
+ * Resolve the credential key for a given URL.
26
+ *
27
+ * Remote URLs are keyed by origin (e.g. "https://my-site.pages.dev").
28
+ * Local dev instances are keyed by project path (e.g. "path:/Users/matt/sites/blog").
29
+ */
30
+ function resolveCredentialKey(baseUrl) {
31
+ try {
32
+ const url = new URL(baseUrl);
33
+ if (url.hostname === "localhost" || url.hostname === "127.0.0.1" || url.hostname === "[::1]") {
34
+ const projectPath = findProjectRoot(process.cwd());
35
+ if (projectPath) return `path:${projectPath}`;
36
+ return url.origin;
37
+ }
38
+ return url.origin;
39
+ } catch {
40
+ return baseUrl;
41
+ }
42
+ }
43
+ /**
44
+ * Walk up from cwd to find the project root (directory containing astro.config.*).
45
+ */
46
+ function findProjectRoot(from) {
47
+ let dir = resolve(from);
48
+ const root = resolve("/");
49
+ while (dir !== root) {
50
+ for (const name of [
51
+ "astro.config.ts",
52
+ "astro.config.mts",
53
+ "astro.config.js",
54
+ "astro.config.mjs"
55
+ ]) if (existsSync(join(dir, name))) return dir;
56
+ const parent = resolve(dir, "..");
57
+ if (parent === dir) break;
58
+ dir = parent;
59
+ }
60
+ return null;
61
+ }
62
+ function readStore() {
63
+ const path = getCredentialPath();
64
+ try {
65
+ if (existsSync(path)) {
66
+ const content = readFileSync(path, "utf-8");
67
+ return JSON.parse(content);
68
+ }
69
+ } catch {}
70
+ return {};
71
+ }
72
+ function writeStore(store) {
73
+ mkdirSync(getConfigDir(), {
74
+ recursive: true,
75
+ mode: 448
76
+ });
77
+ writeFileSync(getCredentialPath(), JSON.stringify(store, null, " "), {
78
+ encoding: "utf-8",
79
+ mode: 384
80
+ });
81
+ }
82
+ /**
83
+ * Get stored credentials for a URL.
84
+ */
85
+ function getCredentials(baseUrl) {
86
+ const key = resolveCredentialKey(baseUrl);
87
+ const cred = readStore()[key];
88
+ if (!cred || !("accessToken" in cred)) return null;
89
+ return cred;
90
+ }
91
+ /**
92
+ * Save credentials for a URL.
93
+ */
94
+ function saveCredentials(baseUrl, cred) {
95
+ const key = resolveCredentialKey(baseUrl);
96
+ const store = readStore();
97
+ store[key] = cred;
98
+ writeStore(store);
99
+ }
100
+ /**
101
+ * Remove credentials for a URL.
102
+ */
103
+ function removeCredentials(baseUrl) {
104
+ const key = resolveCredentialKey(baseUrl);
105
+ const store = readStore();
106
+ if (key in store) {
107
+ delete store[key];
108
+ writeStore(store);
109
+ return true;
110
+ }
111
+ return false;
112
+ }
113
+ function marketplaceKey(registryUrl) {
114
+ try {
115
+ return `marketplace:${new URL(registryUrl).origin}`;
116
+ } catch {
117
+ return `marketplace:${registryUrl}`;
118
+ }
119
+ }
120
+ /**
121
+ * Get stored marketplace credential for a registry URL.
122
+ */
123
+ function getMarketplaceCredential(registryUrl) {
124
+ const key = marketplaceKey(registryUrl);
125
+ const cred = readStore()[key];
126
+ if (!cred || !("token" in cred)) return null;
127
+ if (new Date(cred.expiresAt) < /* @__PURE__ */ new Date()) return null;
128
+ return cred;
129
+ }
130
+ /**
131
+ * Save marketplace credential for a registry URL.
132
+ */
133
+ function saveMarketplaceCredential(registryUrl, cred) {
134
+ const key = marketplaceKey(registryUrl);
135
+ const store = readStore();
136
+ store[key] = cred;
137
+ writeStore(store);
138
+ }
139
+ /**
140
+ * Remove marketplace credential for a registry URL.
141
+ */
142
+ function removeMarketplaceCredential(registryUrl) {
143
+ const key = marketplaceKey(registryUrl);
144
+ const store = readStore();
145
+ if (key in store) {
146
+ delete store[key];
147
+ writeStore(store);
148
+ return true;
149
+ }
150
+ return false;
151
+ }
152
+
153
+ //#endregion
154
+ //#region src/cli/project-env.ts
155
+ const DEFAULT_DINEWAY_URL = "http://localhost:4321";
156
+ const ENV_KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
157
+ const LINE_SPLIT_PATTERN = /\r?\n/;
158
+ const DINEWAY_LOCAL_STATE_GITIGNORE_COMMENT = "# Dineway local state";
159
+ const DINEWAY_LOCAL_STATE_GITIGNORE_ENTRIES = [
160
+ ".dineway/deploy.json",
161
+ ".dineway/forgeway.json",
162
+ ".dineway/types.ts",
163
+ ".dineway/schema.json",
164
+ ".dineway/uploads/"
165
+ ];
166
+ const NEWLINE_PATTERN = /\r?\n/g;
167
+ function parseDotenvValue(value) {
168
+ const trimmed = value.trim();
169
+ if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
170
+ return trimmed;
171
+ }
172
+ function parseDotenv(text) {
173
+ const env = {};
174
+ for (const line of text.split(LINE_SPLIT_PATTERN)) {
175
+ const trimmed = line.trim();
176
+ if (!trimmed || trimmed.startsWith("#")) continue;
177
+ const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
178
+ const equalsIndex = normalized.indexOf("=");
179
+ if (equalsIndex <= 0) continue;
180
+ const key = normalized.slice(0, equalsIndex).trim();
181
+ if (!ENV_KEY_PATTERN.test(key)) continue;
182
+ env[key] = parseDotenvValue(normalized.slice(equalsIndex + 1));
183
+ }
184
+ return env;
185
+ }
186
+ function readProjectEnv(cwd = process.cwd()) {
187
+ const envPath = join(cwd, ".env");
188
+ if (!existsSync(envPath)) return {};
189
+ return parseDotenv(readFileSync(envPath, "utf-8"));
190
+ }
191
+ function getProjectEnvValue(name, cwd = process.cwd()) {
192
+ return process.env[name] ?? readProjectEnv(cwd)[name];
193
+ }
194
+ function resolveDinewayBaseUrl(url, cwd = process.cwd()) {
195
+ if (url && url !== DEFAULT_DINEWAY_URL) return url;
196
+ const projectEnv = readProjectEnv(cwd);
197
+ return process.env["DINEWAY_URL"] ?? process.env["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_URL"] ?? url ?? DEFAULT_DINEWAY_URL;
198
+ }
199
+ function resolveDinewayToken(token, cwd = process.cwd()) {
200
+ return token ?? getProjectEnvValue("DINEWAY_TOKEN", cwd);
201
+ }
202
+ function formatEnvValue(value) {
203
+ return value.replace(NEWLINE_PATTERN, "");
204
+ }
205
+ async function upsertProjectEnv(cwd, values) {
206
+ const envPath = join(cwd, ".env");
207
+ const existing = await readFile(envPath, "utf-8").catch(() => "");
208
+ const lines = existing ? existing.split(LINE_SPLIT_PATTERN) : [];
209
+ const seen = /* @__PURE__ */ new Set();
210
+ const nextLines = lines.map((line) => {
211
+ const trimmed = line.trim();
212
+ const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
213
+ const equalsIndex = normalized.indexOf("=");
214
+ if (equalsIndex <= 0) return line;
215
+ const key = normalized.slice(0, equalsIndex).trim();
216
+ const value = values[key];
217
+ if (!(key in values) || value === void 0) return line;
218
+ seen.add(key);
219
+ return `${key}=${formatEnvValue(value)}`;
220
+ });
221
+ for (const [key, value] of Object.entries(values)) {
222
+ if (value === void 0 || seen.has(key)) continue;
223
+ nextLines.push(`${key}=${formatEnvValue(value)}`);
224
+ }
225
+ await writeFile(envPath, `${nextLines.filter((line, index) => line || index < nextLines.length - 1).join("\n")}\n`, "utf-8");
226
+ }
227
+ async function ensureProjectGitignoreEntry(cwd, entry) {
228
+ const gitignorePath = join(cwd, ".gitignore");
229
+ const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
230
+ if (existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()).includes(entry)) return;
231
+ await writeFile(gitignorePath, `${existing}${existing && !existing.endsWith("\n") ? "\n" : ""}${entry}\n`, "utf-8");
232
+ }
233
+ async function ensureProjectGitignoreDinewayLocalState(cwd) {
234
+ const gitignorePath = join(cwd, ".gitignore");
235
+ const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
236
+ const lines = new Set(existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()));
237
+ const missingEntries = DINEWAY_LOCAL_STATE_GITIGNORE_ENTRIES.filter((entry) => !lines.has(entry));
238
+ if (missingEntries.length === 0) return;
239
+ const block = [DINEWAY_LOCAL_STATE_GITIGNORE_COMMENT, ...missingEntries].join("\n");
240
+ await writeFile(gitignorePath, `${existing}${existing.trim() ? existing.endsWith("\n") ? "\n" : "\n\n" : ""}${block}\n`, "utf-8");
241
+ }
242
+
243
+ //#endregion
244
+ //#region src/cli/client-factory.ts
245
+ var client_factory_exports = /* @__PURE__ */ __exportAll({
246
+ connectionArgs: () => connectionArgs,
247
+ createClientFromArgs: () => createClientFromArgs
248
+ });
249
+ /**
250
+ * Shared connection args for all CLI commands that talk to a Dineway instance.
251
+ * Spread into each command's `args` definition.
252
+ */
253
+ const connectionArgs = {
254
+ url: {
255
+ type: "string",
256
+ alias: "u",
257
+ description: "Dineway instance URL",
258
+ default: DEFAULT_DINEWAY_URL
259
+ },
260
+ token: {
261
+ type: "string",
262
+ alias: "t",
263
+ description: "Auth token"
264
+ },
265
+ header: {
266
+ type: "string",
267
+ alias: "H",
268
+ description: "Custom header \"Name: Value\" (repeatable, or use DINEWAY_HEADERS env)"
269
+ },
270
+ json: {
271
+ type: "boolean",
272
+ description: "Output as JSON"
273
+ }
274
+ };
275
+ /**
276
+ * Create a DinewayClient from CLI args, env vars, and stored credentials.
277
+ *
278
+ * Auth resolution order:
279
+ * 1. --token flag
280
+ * 2. DINEWAY_TOKEN env var
281
+ * 3. Stored credentials (~/.config/dineway/auth.json)
282
+ * 4. Dev bypass (if URL is localhost)
283
+ *
284
+ * Custom headers are merged from (in priority order):
285
+ * 1. Stored credentials (persisted during `dineway login --header`)
286
+ * 2. DINEWAY_HEADERS env var
287
+ * 3. --header CLI flags
288
+ */
289
+ function createClientFromArgs(args) {
290
+ const baseUrl = resolveDinewayBaseUrl(args.url);
291
+ let token = resolveDinewayToken(args.token);
292
+ const isLocal = baseUrl.includes("localhost") || baseUrl.includes("127.0.0.1");
293
+ const cred = !token ? getCredentials(baseUrl) : null;
294
+ const customHeaders = {
295
+ ...cred?.customHeaders,
296
+ ...resolveCustomHeaders()
297
+ };
298
+ const extraInterceptors = [];
299
+ if (Object.keys(customHeaders).length > 0) extraInterceptors.push(customHeadersInterceptor(customHeaders));
300
+ if (!token && cred) if (new Date(cred.expiresAt) > /* @__PURE__ */ new Date()) token = cred.accessToken;
301
+ else return new DinewayClient({
302
+ baseUrl,
303
+ token: cred.accessToken,
304
+ refreshToken: cred.refreshToken,
305
+ onTokenRefresh: (newAccessToken, expiresIn) => {
306
+ saveCredentials(baseUrl, {
307
+ ...cred,
308
+ accessToken: newAccessToken,
309
+ expiresAt: new Date(Date.now() + expiresIn * 1e3).toISOString()
310
+ });
311
+ },
312
+ interceptors: extraInterceptors
313
+ });
314
+ return new DinewayClient({
315
+ baseUrl,
316
+ token,
317
+ devBypass: !token && isLocal,
318
+ interceptors: extraInterceptors
319
+ });
320
+ }
321
+
322
+ //#endregion
323
+ export { saveMarketplaceCredential as _, ensureProjectGitignoreDinewayLocalState as a, resolveDinewayBaseUrl as c, getCredentials as d, getMarketplaceCredential as f, saveCredentials as g, resolveCredentialKey as h, DEFAULT_DINEWAY_URL as i, resolveDinewayToken as l, removeMarketplaceCredential as m, connectionArgs as n, ensureProjectGitignoreEntry as o, removeCredentials as p, createClientFromArgs as r, readProjectEnv as s, client_factory_exports as t, upsertProjectEnv as u };
@@ -1,4 +1,4 @@
1
- import { i as encodeCursor, r as decodeCursor } from "./types-Dq1qT19x.mjs";
1
+ import { i as encodeCursor, r as decodeCursor } from "./types-Bshd_6wQ.mjs";
2
2
  import { s as invalidateCommentObjectCache } from "./object-cache-D51qOseS.mjs";
3
3
  import { sql } from "kysely";
4
4
  import { ulid } from "ulidx";
@@ -1,4 +1,4 @@
1
- import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-CxBt-GxR.mjs";
1
+ import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DX_b8_4Z.mjs";
2
2
  import { ulid } from "ulidx";
3
3
 
4
4
  //#region src/database/repositories/comment-reaction.ts
@@ -1,4 +1,4 @@
1
- import { t as CommentRepository } from "./comment-DlA4iChg.mjs";
1
+ import { t as CommentRepository } from "./comment-B88XcvU1.mjs";
2
2
 
3
3
  //#region src/api/handlers/comments.ts
4
4
  async function handleCommentList(db, collection, contentId, options = {}) {
@@ -1,6 +1,6 @@
1
- import { a as __exportAll } from "./runner-DB7CRfOF.mjs";
1
+ import { a as __exportAll } from "./runner-BfWbi9YY.mjs";
2
2
  import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
3
- import { i as encodeCursor, n as ScheduledNotDueError, r as decodeCursor, t as DinewayValidationError } from "./types-Dq1qT19x.mjs";
3
+ import { i as encodeCursor, n as ScheduledNotDueError, r as decodeCursor, t as DinewayValidationError } from "./types-Bshd_6wQ.mjs";
4
4
  import { o as invalidateCollectionCache } from "./object-cache-D51qOseS.mjs";
5
5
  import { n as slugify } from "./slugify-KSsVD_D3.mjs";
6
6
  import { sql } from "kysely";
@@ -1,10 +1,10 @@
1
1
  import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
2
2
  import { r as isI18nEnabled } from "./config-CVssduLe.mjs";
3
- import { i as encodeCursor, r as decodeCursor } from "./types-Dq1qT19x.mjs";
4
- import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-CxBt-GxR.mjs";
5
- import { t as withTransaction } from "./transaction-C2EOMTJA.mjs";
6
- import { n as normalizeMime } from "./mime-CA7Lgovc.mjs";
7
- import { n as hashString } from "./hash-BPmX6P8I.mjs";
3
+ import { i as encodeCursor, r as decodeCursor } from "./types-Bshd_6wQ.mjs";
4
+ import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DX_b8_4Z.mjs";
5
+ import { t as withTransaction } from "./transaction-0LEAAy8R.mjs";
6
+ import { n as normalizeMime } from "./mime-C0vOHFm7.mjs";
7
+ import { n as hashString } from "./hash-mxxx2oPW.mjs";
8
8
  import { sql } from "kysely";
9
9
  import { ulid } from "ulidx";
10
10
 
@@ -1,5 +1,5 @@
1
- import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-CawZ59CY.mjs";
2
- import { b as toPublicContextEntryPage, v as toPublicContextDiff, y as toPublicContextEntry } from "./site-context-DQiL8Fl5.mjs";
1
+ import { _ as toPublicContextDiff, v as toPublicContextEntry, y as toPublicContextEntryPage } from "./site-context-CzaEGizi.mjs";
2
+ import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-GFhLTLJo.mjs";
3
3
 
4
4
  //#region src/api/handlers/context.ts
5
5
  async function handleContextEntryList(db, input = {}) {