dineway 0.2.1 → 0.2.3

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 (386) hide show
  1. package/README.md +17 -17
  2. package/dist/{activity-DUaz_w7p.mjs → activity-BDMlkpYY.mjs} +2 -2
  3. package/dist/{activity-events-CJDvE2uc.mjs → activity-events-DEYmJhWd.mjs} +1 -1
  4. package/dist/{allowed-origins--OwHHiY8.mjs → allowed-origins-VLgv2PL1.mjs} +1 -1
  5. package/dist/api/route-utils.d.mts +9 -9
  6. package/dist/api/route-utils.mjs +13 -13
  7. package/dist/api/schemas/index.d.mts +1 -1
  8. package/dist/api/schemas/index.mjs +3 -3
  9. package/dist/{api-B4PHIF4V.mjs → api-BFey0dOt.mjs} +15 -15
  10. package/dist/{api-tokens-tbK_sORH.mjs → api-tokens-C4K9eocv.mjs} +1 -1
  11. package/dist/{apply-DjTqq6Ae.mjs → apply-DHT0l398.mjs} +18 -18
  12. package/dist/astro/index.d.mts +10 -10
  13. package/dist/astro/index.mjs +11 -3
  14. package/dist/astro/middleware/auth.d.mts +8 -8
  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 +2 -2
  18. package/dist/astro/middleware/seed.d.mts +1 -1
  19. package/dist/astro/middleware/seed.mjs +1 -1
  20. package/dist/astro/middleware/setup.mjs +1 -1
  21. package/dist/astro/middleware.mjs +78 -76
  22. package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
  23. package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
  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 +16 -16
  27. package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +2 -2
  28. package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +6 -6
  29. package/dist/astro/routes/api/admin/byline-fields/index.mjs +6 -6
  30. package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +6 -6
  31. package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +13 -13
  32. package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +13 -13
  33. package/dist/astro/routes/api/admin/bylines/index.mjs +13 -13
  34. package/dist/astro/routes/api/admin/comments/_id_/status.mjs +11 -11
  35. package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
  36. package/dist/astro/routes/api/admin/comments/bulk.mjs +9 -9
  37. package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
  38. package/dist/astro/routes/api/admin/comments/index.mjs +9 -9
  39. package/dist/astro/routes/api/admin/context/_id_/history.mjs +23 -23
  40. package/dist/astro/routes/api/admin/context/_id_/index.mjs +23 -23
  41. package/dist/astro/routes/api/admin/context/_id_/review.mjs +28 -28
  42. package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +28 -28
  43. package/dist/astro/routes/api/admin/context/diff.mjs +27 -27
  44. package/dist/astro/routes/api/admin/context/index.mjs +28 -28
  45. package/dist/astro/routes/api/admin/context/stale.mjs +27 -27
  46. package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +23 -23
  47. package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +27 -27
  48. package/dist/astro/routes/api/admin/hitl-requests/index.mjs +27 -27
  49. package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +24 -24
  50. package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
  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 +50 -47
  54. package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +50 -47
  55. package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +42 -39
  56. package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +49 -46
  57. package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +49 -46
  58. package/dist/astro/routes/api/admin/plugins/index.mjs +42 -39
  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 +42 -39
  61. package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +49 -46
  62. package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +42 -39
  63. package/dist/astro/routes/api/admin/plugins/updates.mjs +42 -39
  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 +28 -28
  66. package/dist/astro/routes/api/admin/review-requests/index.mjs +28 -28
  67. package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +42 -39
  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 +42 -39
  70. package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
  71. package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
  72. package/dist/astro/routes/api/admin/users/_id_/index.mjs +5 -5
  73. package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
  74. package/dist/astro/routes/api/admin/users/index.mjs +5 -5
  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 +9 -9
  78. package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
  79. package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
  80. package/dist/astro/routes/api/auth/logout.mjs +2 -2
  81. package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
  82. package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
  83. package/dist/astro/routes/api/auth/me.mjs +7 -7
  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 +5 -5
  88. package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
  89. package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
  90. package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
  91. package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
  92. package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
  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 +9 -9
  96. package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
  97. package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
  98. package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +12 -12
  99. package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +11 -11
  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 +9 -9
  105. package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +15 -15
  106. package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -6
  107. package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
  108. package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +15 -15
  109. package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +12 -12
  110. package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
  111. package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -6
  112. package/dist/astro/routes/api/content/_collection_/_id_.mjs +10 -10
  113. package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
  114. package/dist/astro/routes/api/content/_collection_/index.mjs +10 -10
  115. package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
  116. package/dist/astro/routes/api/dashboard.mjs +8 -8
  117. package/dist/astro/routes/api/dev/emails.mjs +2 -2
  118. package/dist/astro/routes/api/health.mjs +1 -1
  119. package/dist/astro/routes/api/import/probe.d.mts +3 -3
  120. package/dist/astro/routes/api/import/probe.mjs +17 -17
  121. package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
  122. package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -8
  123. package/dist/astro/routes/api/import/wordpress/execute.mjs +32 -32
  124. package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -8
  125. package/dist/astro/routes/api/import/wordpress/media.mjs +9 -9
  126. package/dist/astro/routes/api/import/wordpress/prepare.mjs +31 -31
  127. package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -9
  128. package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +28 -28
  129. package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
  130. package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +20 -20
  131. package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -8
  132. package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +36 -36
  133. package/dist/astro/routes/api/integrations/_provider_.d.mts +8 -0
  134. package/dist/astro/routes/api/integrations/_provider_.mjs +51 -0
  135. package/dist/astro/routes/api/integrations/index.d.mts +7 -0
  136. package/dist/astro/routes/api/integrations/index.mjs +24 -0
  137. package/dist/astro/routes/api/manifest.mjs +4 -4
  138. package/dist/astro/routes/api/mcp.mjs +232 -312
  139. package/dist/astro/routes/api/media/_id_/confirm.mjs +8 -8
  140. package/dist/astro/routes/api/media/_id_.mjs +6 -6
  141. package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
  142. package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
  143. package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
  144. package/dist/astro/routes/api/media/providers/index.mjs +2 -2
  145. package/dist/astro/routes/api/media/upload-url.mjs +9 -9
  146. package/dist/astro/routes/api/media.mjs +9 -9
  147. package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +28 -28
  148. package/dist/astro/routes/api/menus/_name_/items.mjs +28 -28
  149. package/dist/astro/routes/api/menus/_name_/reorder.mjs +28 -28
  150. package/dist/astro/routes/api/menus/_name_/translations.mjs +28 -28
  151. package/dist/astro/routes/api/menus/_name_.mjs +28 -28
  152. package/dist/astro/routes/api/menus/index.mjs +28 -28
  153. package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
  154. package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
  155. package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
  156. package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
  157. package/dist/astro/routes/api/oauth/register.mjs +4 -4
  158. package/dist/astro/routes/api/oauth/token/refresh.mjs +6 -6
  159. package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
  160. package/dist/astro/routes/api/oauth/token.mjs +6 -6
  161. package/dist/astro/routes/api/openapi.json.mjs +4 -4
  162. package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
  163. package/dist/astro/routes/api/redirects/404s/index.mjs +9 -9
  164. package/dist/astro/routes/api/redirects/404s/summary.mjs +9 -9
  165. package/dist/astro/routes/api/redirects/_id_.mjs +29 -29
  166. package/dist/astro/routes/api/redirects/index.mjs +29 -29
  167. package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
  168. package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
  169. package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +44 -41
  170. package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +44 -41
  171. package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +44 -41
  172. package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +44 -41
  173. package/dist/astro/routes/api/schema/collections/index.mjs +44 -41
  174. package/dist/astro/routes/api/schema/index.mjs +7 -7
  175. package/dist/astro/routes/api/schema/orphans/_slug_.mjs +42 -39
  176. package/dist/astro/routes/api/schema/orphans/index.mjs +42 -39
  177. package/dist/astro/routes/api/search/enable.mjs +10 -10
  178. package/dist/astro/routes/api/search/index.mjs +9 -9
  179. package/dist/astro/routes/api/search/rebuild.mjs +10 -10
  180. package/dist/astro/routes/api/search/stats.mjs +6 -6
  181. package/dist/astro/routes/api/search/suggest.mjs +9 -9
  182. package/dist/astro/routes/api/sections/_slug_.mjs +28 -28
  183. package/dist/astro/routes/api/sections/index.mjs +28 -28
  184. package/dist/astro/routes/api/settings/email.mjs +3 -3
  185. package/dist/astro/routes/api/settings.mjs +28 -28
  186. package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
  187. package/dist/astro/routes/api/setup/admin.mjs +9 -9
  188. package/dist/astro/routes/api/setup/dev-bypass.mjs +23 -23
  189. package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
  190. package/dist/astro/routes/api/setup/index.mjs +24 -24
  191. package/dist/astro/routes/api/setup/status.mjs +3 -3
  192. package/dist/astro/routes/api/snapshot.mjs +6 -6
  193. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +31 -31
  194. package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +31 -31
  195. package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +31 -31
  196. package/dist/astro/routes/api/taxonomies/index.mjs +31 -31
  197. package/dist/astro/routes/api/themes/preview.mjs +4 -4
  198. package/dist/astro/routes/api/typegen.mjs +4 -4
  199. package/dist/astro/routes/api/well-known/auth.mjs +2 -2
  200. package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
  201. package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
  202. package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +27 -27
  203. package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +28 -28
  204. package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +28 -28
  205. package/dist/astro/routes/api/widget-areas/_name_.mjs +25 -25
  206. package/dist/astro/routes/api/widget-areas/index.mjs +28 -28
  207. package/dist/astro/routes/api/widget-components.mjs +2 -2
  208. package/dist/astro/routes/robots.txt.mjs +5 -5
  209. package/dist/astro/routes/sitemap-_collection_.xml.mjs +7 -7
  210. package/dist/astro/routes/sitemap.xml.mjs +5 -5
  211. package/dist/astro/session-driver.d.mts +1 -1
  212. package/dist/astro/session-driver.mjs +2 -2
  213. package/dist/astro/types.d.mts +11 -11
  214. package/dist/{audit-B2pRxZ20.mjs → audit-BzhwRVym.mjs} +1 -1
  215. package/dist/auth/providers/github.d.mts +1 -1
  216. package/dist/auth/providers/google.d.mts +1 -1
  217. package/dist/{auth-control-guard-D71jourk.mjs → auth-control-guard-B_Dx-epW.mjs} +1 -1
  218. package/dist/{authorize-ZXPGPwKn.mjs → authorize-D6MkRtPw.mjs} +1 -1
  219. package/dist/{briefing-kRhegBoF.mjs → briefing-Cl70iEH5.mjs} +1 -1
  220. package/dist/{briefing-0rf-su3-.mjs → briefing-GFhLTLJo.mjs} +5 -5
  221. package/dist/{bundle-CEcdUa1s.mjs → bundle-CIrUlrkQ.mjs} +2 -2
  222. package/dist/{byline-7xR185Ly.mjs → byline-BJa1MyKB.mjs} +4 -4
  223. package/dist/{byline-fields-Ckeqd1OY.d.mts → byline-fields-sRHzS0aM.d.mts} +24 -24
  224. package/dist/{byline-fields-WN7RQT4q.mjs → byline-fields-yT4herdN.mjs} +1 -1
  225. package/dist/{bylines-C-EL6dh3.mjs → bylines-B53Saxdb.mjs} +3 -3
  226. package/dist/{bylines-CmZFCMr0.mjs → bylines-kixFoaRV.mjs} +5 -5
  227. package/dist/{cache-DkVCKGio.mjs → cache-fpisdt5Q.mjs} +1 -1
  228. package/dist/{chunks-ChGNDY8r.mjs → chunks-DX_b8_4Z.mjs} +1 -1
  229. package/dist/cli/index.mjs +626 -589
  230. package/dist/cli/plugin-kit.mjs +2 -2
  231. package/dist/client/external-auth-headers.d.mts +1 -1
  232. package/dist/client/index.d.mts +2 -2
  233. package/dist/client/index.mjs +2 -2
  234. package/dist/{client-factory-BDD9azPJ.mjs → client-factory-DEtHApCc.mjs} +93 -3
  235. package/dist/{comment-DFALgsJD.mjs → comment-B88XcvU1.mjs} +1 -1
  236. package/dist/{comment-reaction-C37bf99u.mjs → comment-reaction-Ckn6vCmB.mjs} +1 -1
  237. package/dist/{comments-B3NwDBxl.mjs → comments-BDXsbL7z.mjs} +1 -1
  238. package/dist/{content-DJcAYFhz.mjs → content-Cbl8HbIR.mjs} +2 -2
  239. package/dist/{content-refresh-B4ZCmxgd.mjs → content-refresh-BmkilU5M.mjs} +2 -2
  240. package/dist/{context-DnpXcp6Y.mjs → context-AJNd0tcG.mjs} +2 -2
  241. package/dist/{context-fSCYLL3c.mjs → context-DT0tIsfw.mjs} +8 -8
  242. package/dist/{context-route-helpers-CI8XzcsK.mjs → context-route-helpers-DhP--tTq.mjs} +2 -2
  243. package/dist/{dashboard-D0nj5oWg.mjs → dashboard-YvDEYbS3.mjs} +4 -4
  244. package/dist/db/index.d.mts +3 -3
  245. package/dist/db/index.mjs +1 -1
  246. package/dist/db/libsql.d.mts +1 -1
  247. package/dist/db/postgres.d.mts +1 -1
  248. package/dist/db/sqlite.d.mts +1 -1
  249. package/dist/{device-flow-BJe6VEhP.mjs → device-flow-BKKeobcV.mjs} +4 -4
  250. package/dist/{error-CSVaQNZy.mjs → error-BW9f_ynq.mjs} +16 -2
  251. package/dist/{field-defs-cache-DL-T2XVS.mjs → field-defs-cache-CiXP3eO3.mjs} +1 -1
  252. package/dist/{fts-manager-ewTGohf4.mjs → fts-manager-Zo9uhGel.mjs} +1 -1
  253. package/dist/{hitl-requests-DEFj8e6u.mjs → hitl-requests-Bee8Cjj8.mjs} +2 -2
  254. package/dist/{hitl-route-helpers-C23JHaWz.mjs → hitl-route-helpers-DtHaKGgm.mjs} +5 -5
  255. package/dist/{import-CXXL5pip.mjs → import-C-zxnT89.mjs} +7 -7
  256. package/dist/{index-DcnOCD1e.d.mts → index-DybFmYtZ.d.mts} +3 -3
  257. package/dist/index.d.mts +14 -14
  258. package/dist/index.mjs +71 -69
  259. package/dist/integration-credentials-D3ZneN0L.mjs +49 -0
  260. package/dist/{jsonld-DzKbhRZ4.d.mts → jsonld-B9A2e0yv.d.mts} +2 -2
  261. package/dist/{load-CFtJRT3c.mjs → load-Cuiyh8LT.mjs} +1 -1
  262. package/dist/{loader-aWkkc1_o.mjs → loader-WHf22FwU.mjs} +2 -2
  263. package/dist/{manifest-schema-uA6pRFXi.mjs → manifest-schema-DKa3ZaJL.mjs} +1 -1
  264. package/dist/{mcp-reviewed-executor-Dn52L_yY.mjs → mcp-reviewed-executor-DnlF7mIL.mjs} +4 -4
  265. package/dist/media/index.d.mts +1 -1
  266. package/dist/media/local-runtime.d.mts +10 -10
  267. package/dist/media/local-runtime.mjs +2 -2
  268. package/dist/{media-CVMOoywq.mjs → media-B4m-cnmj.mjs} +1 -1
  269. package/dist/{menus-CmyIkRG5.mjs → menus-LYALU2Mf.mjs} +1 -1
  270. package/dist/{menus-CCG2z5um.mjs → menus-oYfViqfE.mjs} +5 -5
  271. package/dist/{oauth-authorization-B9H7X85L.mjs → oauth-authorization-CX7aa8Ph.mjs} +4 -4
  272. package/dist/{oauth-clients-Dwl32-Uj.mjs → oauth-clients-D9Gg0WjF.mjs} +2 -2
  273. package/dist/object-cache/memory.d.mts +1 -1
  274. package/dist/page/index.d.mts +9 -9
  275. package/dist/page/index.mjs +1 -1
  276. package/dist/{parse-i15EFSAE.mjs → parse-B-Y84oJl.mjs} +1 -1
  277. package/dist/plugin-utils.d.mts +8 -8
  278. package/dist/plugins/adapt-sandbox-entry.d.mts +8 -8
  279. package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
  280. package/dist/{plugins-CPA2PtfY.mjs → plugins-B7-4Okii.mjs} +5 -5
  281. package/dist/{preview-BjedZm8G.mjs → preview-BMIReQGc.mjs} +2 -2
  282. package/dist/{provider-loader-DC2JdWeO.d.mts → provider-loader-BIbIiz0P.d.mts} +1 -1
  283. package/dist/{public-url-DQJCnYi9.d.mts → public-url-C8QUncg3.d.mts} +1 -1
  284. package/dist/{publication-authorization-RKiHXKtq.mjs → publication-authorization-BVQ5rCAF.mjs} +6 -6
  285. package/dist/{query-DEv5x6yB.mjs → query-C_m8sn-S.mjs} +12 -12
  286. package/dist/{query-C2U5u5_p.mjs → query-DNczixZr.mjs} +2 -2
  287. package/dist/{rate-limit-DglsAJSw.mjs → rate-limit-oUGexQO1.mjs} +2 -2
  288. package/dist/{redirect-ubhEqQCQ.mjs → redirect-DoDgOWIA.mjs} +1 -1
  289. package/dist/{redirects-xs2yahLq.mjs → redirects-CrP6U4hZ.mjs} +3 -3
  290. package/dist/{redirects-Bhpm8bRe.mjs → redirects-E_B6hvuz.mjs} +2 -2
  291. package/dist/{registry-BYYyb2tF.mjs → registry-SEJqFliS.mjs} +4 -4
  292. package/dist/{request-meta-CFe1tW2M.mjs → request-meta-DHFIzWcf.mjs} +1 -1
  293. package/dist/{review-requests-CTWGnWUt.mjs → review-requests-CObSuTYU.mjs} +1 -1
  294. package/dist/{review-requests-D42VEP1l.mjs → review-requests-Cu9051_B.mjs} +1 -1
  295. package/dist/{review-route-helpers-C31vO6SI.mjs → review-route-helpers-Dp_7PH8r.mjs} +2 -2
  296. package/dist/{runner-D6hzs8L9.d.mts → runner-Bcy5w0vj.d.mts} +1 -1
  297. package/dist/{runner-BgmttQmD.mjs → runner-BfWbi9YY.mjs} +461 -446
  298. package/dist/runtime.d.mts +9 -9
  299. package/dist/runtime.mjs +3 -3
  300. package/dist/schema-Dk_N31V4.mjs +8 -0
  301. package/dist/{search-DUKgZUlm.mjs → search-BXEQepxL.mjs} +3 -3
  302. package/dist/{sections-DvFgsnda.mjs → sections-DxvEF6Bj.mjs} +2 -2
  303. package/dist/seed/index.d.mts +2 -2
  304. package/dist/seed/index.mjs +17 -17
  305. package/dist/seo/index.d.mts +1 -1
  306. package/dist/seo/index.mjs +1 -1
  307. package/dist/{seo-BU8MLCS9.mjs → seo-D1RiaooQ.mjs} +1 -1
  308. package/dist/service-DbHMAoiN.mjs +347 -0
  309. package/dist/{service-FL3fB0Rx.mjs → service-QdG0YHws.mjs} +2 -2
  310. package/dist/{settings-EzADu-dd.mjs → settings-Dje-PHXo.mjs} +2 -2
  311. package/dist/{settings-BECcAIRH.mjs → settings-SVDAB7_W.mjs} +2 -2
  312. package/dist/{site-activity-h8smOlYI.mjs → site-activity-BVK40wCy.mjs} +1 -1
  313. package/dist/{site-context-B8T1kpUP.mjs → site-context-CzaEGizi.mjs} +13 -13
  314. package/dist/storage/local.d.mts +1 -1
  315. package/dist/storage/local.mjs +1 -1
  316. package/dist/storage/s3.d.mts +1 -1
  317. package/dist/storage/s3.mjs +1 -1
  318. package/dist/store-CCfMD6nw.mjs +262 -0
  319. package/dist/{taxonomies-BiM9NtgW.mjs → taxonomies-DuhGjBa8.mjs} +3 -3
  320. package/dist/{taxonomies-DSnY5nOa.mjs → taxonomies-WVnFki0o.mjs} +5 -5
  321. package/dist/{taxonomy-0k_vRVsD.mjs → taxonomy-CCo2plmV.mjs} +2 -2
  322. package/dist/{types-DuQn1G7-.d.mts → types-BFeoAIHl.d.mts} +13 -0
  323. package/dist/{types-ChxYDRvx.mjs → types-Bshd_6wQ.mjs} +1 -1
  324. package/dist/{types-opjX_kz6.d.mts → types-GtwhHAg8.d.mts} +1 -1
  325. package/dist/{types-DwoUifGE.d.mts → types-JovwyJFE.d.mts} +28 -27
  326. package/dist/ui/server-runtime.d.mts +12 -12
  327. package/dist/ui/server-runtime.mjs +19 -19
  328. package/dist/{user-BH-n01y3.mjs → user-Bcvr5ihC.mjs} +2 -2
  329. package/dist/{validate-CbVFoJgc.d.mts → validate-YiX3rly5.d.mts} +3 -3
  330. package/dist/{validate-D1HL-oLR.mjs → validate-qKzI3BCv.mjs} +1 -1
  331. package/dist/version-O6Zw1eqK.mjs +6 -0
  332. package/dist/{widgets-BZrLrNgS.mjs → widgets-DyGcotPM.mjs} +2 -2
  333. package/dist/{zod-generator-C7AsLpSB.mjs → zod-generator-Cr3SiHsc.mjs} +1 -1
  334. package/package.json +8 -6
  335. package/dist/forgeway-seo-client-G5ddhVHd.mjs +0 -456
  336. package/dist/project-env-DKibmuP8.mjs +0 -95
  337. package/dist/schema-DUtnZxjZ.mjs +0 -8
  338. package/dist/version-C3iVRuaF.mjs +0 -6
  339. /package/dist/{actor-0QJ1Gbtf.mjs → actor-DA7yL9Yp.mjs} +0 -0
  340. /package/dist/{adapters-BiRymx02.d.mts → adapters-DnMDRQ4e.d.mts} +0 -0
  341. /package/dist/{api-tokens-Ypaly90d.mjs → api-tokens-D4tcY8R6.mjs} +0 -0
  342. /package/dist/{challenge-store-D5pSY2S1.mjs → challenge-store-BMkL2kmt.mjs} +0 -0
  343. /package/dist/{components-DImzlLhb.mjs → components-D0w9MzQe.mjs} +0 -0
  344. /package/dist/{cron-B1SL_lsb.mjs → cron-D_c3WUPN.mjs} +0 -0
  345. /package/dist/{default-D4Vygcy_.mjs → default-BxoI3SoK.mjs} +0 -0
  346. /package/dist/{email-console-Bp0r68iF.mjs → email-console-BEMwuxhV.mjs} +0 -0
  347. /package/dist/{escape-DN4Qmjsl.mjs → escape-smSUOb7u.mjs} +0 -0
  348. /package/dist/{experimental-workflows-GVhUgzEs.mjs → experimental-workflows-CgO73K4e.mjs} +0 -0
  349. /package/dist/{media-allowlist-zDNJmXCo.mjs → media-allowlist-BQyIBPzd.mjs} +0 -0
  350. /package/dist/{media-url-BdoLPvg8.mjs → media-url-B6d-yVI6.mjs} +0 -0
  351. /package/dist/{mode-C8yZnIlR.mjs → mode-DPC7segX.mjs} +0 -0
  352. /package/dist/{oauth-state-store-CndT35iw.mjs → oauth-state-store-DPVzeoyY.mjs} +0 -0
  353. /package/dist/{oauth-user-lookup-CMehAaKs.mjs → oauth-user-lookup-3E5jlXrr.mjs} +0 -0
  354. /package/dist/{output-DhBe5_Pi.mjs → output-BbqsKnS_.mjs} +0 -0
  355. /package/dist/{parser-06LLLL4E.mjs → parser-DX_c5iG3.mjs} +0 -0
  356. /package/dist/{passkey-config-NYukYGed.mjs → passkey-config-DE_0EGEP.mjs} +0 -0
  357. /package/dist/{placeholder-DkWkXfDI.d.mts → placeholder-C6ZjZcmJ.d.mts} +0 -0
  358. /package/dist/{portable-text-E79LyjGo.d.mts → portable-text-Ehqj3I_y.d.mts} +0 -0
  359. /package/dist/{portable-text-BASHceim.mjs → portable-text-y8QVqTzd.mjs} +0 -0
  360. /package/dist/{provider-loader-BtfrrzfD.mjs → provider-loader-BeQcnPN1.mjs} +0 -0
  361. /package/dist/{public-url-Cp6hyjVR.mjs → public-url-BA-7LKvQ.mjs} +0 -0
  362. /package/dist/{redirect-DrbEmU9a.mjs → redirect-CZFAqHLr.mjs} +0 -0
  363. /package/dist/{resolve-DE71WcL9.mjs → resolve-B6BpqwAR.mjs} +0 -0
  364. /package/dist/{secrets-ZV5rd8yV.mjs → secrets-CpGpyGcO.mjs} +0 -0
  365. /package/dist/{seo-contributions-GnCuL1ML.mjs → seo-contributions-Ci8_12_r.mjs} +0 -0
  366. /package/dist/{session-user-Ct6GBLvn.mjs → session-user-BwliEFp0.mjs} +0 -0
  367. /package/dist/{setup-complete-Da0axZEE.mjs → setup-complete-PvF8I7Oh.mjs} +0 -0
  368. /package/dist/{setup-nonce-BtkKnvxQ.mjs → setup-nonce-DkpYROqg.mjs} +0 -0
  369. /package/dist/{sidecar-client-Ctzfyyp-.mjs → sidecar-client-dt5fv23q.mjs} +0 -0
  370. /package/dist/{site-url-DJEid0ml.mjs → site-url-DfYDZyWl.mjs} +0 -0
  371. /package/dist/{ssrf-FJqwQzj4.mjs → ssrf-BZHvtFEv.mjs} +0 -0
  372. /package/dist/{status-NqWOSFAD.mjs → status-BN40hMpr.mjs} +0 -0
  373. /package/dist/{tokens-BDQU29Vd.mjs → tokens-DIzhPT80.mjs} +0 -0
  374. /package/dist/{transport-D9pKAzFP.d.mts → transport-BZ3aqdu7.d.mts} +0 -0
  375. /package/dist/{transport-C46KHLMP.mjs → transport-D0dLIuDC.mjs} +0 -0
  376. /package/dist/{trusted-proxy-Dm7Mxvt6.mjs → trusted-proxy-czZuby6G.mjs} +0 -0
  377. /package/dist/{types-Cw0PeCT_.d.mts → types-BsTXSvKG.d.mts} +0 -0
  378. /package/dist/{types-BLQCz46p.d.mts → types-CDcuRd4z.d.mts} +0 -0
  379. /package/dist/{types-A8fPOJnl.mjs → types-CK0r-Xq4.mjs} +0 -0
  380. /package/dist/{types-g0zMtraY.d.mts → types-S9VIopdY.d.mts} +0 -0
  381. /package/dist/{types-wFu80FrO.d.mts → types-YxFz4lDr.d.mts} +0 -0
  382. /package/dist/{types-mVVgRPaU.mjs → types-gvNBqijt.mjs} +0 -0
  383. /package/dist/{types-B_FlxIIl.d.mts → types-ywmuDETA.d.mts} +0 -0
  384. /package/dist/{url-EMAguGVk.mjs → url-D282S1Zw.mjs} +0 -0
  385. /package/dist/{utils-D1SrKGtP.mjs → utils-B7gemXz5.mjs} +0 -0
  386. /package/dist/{wordpress-slugs-C3PWcowq.mjs → wordpress-slugs-D_LfQCan.mjs} +0 -0
@@ -1,456 +0,0 @@
1
- import { i as getProjectEnvValue } from "./project-env-DKibmuP8.mjs";
2
- import { randomUUID } from "node:crypto";
3
- import { z } from "zod";
4
- import { join } from "node:path";
5
- import { chmod, mkdir, readFile, writeFile } from "node:fs/promises";
6
- import { homedir } from "node:os";
7
-
8
- //#region src/cli/commands/deploy/utils/forgeway-secrets.ts
9
- const DINEWAY_USER_CONFIG_DIR_NAME = "dineway";
10
- const TRAILING_SLASH_PATTERN$1 = /\/$/;
11
- function getDinewayUserConfigDir() {
12
- return join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), DINEWAY_USER_CONFIG_DIR_NAME);
13
- }
14
- function getForgewayAccountSecretPath() {
15
- return join(getDinewayUserConfigDir(), "forgeway.json");
16
- }
17
- function normalizePlatformApiUrl(platformApiUrl) {
18
- return platformApiUrl.replace(TRAILING_SLASH_PATTERN$1, "");
19
- }
20
- function normalizeEmail$1(email) {
21
- return email.trim().toLowerCase();
22
- }
23
- function accountKey(platformApiUrl, email) {
24
- return `${normalizePlatformApiUrl(platformApiUrl)}#${normalizeEmail$1(email)}`;
25
- }
26
- function normalizeLookup(lookup) {
27
- if (typeof lookup === "string") return { cwd: lookup };
28
- return lookup ?? {};
29
- }
30
- async function readAccountStore() {
31
- try {
32
- const raw = await readFile(getForgewayAccountSecretPath(), "utf-8");
33
- return JSON.parse(raw);
34
- } catch {
35
- return { version: 1 };
36
- }
37
- }
38
- async function writeAccountStore(store) {
39
- await mkdir(getDinewayUserConfigDir(), {
40
- recursive: true,
41
- mode: 448
42
- });
43
- const file = getForgewayAccountSecretPath();
44
- await writeFile(file, JSON.stringify({
45
- ...store,
46
- version: 1
47
- }, null, " ") + "\n", {
48
- encoding: "utf-8",
49
- mode: 384
50
- });
51
- await chmod(file, 384);
52
- }
53
- function accountMatches(credentials, lookup) {
54
- if (lookup.platformApiUrl && normalizePlatformApiUrl(credentials.platformApiUrl) !== normalizePlatformApiUrl(lookup.platformApiUrl)) return false;
55
- if (lookup.email && normalizeEmail$1(credentials.user?.email ?? "") !== normalizeEmail$1(lookup.email)) return false;
56
- return true;
57
- }
58
- async function readForgewayCredentials(lookup) {
59
- const normalizedLookup = normalizeLookup(lookup);
60
- const store = await readAccountStore();
61
- const accounts = Object.values(store.accounts ?? {}).filter((credentials) => accountMatches(credentials, normalizedLookup));
62
- if (normalizedLookup.platformApiUrl && normalizedLookup.email) return store.accounts?.[accountKey(normalizedLookup.platformApiUrl, normalizedLookup.email)] ?? null;
63
- if (accounts.length === 1) return accounts[0] ?? null;
64
- return null;
65
- }
66
- async function writeForgewayCredentials(credentials, lookup) {
67
- const normalizedLookup = normalizeLookup(lookup);
68
- const platformApiUrl = normalizePlatformApiUrl(normalizedLookup.platformApiUrl ?? credentials.platformApiUrl);
69
- const email = normalizeEmail$1(normalizedLookup.email ?? credentials.user?.email ?? "");
70
- if (!email) throw new Error("Forgeway credentials require a user email before they can be stored.");
71
- const key = accountKey(platformApiUrl, email);
72
- const store = await readAccountStore();
73
- store.accounts = {
74
- ...store.accounts,
75
- [key]: {
76
- ...credentials,
77
- platformApiUrl
78
- }
79
- };
80
- store.lastAccountKey = key;
81
- await writeAccountStore(store);
82
- }
83
- async function listForgewayCredentials(platformApiUrl) {
84
- const lookup = platformApiUrl ? { platformApiUrl } : {};
85
- const store = await readAccountStore();
86
- return Object.values(store.accounts ?? {}).filter((credentials) => accountMatches(credentials, lookup));
87
- }
88
-
89
- //#endregion
90
- //#region src/cli/commands/deploy/utils/config.ts
91
- const DINEWAY_DIR_NAME = ".dineway";
92
- const DEPLOY_STATE_FILE_NAME = "deploy.json";
93
- function deployStatePath(cwd) {
94
- return join(cwd, DINEWAY_DIR_NAME, DEPLOY_STATE_FILE_NAME);
95
- }
96
- function emptyDeployState() {
97
- return { version: 1 };
98
- }
99
- async function readDeployPackageJson(cwd) {
100
- const content = await readFile(join(cwd, "package.json"), "utf-8");
101
- return JSON.parse(content);
102
- }
103
- async function readDeployState(cwd) {
104
- try {
105
- const content = await readFile(deployStatePath(cwd), "utf-8");
106
- return {
107
- ...emptyDeployState(),
108
- ...JSON.parse(content),
109
- version: 1
110
- };
111
- } catch (error) {
112
- if (error && typeof error === "object" && error.code === "ENOENT") return emptyDeployState();
113
- throw error;
114
- }
115
- }
116
- async function writeDeployState(cwd, state) {
117
- await mkdir(join(cwd, DINEWAY_DIR_NAME), { recursive: true });
118
- await writeFile(deployStatePath(cwd), JSON.stringify({
119
- ...state,
120
- version: 1
121
- }, null, " ") + "\n", "utf-8");
122
- }
123
- async function readSavedDeployTarget(cwd) {
124
- return (await readDeployState(cwd)).target;
125
- }
126
- async function writeDeployTarget(cwd, target) {
127
- await writeDeployState(cwd, {
128
- ...await readDeployState(cwd),
129
- target
130
- });
131
- }
132
- async function readForgewayDeployMetadata(cwd) {
133
- return (await readDeployState(cwd)).targets?.forgeway ?? {};
134
- }
135
- async function writeForgewayDeployMetadata(cwd, metadata) {
136
- const state = await readDeployState(cwd);
137
- await writeDeployState(cwd, {
138
- ...state,
139
- targets: {
140
- ...state.targets,
141
- forgeway: {
142
- ...state.targets?.forgeway,
143
- ...metadata
144
- }
145
- }
146
- });
147
- }
148
-
149
- //#endregion
150
- //#region src/seo/provider-evidence.ts
151
- const httpUrlSchema = z.string().trim().min(1).max(2048).refine((value) => {
152
- try {
153
- const url = new URL(value);
154
- return url.protocol === "http:" || url.protocol === "https:";
155
- } catch {
156
- return false;
157
- }
158
- }, "URL must use http or https");
159
- const boundedText = (label, max) => z.string().trim().min(1, `${label} is required`).max(max);
160
- const forceRefreshSchema = z.boolean().default(false);
161
- const formatSchema = boundedText("format", 50);
162
- const formatsSchema = z.array(formatSchema).min(1).max(10).default(["markdown"]);
163
- const limitSchema = z.number().int().min(1).max(1e3);
164
- const deviceSchema = z.enum(["desktop", "mobile"]);
165
- const firecrawlScrapeInputSchema = z.object({
166
- url: httpUrlSchema,
167
- formats: formatsSchema,
168
- onlyMainContent: z.boolean().default(true),
169
- timeoutMs: z.number().int().min(1e3).max(12e4).default(6e4),
170
- forceRefresh: forceRefreshSchema
171
- }).strict();
172
- const firecrawlMapInputSchema = z.object({
173
- url: httpUrlSchema,
174
- search: boundedText("search", 500).optional(),
175
- sitemap: z.enum([
176
- "skip",
177
- "include",
178
- "only"
179
- ]).default("include"),
180
- limit: limitSchema.default(100),
181
- includeSubdomains: z.boolean().default(false),
182
- ignoreQueryParameters: z.boolean().default(true),
183
- forceRefresh: forceRefreshSchema
184
- }).strict();
185
- const firecrawlCrawlStartInputSchema = z.object({
186
- url: httpUrlSchema,
187
- limit: limitSchema.default(25),
188
- maxDiscoveryDepth: z.number().int().min(0).max(20).default(3),
189
- allowExternalLinks: z.boolean().default(false),
190
- allowSubdomains: z.boolean().default(false),
191
- scrapeFormats: formatsSchema,
192
- forceRefresh: forceRefreshSchema
193
- }).strict();
194
- const firecrawlCrawlStatusInputSchema = z.object({ id: boundedText("crawl id", 500) }).strict();
195
- const firecrawlSearchInputSchema = z.object({
196
- query: boundedText("query", 1e3),
197
- limit: limitSchema.default(10),
198
- scrape: z.boolean().default(false),
199
- forceRefresh: forceRefreshSchema
200
- }).strict();
201
- const dataForSeoCommonShape = {
202
- locationCode: z.number().int().min(1).max(1e7).default(2840),
203
- languageCode: boundedText("language code", 20).default("en"),
204
- device: deviceSchema.default("desktop"),
205
- forceRefresh: forceRefreshSchema
206
- };
207
- const dataForSeoSerpInputSchema = z.object({
208
- keyword: boundedText("keyword", 1e3),
209
- depth: z.number().int().min(1).max(100).default(10),
210
- ...dataForSeoCommonShape
211
- }).strict();
212
- const dataForSeoMapsInputSchema = z.object({
213
- keyword: boundedText("keyword", 1e3),
214
- depth: z.number().int().min(1).max(100).default(10),
215
- ...dataForSeoCommonShape
216
- }).strict();
217
- const dataForSeoKeywordsInputSchema = z.object({
218
- keyword: boundedText("keyword", 1e3),
219
- limit: limitSchema.default(20),
220
- ...dataForSeoCommonShape
221
- }).strict();
222
- const dataForSeoCompetitorsInputSchema = z.object({
223
- domain: boundedText("domain", 253),
224
- limit: limitSchema.default(20),
225
- ...dataForSeoCommonShape
226
- }).strict();
227
- const dataForSeoAiScrapeInputSchema = z.object({
228
- keyword: boundedText("keyword", 1e3),
229
- platform: z.enum([
230
- "chat_gpt",
231
- "gemini",
232
- "perplexity"
233
- ]).default("chat_gpt"),
234
- ...dataForSeoCommonShape
235
- }).strict();
236
- const dataForSeoAiMentionsInputSchema = z.object({
237
- domain: boundedText("domain", 253).optional(),
238
- keyword: boundedText("keyword", 1e3).optional(),
239
- platform: z.enum(["google", "chat_gpt"]).default("google"),
240
- limit: limitSchema.default(20),
241
- ...dataForSeoCommonShape
242
- }).strict().refine((value) => value.domain || value.keyword, { message: "domain or keyword is required" });
243
- var SeoProviderEvidenceService = class {
244
- constructor(transport) {
245
- this.transport = transport;
246
- }
247
- async firecrawlScrape(input) {
248
- const parsed = firecrawlScrapeInputSchema.parse(input);
249
- return this.transport.request("/api/firecrawl/scrape", parsed);
250
- }
251
- async firecrawlMap(input) {
252
- const parsed = firecrawlMapInputSchema.parse(input);
253
- return this.transport.request("/api/firecrawl/map", {
254
- url: parsed.url,
255
- ...parsed.search ? { search: parsed.search } : {},
256
- sitemap: parsed.sitemap,
257
- limit: parsed.limit,
258
- includeSubdomains: parsed.includeSubdomains,
259
- ignoreQueryParameters: parsed.ignoreQueryParameters,
260
- forceRefresh: parsed.forceRefresh
261
- });
262
- }
263
- async firecrawlCrawlStart(input) {
264
- const parsed = firecrawlCrawlStartInputSchema.parse(input);
265
- return this.transport.request("/api/firecrawl/crawl", parsed);
266
- }
267
- async firecrawlCrawlStatus(input) {
268
- const parsed = firecrawlCrawlStatusInputSchema.parse(input);
269
- return this.transport.request(`/api/firecrawl/crawl/${encodeURIComponent(parsed.id)}`, void 0, { method: "GET" });
270
- }
271
- async firecrawlSearch(input) {
272
- const parsed = firecrawlSearchInputSchema.parse(input);
273
- return this.transport.request("/api/firecrawl/search", parsed);
274
- }
275
- async dataForSeoSerp(input) {
276
- const parsed = dataForSeoSerpInputSchema.parse(input);
277
- return this.transport.request("/api/dataforseo/serp", parsed);
278
- }
279
- async dataForSeoMaps(input) {
280
- const parsed = dataForSeoMapsInputSchema.parse(input);
281
- return this.transport.request("/api/dataforseo/maps", parsed);
282
- }
283
- async dataForSeoKeywords(input) {
284
- const parsed = dataForSeoKeywordsInputSchema.parse(input);
285
- return this.transport.request("/api/dataforseo/keywords", {
286
- keyword: parsed.keyword,
287
- limit: parsed.limit,
288
- includeSerpInfo: true,
289
- includeSeedKeyword: true,
290
- locationCode: parsed.locationCode,
291
- languageCode: parsed.languageCode,
292
- device: parsed.device,
293
- forceRefresh: parsed.forceRefresh
294
- });
295
- }
296
- async dataForSeoCompetitors(input) {
297
- const parsed = dataForSeoCompetitorsInputSchema.parse(input);
298
- return this.transport.request("/api/dataforseo/competitors", {
299
- targetDomain: parsed.domain,
300
- limit: parsed.limit,
301
- locationCode: parsed.locationCode,
302
- languageCode: parsed.languageCode,
303
- device: parsed.device,
304
- forceRefresh: parsed.forceRefresh
305
- });
306
- }
307
- async dataForSeoAiScrape(input) {
308
- const parsed = dataForSeoAiScrapeInputSchema.parse(input);
309
- return this.transport.request("/api/dataforseo/ai-scrape", parsed);
310
- }
311
- async dataForSeoAiMentions(input) {
312
- const parsed = dataForSeoAiMentionsInputSchema.parse(input);
313
- return this.transport.request("/api/dataforseo/ai-mentions", {
314
- ...parsed.domain ? { targetDomain: parsed.domain } : {},
315
- ...parsed.keyword ? { keyword: parsed.keyword } : {},
316
- platform: parsed.platform,
317
- limit: parsed.limit,
318
- locationCode: parsed.locationCode,
319
- languageCode: parsed.languageCode,
320
- device: parsed.device,
321
- forceRefresh: parsed.forceRefresh
322
- });
323
- }
324
- };
325
-
326
- //#endregion
327
- //#region src/cli/forgeway-seo-client.ts
328
- const DEFAULT_DINEWAY_API_BASE_URL = "https://api.dineway.ai";
329
- const TRAILING_SLASH_PATTERN = /\/$/;
330
- const SHADOW_EMAIL_PATTERN = /^shadow_[a-f0-9]{16}@dineway\.ai$/i;
331
- var ForgewaySeoApiError = class extends Error {
332
- constructor(message, status, body) {
333
- super(message);
334
- this.status = status;
335
- this.body = body;
336
- this.name = "ForgewaySeoApiError";
337
- }
338
- };
339
- function normalizeApiUrl(value) {
340
- return (value || DEFAULT_DINEWAY_API_BASE_URL).replace(TRAILING_SLASH_PATTERN, "");
341
- }
342
- function resolveForgewaySeoApiUrl(savedPlatformApiUrl, cwd = process.cwd()) {
343
- return normalizeApiUrl(getProjectEnvValue("DINEWAY_API_BASE_URL", cwd) ?? (typeof savedPlatformApiUrl === "string" ? savedPlatformApiUrl : void 0));
344
- }
345
- function normalizeEmail(value) {
346
- return value?.trim().toLowerCase() ?? "";
347
- }
348
- function isShadowEmail(email) {
349
- return Boolean(email && SHADOW_EMAIL_PATTERN.test(email));
350
- }
351
- function assertFormalUser(user) {
352
- if (!user || user.emailVerified !== true || isShadowEmail(user.email)) throw new Error("Forgeway SEO provider access requires verified formal Forgeway credentials. Run `dineway deploy forgeway` and complete email verification first.");
353
- return user;
354
- }
355
- function normalizeForgewayUser(user, fallback) {
356
- if (!user?.id || !user.email) return fallback;
357
- return {
358
- id: user.id,
359
- name: user.profile?.name ?? user.name ?? user.email,
360
- email: user.email,
361
- avatarUrl: user.profile?.avatar_url ?? user.avatarUrl ?? user.avatar_url ?? null,
362
- emailVerified: user.emailVerified ?? user.email_verified ?? false
363
- };
364
- }
365
- async function parseJsonResponse(response) {
366
- const text = await response.text();
367
- if (!text) return {};
368
- try {
369
- return JSON.parse(text);
370
- } catch {
371
- return { message: text };
372
- }
373
- }
374
- function errorMessage(body, fallback) {
375
- if (typeof body !== "object" || body === null) return fallback;
376
- const record = body;
377
- if (typeof record.message === "string") return record.message;
378
- if (typeof record.error === "string") return record.error;
379
- const nestedError = record.error;
380
- if (typeof nestedError === "object" && nestedError !== null) {
381
- const message = nestedError.message;
382
- if (typeof message === "string") return message;
383
- }
384
- return fallback;
385
- }
386
- var ForgewaySeoGatewayClient = class {
387
- fetchImpl;
388
- readCredentials;
389
- writeCredentials;
390
- cwd;
391
- constructor(deps = {}) {
392
- this.fetchImpl = deps.fetch ?? fetch;
393
- this.readCredentials = deps.readCredentials ?? readForgewayCredentials;
394
- this.writeCredentials = deps.writeCredentials ?? writeForgewayCredentials;
395
- this.cwd = deps.cwd ?? process.cwd();
396
- }
397
- async loadCredentials() {
398
- const metadata = await readForgewayDeployMetadata(this.cwd).catch(() => ({}));
399
- const platformApiUrl = resolveForgewaySeoApiUrl(metadata.platformApiUrl, this.cwd);
400
- const credentials = await this.readCredentials({
401
- cwd: this.cwd,
402
- platformApiUrl,
403
- email: typeof metadata.publisherEmail === "string" ? metadata.publisherEmail : void 0
404
- });
405
- if (!credentials?.accessToken) throw new Error("Forgeway SEO provider access requires stored Forgeway credentials. Run `dineway deploy forgeway` first.");
406
- assertFormalUser(credentials.user);
407
- if (!credentials.refreshToken) throw new Error("Forgeway SEO provider access requires a stored formal-account refresh token. Run `dineway deploy forgeway` again.");
408
- return {
409
- ...credentials,
410
- platformApiUrl: resolveForgewaySeoApiUrl(credentials.platformApiUrl, this.cwd)
411
- };
412
- }
413
- async refreshAccessToken(credentials) {
414
- const response = await this.fetchImpl(`${credentials.platformApiUrl}/api/auth/refresh?client_type=server`, {
415
- method: "POST",
416
- headers: { "Content-Type": "application/json" },
417
- body: JSON.stringify({ refreshToken: credentials.refreshToken })
418
- });
419
- const body = await parseJsonResponse(response);
420
- if (!response.ok) throw new ForgewaySeoApiError(errorMessage(body, "Failed to refresh Forgeway formal account credentials. Run `dineway deploy forgeway` again."), response.status, body);
421
- if (!body.accessToken) throw new Error("Forgeway refresh response was missing accessToken.");
422
- const user = assertFormalUser(normalizeForgewayUser(body.user, credentials.user));
423
- if (credentials.user?.email && normalizeEmail(user.email) !== normalizeEmail(credentials.user.email)) throw new Error("Forgeway refresh returned credentials for a different email.");
424
- const updated = {
425
- ...credentials,
426
- accessToken: body.accessToken,
427
- refreshToken: body.refreshToken ?? credentials.refreshToken,
428
- user
429
- };
430
- await this.writeCredentials(updated, {
431
- cwd: this.cwd,
432
- platformApiUrl: updated.platformApiUrl,
433
- email: user.email
434
- });
435
- return updated;
436
- }
437
- async request(path, body, init) {
438
- const credentials = await this.refreshAccessToken(await this.loadCredentials());
439
- const method = init?.method ?? "POST";
440
- const response = await this.fetchImpl(`${credentials.platformApiUrl}${path}`, {
441
- method,
442
- headers: {
443
- Authorization: `Bearer ${credentials.accessToken}`,
444
- "Content-Type": "application/json",
445
- "Idempotency-Key": init?.idempotencyKey ?? randomUUID()
446
- },
447
- body: method === "GET" ? void 0 : JSON.stringify(body ?? {})
448
- });
449
- const payload = await parseJsonResponse(response);
450
- if (!response.ok) throw new ForgewaySeoApiError(errorMessage(payload, `Forgeway SEO request failed with status ${response.status}.`), response.status, payload);
451
- return payload;
452
- }
453
- };
454
-
455
- //#endregion
456
- export { readSavedDeployTarget as a, listForgewayCredentials as c, readForgewayDeployMetadata as i, readForgewayCredentials as l, SeoProviderEvidenceService as n, writeDeployTarget as o, readDeployPackageJson as r, writeForgewayDeployMetadata as s, ForgewaySeoGatewayClient as t, writeForgewayCredentials as u };
@@ -1,95 +0,0 @@
1
- import { existsSync, readFileSync } from "node:fs";
2
- import { join } from "node:path";
3
- import { readFile, writeFile } from "node:fs/promises";
4
-
5
- //#region src/cli/project-env.ts
6
- const DEFAULT_DINEWAY_URL = "http://localhost:4321";
7
- const ENV_KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
8
- const LINE_SPLIT_PATTERN = /\r?\n/;
9
- const DINEWAY_LOCAL_STATE_GITIGNORE_COMMENT = "# Dineway local state";
10
- const DINEWAY_LOCAL_STATE_GITIGNORE_ENTRIES = [
11
- ".dineway/deploy.json",
12
- ".dineway/forgeway.json",
13
- ".dineway/types.ts",
14
- ".dineway/schema.json",
15
- ".dineway/uploads/"
16
- ];
17
- const NEWLINE_PATTERN = /\r?\n/g;
18
- function parseDotenvValue(value) {
19
- const trimmed = value.trim();
20
- if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
21
- return trimmed;
22
- }
23
- function parseDotenv(text) {
24
- const env = {};
25
- for (const line of text.split(LINE_SPLIT_PATTERN)) {
26
- const trimmed = line.trim();
27
- if (!trimmed || trimmed.startsWith("#")) continue;
28
- const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
29
- const equalsIndex = normalized.indexOf("=");
30
- if (equalsIndex <= 0) continue;
31
- const key = normalized.slice(0, equalsIndex).trim();
32
- if (!ENV_KEY_PATTERN.test(key)) continue;
33
- env[key] = parseDotenvValue(normalized.slice(equalsIndex + 1));
34
- }
35
- return env;
36
- }
37
- function readProjectEnv(cwd = process.cwd()) {
38
- const envPath = join(cwd, ".env");
39
- if (!existsSync(envPath)) return {};
40
- return parseDotenv(readFileSync(envPath, "utf-8"));
41
- }
42
- function getProjectEnvValue(name, cwd = process.cwd()) {
43
- return process.env[name] ?? readProjectEnv(cwd)[name];
44
- }
45
- function resolveDinewayBaseUrl(url, cwd = process.cwd()) {
46
- if (url && url !== DEFAULT_DINEWAY_URL) return url;
47
- const projectEnv = readProjectEnv(cwd);
48
- return process.env["DINEWAY_URL"] ?? process.env["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_URL"] ?? url ?? DEFAULT_DINEWAY_URL;
49
- }
50
- function resolveDinewayToken(token, cwd = process.cwd()) {
51
- return token ?? getProjectEnvValue("DINEWAY_TOKEN", cwd);
52
- }
53
- function formatEnvValue(value) {
54
- return value.replace(NEWLINE_PATTERN, "");
55
- }
56
- async function upsertProjectEnv(cwd, values) {
57
- const envPath = join(cwd, ".env");
58
- const existing = await readFile(envPath, "utf-8").catch(() => "");
59
- const lines = existing ? existing.split(LINE_SPLIT_PATTERN) : [];
60
- const seen = /* @__PURE__ */ new Set();
61
- const nextLines = lines.map((line) => {
62
- const trimmed = line.trim();
63
- const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
64
- const equalsIndex = normalized.indexOf("=");
65
- if (equalsIndex <= 0) return line;
66
- const key = normalized.slice(0, equalsIndex).trim();
67
- const value = values[key];
68
- if (!(key in values) || value === void 0) return line;
69
- seen.add(key);
70
- return `${key}=${formatEnvValue(value)}`;
71
- });
72
- for (const [key, value] of Object.entries(values)) {
73
- if (value === void 0 || seen.has(key)) continue;
74
- nextLines.push(`${key}=${formatEnvValue(value)}`);
75
- }
76
- await writeFile(envPath, `${nextLines.filter((line, index) => line || index < nextLines.length - 1).join("\n")}\n`, "utf-8");
77
- }
78
- async function ensureProjectGitignoreEntry(cwd, entry) {
79
- const gitignorePath = join(cwd, ".gitignore");
80
- const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
81
- if (existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()).includes(entry)) return;
82
- await writeFile(gitignorePath, `${existing}${existing && !existing.endsWith("\n") ? "\n" : ""}${entry}\n`, "utf-8");
83
- }
84
- async function ensureProjectGitignoreDinewayLocalState(cwd) {
85
- const gitignorePath = join(cwd, ".gitignore");
86
- const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
87
- const lines = new Set(existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()));
88
- const missingEntries = DINEWAY_LOCAL_STATE_GITIGNORE_ENTRIES.filter((entry) => !lines.has(entry));
89
- if (missingEntries.length === 0) return;
90
- const block = [DINEWAY_LOCAL_STATE_GITIGNORE_COMMENT, ...missingEntries].join("\n");
91
- await writeFile(gitignorePath, `${existing}${existing.trim() ? existing.endsWith("\n") ? "\n" : "\n\n" : ""}${block}\n`, "utf-8");
92
- }
93
-
94
- //#endregion
95
- export { resolveDinewayBaseUrl as a, getProjectEnvValue as i, ensureProjectGitignoreDinewayLocalState as n, resolveDinewayToken as o, ensureProjectGitignoreEntry as r, upsertProjectEnv as s, DEFAULT_DINEWAY_URL as t };
@@ -1,8 +0,0 @@
1
- import { a as __exportAll } from "./runner-BgmttQmD.mjs";
2
- import { n as SchemaRegistry } from "./registry-BYYyb2tF.mjs";
3
-
4
- //#region src/schema/index.ts
5
- var schema_exports = /* @__PURE__ */ __exportAll({ SchemaRegistry: () => SchemaRegistry });
6
-
7
- //#endregion
8
- export { schema_exports as t };
@@ -1,6 +0,0 @@
1
- //#region src/version.ts
2
- const VERSION = "0.2.1";
3
- const COMMIT = "0bdbe4aaf";
4
-
5
- //#endregion
6
- export { VERSION as n, COMMIT as t };
File without changes
File without changes
File without changes
File without changes
File without changes