dineway 0.1.46 → 0.1.48
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.
- package/README.md +57 -54
- package/dist/{activity-events-CNk3clTT.mjs → activity-events-C9u37D5z.mjs} +1 -1
- package/dist/api/route-utils.d.mts +8 -22
- package/dist/api/route-utils.mjs +8 -8
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-Bmfii2mH.mjs → api-Eiy8_zVZ.mjs} +63 -16
- package/dist/{apply-BpRBCqUt.mjs → apply-CX3no7XE.mjs} +54 -48
- package/dist/astro/index.d.mts +8 -8
- package/dist/astro/index.mjs +66 -24
- package/dist/astro/middleware/auth.d.mts +7 -7
- package/dist/astro/middleware/redirect.mjs +4 -4
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +2 -2
- package/dist/astro/middleware.d.mts +2 -1
- package/dist/astro/middleware.mjs +359 -140
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +2 -2
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +2 -2
- package/dist/astro/routes/api/admin/briefing.mjs +14 -14
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +2 -2
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +4 -4
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/index.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +8 -8
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +5 -5
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +23 -23
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +23 -23
- package/dist/astro/routes/api/admin/context/diff.mjs +22 -22
- package/dist/astro/routes/api/admin/context/index.mjs +23 -23
- package/dist/astro/routes/api/admin/context/stale.mjs +22 -22
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +21 -21
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +23 -23
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +20 -20
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +40 -40
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +35 -35
- package/dist/astro/routes/api/admin/plugins/updates.mjs +35 -35
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +22 -22
- package/dist/astro/routes/api/admin/review-requests/index.mjs +5 -5
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +35 -35
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +35 -35
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +2 -2
- package/dist/astro/routes/api/auth/dev-bypass.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/index.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/register-options.mjs +3 -3
- package/dist/astro/routes/api/auth/magic-link/send.mjs +4 -4
- package/dist/astro/routes/api/auth/me.mjs +5 -5
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/options.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/verify.mjs +3 -3
- package/dist/astro/routes/api/auth/setup-token/index.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +3 -3
- package/dist/astro/routes/api/auth/signup/request.mjs +4 -4
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +3 -3
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +11 -9
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/authors.d.mts +7 -0
- package/dist/astro/routes/api/content/_collection_/authors.mjs +16 -0
- package/dist/astro/routes/api/content/_collection_/index.mjs +5 -5
- package/dist/astro/routes/api/content/_collection_/trash.mjs +2 -2
- package/dist/astro/routes/api/dashboard.mjs +6 -6
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +2 -2
- package/dist/astro/routes/api/import/probe.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +3 -3
- package/dist/astro/routes/api/import/wordpress/execute.mjs +23 -23
- package/dist/astro/routes/api/import/wordpress/media.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +26 -26
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +24 -24
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +4 -4
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +24 -24
- package/dist/astro/routes/api/manifest.mjs +1 -1
- package/dist/astro/routes/api/mcp.mjs +46 -46
- package/dist/astro/routes/api/media/_id_/confirm.mjs +4 -4
- package/dist/astro/routes/api/media/_id_.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +4 -4
- package/dist/astro/routes/api/media.mjs +4 -4
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/items.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_/translations.mjs +23 -23
- package/dist/astro/routes/api/menus/_name_.mjs +23 -23
- package/dist/astro/routes/api/menus/index.mjs +23 -23
- package/dist/astro/routes/api/oauth/authorize.mjs +1 -1
- package/dist/astro/routes/api/oauth/device/authorize.mjs +1 -1
- package/dist/astro/routes/api/oauth/device/code.mjs +1 -1
- package/dist/astro/routes/api/oauth/device/token.mjs +1 -1
- package/dist/astro/routes/api/oauth/token/refresh.mjs +1 -1
- package/dist/astro/routes/api/oauth/token/revoke.mjs +1 -1
- package/dist/astro/routes/api/oauth/token.mjs +2 -2
- package/dist/astro/routes/api/openapi.json.mjs +16 -2
- package/dist/astro/routes/api/redirects/404s/index.mjs +6 -6
- package/dist/astro/routes/api/redirects/404s/summary.mjs +6 -6
- package/dist/astro/routes/api/redirects/_id_.mjs +24 -24
- package/dist/astro/routes/api/redirects/index.mjs +24 -24
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +36 -36
- package/dist/astro/routes/api/schema/collections/index.mjs +36 -36
- package/dist/astro/routes/api/schema/index.mjs +3 -3
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +35 -35
- package/dist/astro/routes/api/schema/orphans/index.mjs +35 -35
- package/dist/astro/routes/api/search/enable.mjs +6 -6
- package/dist/astro/routes/api/search/index.mjs +6 -6
- package/dist/astro/routes/api/search/rebuild.mjs +6 -6
- package/dist/astro/routes/api/search/stats.mjs +4 -4
- package/dist/astro/routes/api/search/suggest.mjs +6 -6
- package/dist/astro/routes/api/sections/_slug_.mjs +23 -23
- package/dist/astro/routes/api/sections/index.mjs +23 -23
- package/dist/astro/routes/api/settings/email.mjs +1 -1
- package/dist/astro/routes/api/settings.mjs +23 -23
- package/dist/astro/routes/api/setup/admin-verify.mjs +4 -4
- package/dist/astro/routes/api/setup/admin.mjs +3 -3
- package/dist/astro/routes/api/setup/dev-bypass.mjs +17 -17
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +19 -19
- package/dist/astro/routes/api/setup/status.mjs +1 -1
- package/dist/astro/routes/api/snapshot.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +25 -25
- package/dist/astro/routes/api/taxonomies/index.mjs +25 -25
- package/dist/astro/routes/api/themes/preview.mjs +2 -2
- package/dist/astro/routes/api/typegen.mjs +3 -3
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +22 -22
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +23 -23
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +23 -23
- package/dist/astro/routes/api/widget-areas/_name_.mjs +21 -21
- package/dist/astro/routes/api/widget-areas/index.mjs +23 -23
- package/dist/astro/routes/robots.txt.mjs +45 -22
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +6 -6
- package/dist/astro/routes/sitemap.xml.mjs +6 -6
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +15 -8
- package/dist/{audit-DuRbTm8L.mjs → audit-D1cbG7xH.mjs} +1 -1
- package/dist/{briefing-C4fJSVYW.mjs → briefing-CObXGOGz.mjs} +1 -1
- package/dist/{briefing-BFEWeJtR.mjs → briefing-gKWiGLt1.mjs} +6 -6
- package/dist/{byline-CXQcMsBu.mjs → byline-1ntDwv8c.mjs} +5 -5
- package/dist/{byline-fields-D7TJ_oHF.mjs → byline-fields-B-ZkoVft.mjs} +2 -2
- package/dist/{byline-fields-CaF_xfpj.d.mts → byline-fields-BX7rWKNU.d.mts} +58 -34
- package/dist/{byline-fields-Dc7L6Yry.mjs → byline-fields-C9_iaPaM.mjs} +1 -1
- package/dist/{byline-registry-CL8BxPPp.mjs → byline-registry-CUSvkasJ.mjs} +2 -2
- package/dist/{bylines-BgriNlW7.mjs → bylines-DtxChhN_.mjs} +38 -4
- package/dist/{bylines-D2vqm1aZ.mjs → bylines-bC15ZqAv.mjs} +2 -2
- package/dist/{cache-GRK71jOU.mjs → cache-DbKyr60Q.mjs} +2 -2
- package/dist/{chunks-DgEw12Bc.mjs → chunks-C5zp2xir.mjs} +1 -1
- package/dist/cli/index.mjs +73 -28
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/{comment-ogMaF1gk.mjs → comment-CXDOQ93N.mjs} +1 -1
- package/dist/{comments-CTSOKrZq.mjs → comments-hK-rdzJ9.mjs} +1 -1
- package/dist/{content-BfyjOiMi.mjs → content-QaryevFO.mjs} +103 -40
- package/dist/{context-ZMHhwzkG.mjs → context-CoYb_fvK.mjs} +7 -7
- package/dist/{context-DRhmPCiE.mjs → context-DBL1ib4v.mjs} +2 -2
- package/dist/{context-route-helpers-YLWx2N1j.mjs → context-route-helpers-CYQVmbIm.mjs} +1 -1
- package/dist/{dashboard-D0gWuzNp.mjs → dashboard-DNlqsknJ.mjs} +4 -4
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +1 -1
- package/dist/{default-BHauvIdG.mjs → default-B6iaLvP7.mjs} +4 -2
- package/dist/{device-flow-BL5ZRlc1.mjs → device-flow-DygsFPGL.mjs} +1 -1
- package/dist/{fts-manager-EHY2Kes9.mjs → fts-manager-CIZlScg5.mjs} +1 -1
- package/dist/{hitl-requests-B4Hkt0TO.mjs → hitl-requests-CGQwOEiq.mjs} +1 -1
- package/dist/{hitl-route-helpers-CHjdfQ0s.mjs → hitl-route-helpers-GSDLNPpN.mjs} +2 -2
- package/dist/{index-DJVaYiUV.d.mts → index-CwRuZ-u8.d.mts} +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +51 -51
- package/dist/{jsonld-AcPnCEGD.d.mts → jsonld-DZ67souc.d.mts} +1 -1
- package/dist/{load-BdbvtoDb.mjs → load-xE01Jm0V.mjs} +1 -1
- package/dist/{loader-Y0QvC_QO.mjs → loader-tg63WSY2.mjs} +138 -36
- package/dist/media/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +7 -7
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-DhBwiCYR.mjs → media-DUAjMfvR.mjs} +1 -1
- package/dist/{menus-fqqzXyHd.mjs → menus-DU1eZqw_.mjs} +13 -8
- package/dist/{menus-BzGQpw9d.mjs → menus-WpFRMXjz.mjs} +2 -2
- package/dist/{normalize-O-hi3a27.mjs → normalize-DUnoXAa9.mjs} +1 -1
- package/dist/{oauth-authorization-Dk3_LOfj.mjs → oauth-authorization-D-1p52Je.mjs} +1 -1
- package/dist/page/index.d.mts +2 -2
- package/dist/plugin-utils.d.mts +7 -7
- package/dist/plugins/adapt-sandbox-entry.d.mts +7 -7
- package/dist/{plugins-BQ5Joz6v.mjs → plugins-C57YQi4l.mjs} +195 -5
- package/dist/public-url-B5HaoGzj.d.mts +18 -0
- package/dist/{query-CSx0EdSW.mjs → query-BYc3oruA.mjs} +29 -18
- package/dist/{query-BJuUydtD.mjs → query-DKEwzobh.mjs} +3 -3
- package/dist/{redirect-BqFMj67n.mjs → redirect-C2zXRj3c.mjs} +2 -2
- package/dist/{redirects-CJwHl_YG.mjs → redirects-YZo_znWG.mjs} +4 -4
- package/dist/{redirects-q_cToaHv.mjs → redirects-ocRJmQHP.mjs} +23 -3
- package/dist/{registry-Cq3QRBW2.mjs → registry-CTkbIDB9.mjs} +38 -6
- package/dist/{review-requests-GYqjl2jO.mjs → review-requests-C0un5kdV.mjs} +1 -1
- package/dist/{review-requests-tPw8_pAO.mjs → review-requests-gGMyYYhy.mjs} +1 -1
- package/dist/{runner-DTfG5v0G.mjs → runner-B-tbV751.mjs} +233 -193
- package/dist/{runner-Cnz4dl0f.d.mts → runner-D4FL9usy.d.mts} +1 -1
- package/dist/{runtime-Cd-kjPfN.d.mts → runtime-DEWQpZ-4.d.mts} +154 -22
- package/dist/runtime.d.mts +8 -8
- package/dist/runtime.mjs +2 -2
- package/dist/schema-B6zyB-Xn.mjs +8 -0
- package/dist/{search-BAiFLz81.mjs → search-axGQ1KY3.mjs} +3 -3
- package/dist/{secrets-CN6FCpcB.mjs → secrets-062Izo8i.mjs} +1 -1
- package/dist/{sections-DsuIrFDC.mjs → sections-OLKgXL10.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +17 -17
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-uMFBaR8G.mjs → seo-Cd45Po8L.mjs} +1 -1
- package/dist/{service-CifrxCru.mjs → service-Bwad8s5h.mjs} +1 -1
- package/dist/{settings-BYGdocdj.mjs → settings-lAHjaUit.mjs} +2 -2
- package/dist/{settings-DNRQuX3d.mjs → settings-yLjz_I4T.mjs} +4 -4
- package/dist/{setup-complete-BytMc6HO.mjs → setup-complete--PradA4R.mjs} +1 -1
- package/dist/{site-activity-6x1JccoR.mjs → site-activity-D7Xyropw.mjs} +1 -1
- package/dist/{site-context-sN12ehZF.mjs → site-context-DaN9Z91j.mjs} +12 -12
- package/dist/{site-url-C-cu8Ff2.mjs → site-url-DpGZo9Z6.mjs} +1 -1
- package/dist/{taxonomies-faQVeMgj.mjs → taxonomies-CNOGeC-3.mjs} +9 -7
- package/dist/{taxonomies-CQFmkP5u.mjs → taxonomies-uXVEoQso.mjs} +3 -3
- package/dist/{taxonomy-BnH-6VsX.mjs → taxonomy-CBmkmMuU.mjs} +2 -2
- package/dist/{types-DEAQG87T.d.mts → types-CwawBUTa.d.mts} +1 -1
- package/dist/{types-B7_vSiPD.d.mts → types-DRIKLmJI.d.mts} +14 -2
- package/dist/{types-UGmU5sWx.d.mts → types-DSPGWjxO.d.mts} +1 -1
- package/dist/{types-Ck7-WoUD.mjs → types-DfuD0Afl.mjs} +9 -2
- package/dist/{types-DYKtk8f1.d.mts → types-eu5UDgHN.d.mts} +22 -0
- package/dist/ui/server-runtime.d.mts +58 -10
- package/dist/ui/server-runtime.mjs +97 -15
- package/dist/{user-CqZwN21P.mjs → user-DtNmjNYt.mjs} +15 -1
- package/dist/{validate-CK4a1sIF.mjs → validate-7SYRbz2f.mjs} +5 -2
- package/dist/{validate-BJuG-ISL.d.mts → validate-BMs11tan.d.mts} +10 -2
- package/dist/version-xlzMSXF2.mjs +6 -0
- package/dist/{widgets-CdDvF4fV.mjs → widgets-DR8EHuRO.mjs} +1 -1
- package/dist/{wordpress-slugs-B6Gw9q3Q.mjs → wordpress-slugs-Dvhxh4cl.mjs} +1 -1
- package/dist/{zod-generator-D1ROBNuC.mjs → zod-generator-BS9-umbk.mjs} +3 -2
- package/package.json +5 -5
- package/src/components/DinewayImage.astro +23 -5
- package/src/components/Image.astro +19 -3
- package/dist/schema-DmHMWnSA.mjs +0 -8
- package/dist/version-Cg6ur4zS.mjs +0 -6
- /package/dist/{entity-aliases-uOrKvlPg.mjs → entity-aliases-Egjmqc7I.mjs} +0 -0
- /package/dist/{options-BF11H_FD.mjs → options-BvJoSSJR.mjs} +0 -0
- /package/dist/{patterns-D9iDO3j8.mjs → patterns-r-0n824Y.mjs} +0 -0
- /package/dist/{provider-loader-B5PMjpN7.d.mts → provider-loader-9it4vd6L.d.mts} +0 -0
- /package/dist/{request-cache-w5cj5itT.mjs → request-cache-CYMbwZc6.mjs} +0 -0
- /package/dist/{transaction-D0FOsb3X.mjs → transaction-CShMWIej.mjs} +0 -0
- /package/dist/{transport-DidKKxvW.d.mts → transport-BnsNxh2l.d.mts} +0 -0
- /package/dist/{types-DbZhHtqS.mjs → types-BO8TGjS8.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as __exportAll, i as runMigrations, n as getMigrationStatus, t as getMigrationFingerprint } from "../runner-
|
|
2
|
+
import { a as __exportAll, i as runMigrations, n as getMigrationStatus, t as getMigrationFingerprint } from "../runner-B-tbV751.mjs";
|
|
3
3
|
import { t as createDatabase } from "../connection-CiJWiWya.mjs";
|
|
4
4
|
import { t as validateIdentifier } from "../validate-VPnKoIzW.mjs";
|
|
5
5
|
import { l as listTablesLike } from "../dialect-helpers-fk43GbDb.mjs";
|
|
6
|
-
import { r as isI18nEnabled } from "../config-CVssduLe.mjs";
|
|
6
|
+
import { n as getI18nConfig, r as isI18nEnabled } from "../config-CVssduLe.mjs";
|
|
7
7
|
import { n as slugify } from "../slugify-BzGxlOFx.mjs";
|
|
8
|
-
import { t as ContentRepository } from "../content-
|
|
8
|
+
import { t as ContentRepository } from "../content-QaryevFO.mjs";
|
|
9
9
|
import { i as encodeBase64url } from "../base64-C1Q9yr0B.mjs";
|
|
10
|
-
import "../types-
|
|
11
|
-
import { t as MediaRepository } from "../media-
|
|
12
|
-
import { t as TaxonomyRepository } from "../taxonomy-
|
|
13
|
-
import { t as OptionsRepository } from "../options-
|
|
14
|
-
import "../redirect-
|
|
15
|
-
import "../request-cache-
|
|
16
|
-
import "../byline-registry-
|
|
17
|
-
import { t as BylineRepository } from "../byline-
|
|
18
|
-
import "../fts-manager-
|
|
19
|
-
import { n as SchemaRegistry } from "../registry-
|
|
20
|
-
import { a as isMissingTableError } from "../loader-
|
|
21
|
-
import "../settings-
|
|
10
|
+
import "../types-DfuD0Afl.mjs";
|
|
11
|
+
import { t as MediaRepository } from "../media-DUAjMfvR.mjs";
|
|
12
|
+
import { t as TaxonomyRepository } from "../taxonomy-CBmkmMuU.mjs";
|
|
13
|
+
import { t as OptionsRepository } from "../options-BvJoSSJR.mjs";
|
|
14
|
+
import "../redirect-C2zXRj3c.mjs";
|
|
15
|
+
import "../request-cache-CYMbwZc6.mjs";
|
|
16
|
+
import "../byline-registry-CUSvkasJ.mjs";
|
|
17
|
+
import { t as BylineRepository } from "../byline-1ntDwv8c.mjs";
|
|
18
|
+
import "../fts-manager-CIZlScg5.mjs";
|
|
19
|
+
import { n as SchemaRegistry } from "../registry-CTkbIDB9.mjs";
|
|
20
|
+
import { a as isMissingTableError } from "../loader-tg63WSY2.mjs";
|
|
21
|
+
import "../settings-yLjz_I4T.mjs";
|
|
22
|
+
import { n as VERSION } from "../version-xlzMSXF2.mjs";
|
|
22
23
|
import { i as pluginManifestSchema } from "../manifest-schema-qh2P7RDX.mjs";
|
|
23
24
|
import "../ssrf-DiKqWd3N.mjs";
|
|
24
|
-
import { t as validateSeed } from "../validate-
|
|
25
|
-
import { t as applySeed } from "../apply-
|
|
26
|
-
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-
|
|
25
|
+
import { t as validateSeed } from "../validate-7SYRbz2f.mjs";
|
|
26
|
+
import { t as applySeed } from "../apply-CX3no7XE.mjs";
|
|
27
|
+
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-062Izo8i.mjs";
|
|
27
28
|
import { createHeaderAwareFetch, customHeadersInterceptor, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
28
29
|
import { o as convertDataForRead } from "../transport-LSdZVXHF.mjs";
|
|
29
30
|
import { DinewayClient } from "../client/index.mjs";
|
|
@@ -1785,6 +1786,9 @@ const JWT_PATTERN = /[A-Za-z0-9_-]{32,}\.[A-Za-z0-9_-]{16,}\.[A-Za-z0-9_-]{16,}/
|
|
|
1785
1786
|
const TOKEN_ASSIGNMENT_PATTERN = /(DINEWAY_DATABASE_AUTH_TOKEN|DATABASE_AUTH_TOKEN|AUTH_TOKEN)=\S+/gi;
|
|
1786
1787
|
const TRAILING_SLASH_PATTERN$1 = /\/$/;
|
|
1787
1788
|
const BACKSLASH_PATTERN = /\\/g;
|
|
1789
|
+
const DINEWAY_PACKAGE_NAME = "dineway";
|
|
1790
|
+
const SEMVER_VERSION_PATTERN = /^\d+\.\d+\.\d+(?:[-+].*)?$/;
|
|
1791
|
+
const LOCAL_PACKAGE_SPEC_PATTERN = /^(?:workspace|file|link|portal):/;
|
|
1788
1792
|
const SHADOW_EMAIL_PATTERN$1 = /^shadow_[a-f0-9]{16}@dineway\.ai$/i;
|
|
1789
1793
|
const OTP_PATTERN = /^\d{6}$/;
|
|
1790
1794
|
const FOOD_TYPES = new Set([
|
|
@@ -2003,6 +2007,35 @@ async function promptRequired(question, initialValue, deps, errorMessage) {
|
|
|
2003
2007
|
async function readSavedForgewayMetadata(cwd) {
|
|
2004
2008
|
return await readForgewayDeployMetadata(cwd).catch(() => ({}));
|
|
2005
2009
|
}
|
|
2010
|
+
function getDependencySpec(pkg, name) {
|
|
2011
|
+
for (const key of ["dependencies", "devDependencies"]) {
|
|
2012
|
+
const deps = pkg[key];
|
|
2013
|
+
if (!deps || typeof deps !== "object") continue;
|
|
2014
|
+
const value = deps[name];
|
|
2015
|
+
if (typeof value === "string" && value.trim()) return value.trim();
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
async function readProjectPackage(cwd) {
|
|
2019
|
+
try {
|
|
2020
|
+
return await readDeployPackageJson(cwd);
|
|
2021
|
+
} catch {
|
|
2022
|
+
return null;
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
function isDinewayDependencySpecCompatible(dependencySpec, cliVersion) {
|
|
2026
|
+
const spec = dependencySpec.trim();
|
|
2027
|
+
if (LOCAL_PACKAGE_SPEC_PATTERN.test(spec)) return true;
|
|
2028
|
+
return spec.includes(cliVersion);
|
|
2029
|
+
}
|
|
2030
|
+
async function warnProjectDinewayRuntimeMismatch(cwd, cliVersion = VERSION) {
|
|
2031
|
+
if (!SEMVER_VERSION_PATTERN.test(cliVersion)) return;
|
|
2032
|
+
const pkg = await readProjectPackage(cwd);
|
|
2033
|
+
if (!pkg) return;
|
|
2034
|
+
const dependencySpec = getDependencySpec(pkg, DINEWAY_PACKAGE_NAME);
|
|
2035
|
+
if (!dependencySpec) return;
|
|
2036
|
+
if (isDinewayDependencySpecCompatible(dependencySpec, cliVersion)) return;
|
|
2037
|
+
consola.warn(`Forgeway deploy finds that the package.json dineway runtime version does not match the deploy CLI. The CLI initializes the managed database before the site starts, so a mismatch can cause later migration or startup failures. The CLI is ${DINEWAY_PACKAGE_NAME}@${cliVersion}, but package.json declares ${DINEWAY_PACKAGE_NAME}: ${JSON.stringify(dependencySpec)}. If database migration fails, update package.json and reinstall with your package manager, for example: ${DINEWAY_PACKAGE_NAME}@^${cliVersion}. To keep deploying the current manifest, run the matching CLI version instead.`);
|
|
2038
|
+
}
|
|
2006
2039
|
function explicitPublisherEmail(options) {
|
|
2007
2040
|
return options.email ?? getEnv("DINEWAY_EMAIL") ?? getEnv("FORGEWAY_EMAIL");
|
|
2008
2041
|
}
|
|
@@ -2788,6 +2821,7 @@ async function runDinewayInitialization(options) {
|
|
|
2788
2821
|
seedResult = await applySeed(db, seed, {
|
|
2789
2822
|
includeContent: true,
|
|
2790
2823
|
onConflict: "skip",
|
|
2824
|
+
repairSchema: true,
|
|
2791
2825
|
storage: new LocalStorage({
|
|
2792
2826
|
directory: uploadsDir,
|
|
2793
2827
|
baseUrl: "/_dineway/api/media/file"
|
|
@@ -3074,6 +3108,8 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
3074
3108
|
const sourceDir = resolve(cwd);
|
|
3075
3109
|
if (!(await stat(sourceDir).catch(() => null))?.isDirectory()) throw new Error(`"${sourceDir}" is not a valid directory.`);
|
|
3076
3110
|
if (EXCLUDE_PATTERNS.includes(basename(sourceDir))) throw new Error(`"${basename(sourceDir)}" is an excluded directory and cannot be deployed.`);
|
|
3111
|
+
const database = parseDatabaseMode(options.database);
|
|
3112
|
+
if (database !== "none") await warnProjectDinewayRuntimeMismatch(cwd, deps.dinewayVersion ?? VERSION);
|
|
3077
3113
|
await ensureProjectGitignoreDinewayLocalState(cwd);
|
|
3078
3114
|
const verbose = isVerboseDeploy(options);
|
|
3079
3115
|
const project = await resolveProjectContext(cwd, options, deps);
|
|
@@ -3083,7 +3119,6 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
3083
3119
|
if (options.skipSeed) consola.info("Skipping seed initialization by request");
|
|
3084
3120
|
await ensureRestaurantClaim(context, restaurant, deps);
|
|
3085
3121
|
const { site } = await resolveDeploymentSite(cwd, context, options, seedPath, deps, restaurant);
|
|
3086
|
-
const database = parseDatabaseMode(options.database);
|
|
3087
3122
|
if (database !== "none") {
|
|
3088
3123
|
consola.start("Initializing Forgeway managed database");
|
|
3089
3124
|
try {
|
|
@@ -4175,7 +4210,8 @@ async function exportSeed(db, withContent) {
|
|
|
4175
4210
|
};
|
|
4176
4211
|
seed.settings = await exportSettings(db);
|
|
4177
4212
|
seed.collections = await exportCollections(db);
|
|
4178
|
-
const i18nEnabled = await
|
|
4213
|
+
const { i18nEnabled, defaultLocale } = await detectLocaleInfo(db, seed.collections);
|
|
4214
|
+
if (defaultLocale) seed.defaultLocale = defaultLocale;
|
|
4179
4215
|
seed.taxonomies = await exportTaxonomies(db, i18nEnabled);
|
|
4180
4216
|
seed.menus = await exportMenus(db, i18nEnabled);
|
|
4181
4217
|
seed.widgetAreas = await exportWidgetAreas(db);
|
|
@@ -4217,34 +4253,43 @@ async function exportBylines(db) {
|
|
|
4217
4253
|
};
|
|
4218
4254
|
}
|
|
4219
4255
|
/**
|
|
4220
|
-
* Determine
|
|
4256
|
+
* Determine locale-awareness and the data's default locale for the export.
|
|
4221
4257
|
*
|
|
4222
4258
|
* Runtime i18n config is initialized by middleware, but `dineway export-seed`
|
|
4223
4259
|
* runs in a CLI process. When the runtime flag is unset, derive multi-locale
|
|
4224
4260
|
* status from stored rows instead: a project is multi-locale when any
|
|
4225
4261
|
* i18n-aware table contains more than one distinct locale.
|
|
4262
|
+
*
|
|
4263
|
+
* `defaultLocale` self-describes single-locale data so a non-`en` project
|
|
4264
|
+
* survives an export-seed -> seed round-trip outside the Astro runtime.
|
|
4226
4265
|
*/
|
|
4227
|
-
async function
|
|
4228
|
-
|
|
4266
|
+
async function detectLocaleInfo(db, collections) {
|
|
4267
|
+
const config = getI18nConfig();
|
|
4268
|
+
if (isI18nEnabled() && config) return {
|
|
4269
|
+
i18nEnabled: true,
|
|
4270
|
+
defaultLocale: config.defaultLocale
|
|
4271
|
+
};
|
|
4229
4272
|
const locales = /* @__PURE__ */ new Set();
|
|
4230
4273
|
const collectDistinctLocales = async (tableRef) => {
|
|
4231
4274
|
const result = await sql`
|
|
4232
4275
|
SELECT DISTINCT locale FROM ${tableRef}
|
|
4233
4276
|
`.execute(db);
|
|
4234
4277
|
for (const row of result.rows) if (row.locale) locales.add(row.locale);
|
|
4235
|
-
return locales.size > 1;
|
|
4236
4278
|
};
|
|
4237
|
-
|
|
4238
|
-
|
|
4279
|
+
await collectDistinctLocales(sql.ref("_dineway_taxonomy_defs"));
|
|
4280
|
+
await collectDistinctLocales(sql.ref("_dineway_menus"));
|
|
4239
4281
|
for (const collection of collections) {
|
|
4240
4282
|
validateIdentifier(collection.slug, "collection slug");
|
|
4241
4283
|
try {
|
|
4242
|
-
|
|
4284
|
+
await collectDistinctLocales(sql.ref(`ec_${collection.slug}`));
|
|
4243
4285
|
} catch (error) {
|
|
4244
4286
|
if (!isMissingTableError(error)) throw error;
|
|
4245
4287
|
}
|
|
4246
4288
|
}
|
|
4247
|
-
return
|
|
4289
|
+
return {
|
|
4290
|
+
i18nEnabled: locales.size > 1,
|
|
4291
|
+
defaultLocale: locales.size === 1 ? [...locales][0] : void 0
|
|
4292
|
+
};
|
|
4248
4293
|
}
|
|
4249
4294
|
/**
|
|
4250
4295
|
* Export site settings
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-
|
|
1
|
+
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-BnsNxh2l.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/client/portable-text.d.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-B-tbV751.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
3
|
import { n as slugify } from "./slugify-BzGxlOFx.mjs";
|
|
4
|
-
import { n as
|
|
4
|
+
import { i as encodeCursor, n as ScheduledNotDueError, r as decodeCursor, t as DinewayValidationError } from "./types-DfuD0Afl.mjs";
|
|
5
5
|
import { sql } from "kysely";
|
|
6
6
|
import { monotonicFactory, ulid } from "ulidx";
|
|
7
7
|
|
|
@@ -109,6 +109,11 @@ var RevisionRepository = class {
|
|
|
109
109
|
var content_exports = /* @__PURE__ */ __exportAll({ ContentRepository: () => ContentRepository });
|
|
110
110
|
const ULID_PATTERN = /^[0-9A-Z]{26}$/;
|
|
111
111
|
const LIKE_WILDCARD_RE = /[\\%_]/g;
|
|
112
|
+
const DATE_FILTER_COLUMNS = {
|
|
113
|
+
createdAt: "created_at",
|
|
114
|
+
updatedAt: "updated_at",
|
|
115
|
+
publishedAt: "published_at"
|
|
116
|
+
};
|
|
112
117
|
/**
|
|
113
118
|
* System columns that exist in every ec_* table
|
|
114
119
|
*/
|
|
@@ -408,6 +413,7 @@ var ContentRepository = class {
|
|
|
408
413
|
if (options.where?.authorId) query = query.where("author_id", "=", options.where.authorId);
|
|
409
414
|
if (options.where?.locale) query = query.where("locale", "=", options.where.locale);
|
|
410
415
|
query = this.applySearchFilter(query, options.where);
|
|
416
|
+
query = this.applyDateFilter(query, options.where);
|
|
411
417
|
if (options.cursor) {
|
|
412
418
|
const decoded = decodeCursor(options.cursor);
|
|
413
419
|
if (decoded) {
|
|
@@ -548,10 +554,18 @@ var ContentRepository = class {
|
|
|
548
554
|
if (where?.authorId) query = query.where("author_id", "=", where.authorId);
|
|
549
555
|
if (where?.locale) query = query.where("locale", "=", where.locale);
|
|
550
556
|
query = this.applySearchFilter(query, where);
|
|
557
|
+
query = this.applyDateFilter(query, where);
|
|
551
558
|
const result = await query.executeTakeFirst();
|
|
552
559
|
return Number(result?.count || 0);
|
|
553
560
|
}
|
|
554
561
|
/**
|
|
562
|
+
* Distinct, non-null author IDs across non-trashed content in a collection.
|
|
563
|
+
*/
|
|
564
|
+
async findDistinctAuthorIds(type) {
|
|
565
|
+
const tableName = getTableName(type);
|
|
566
|
+
return (await this.db.selectFrom(tableName).select("author_id").distinct().where("deleted_at", "is", null).where("author_id", "is not", null).execute()).map((row) => row.author_id).filter((id) => id !== null);
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
555
569
|
* Apply an optional case-insensitive substring search across handler-resolved
|
|
556
570
|
* columns. User input is treated literally by escaping LIKE wildcards.
|
|
557
571
|
*/
|
|
@@ -565,6 +579,18 @@ var ContentRepository = class {
|
|
|
565
579
|
return eb(sql`lower(${sql.ref(column)})`, "like", sql`lower(${pattern}) escape '\\'`);
|
|
566
580
|
})));
|
|
567
581
|
}
|
|
582
|
+
applyDateFilter(query, where) {
|
|
583
|
+
const filter = where?.dateFilter;
|
|
584
|
+
if (!filter) return query;
|
|
585
|
+
const column = DATE_FILTER_COLUMNS[filter.field];
|
|
586
|
+
if (!column) throw new DinewayValidationError(`Invalid date filter field: ${filter.field}`);
|
|
587
|
+
const { from, to } = filter;
|
|
588
|
+
if (!from && !to) return query;
|
|
589
|
+
let next = query;
|
|
590
|
+
if (from) next = next.where((eb) => eb(column, ">=", from));
|
|
591
|
+
if (to) next = next.where((eb) => eb(column, "<=", to));
|
|
592
|
+
return next;
|
|
593
|
+
}
|
|
568
594
|
async getStats(type) {
|
|
569
595
|
const tableName = getTableName(type);
|
|
570
596
|
const result = await this.db.selectFrom(tableName).select((eb) => [
|
|
@@ -637,15 +663,17 @@ var ContentRepository = class {
|
|
|
637
663
|
* This covers both draft-scheduled posts (status='scheduled') and
|
|
638
664
|
* published posts with scheduled draft changes (status='published').
|
|
639
665
|
*/
|
|
640
|
-
async findReadyToPublish(type) {
|
|
666
|
+
async findReadyToPublish(type, limit) {
|
|
641
667
|
const tableName = getTableName(type);
|
|
642
668
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
669
|
+
const limitClause = typeof limit === "number" && Number.isInteger(limit) && limit > 0 ? sql`LIMIT ${limit}` : sql``;
|
|
643
670
|
return (await sql`
|
|
644
671
|
SELECT * FROM ${sql.ref(tableName)}
|
|
645
672
|
WHERE scheduled_at IS NOT NULL
|
|
646
673
|
AND scheduled_at <= ${now}
|
|
647
674
|
AND deleted_at IS NULL
|
|
648
675
|
ORDER BY scheduled_at ASC
|
|
676
|
+
${limitClause}
|
|
649
677
|
`.execute(this.db)).rows.map((row) => this.mapRow(type, row));
|
|
650
678
|
}
|
|
651
679
|
/**
|
|
@@ -671,52 +699,87 @@ var ContentRepository = class {
|
|
|
671
699
|
* `publishedAt` overrides the publication timestamp. If omitted, an existing
|
|
672
700
|
* `published_at` is preserved and first publish falls back to the current time.
|
|
673
701
|
*/
|
|
674
|
-
async publish(type, id, publishedAt) {
|
|
702
|
+
async publish(type, id, publishedAt, requireScheduledDue = false) {
|
|
675
703
|
const tableName = getTableName(type);
|
|
676
704
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
677
705
|
const existing = await this.findById(type, id);
|
|
678
706
|
if (!existing) throw new DinewayValidationError("Content item not found");
|
|
679
|
-
|
|
680
|
-
let
|
|
681
|
-
if (
|
|
682
|
-
|
|
683
|
-
entryId: id,
|
|
684
|
-
data: existing.data
|
|
685
|
-
})).id;
|
|
686
|
-
const revision = await revisionRepo.findById(revisionToPublish);
|
|
687
|
-
if (revision) {
|
|
688
|
-
await this.syncDataColumns(type, id, revision.data);
|
|
689
|
-
if (typeof revision.data._slug === "string") await sql`
|
|
690
|
-
UPDATE ${sql.ref(tableName)}
|
|
691
|
-
SET slug = ${revision.data._slug}
|
|
692
|
-
WHERE id = ${id}
|
|
693
|
-
`.execute(this.db);
|
|
694
|
-
}
|
|
695
|
-
if (publishedAt !== void 0) await sql`
|
|
696
|
-
UPDATE ${sql.ref(tableName)}
|
|
697
|
-
SET live_revision_id = ${revisionToPublish},
|
|
698
|
-
draft_revision_id = NULL,
|
|
699
|
-
status = 'published',
|
|
700
|
-
scheduled_at = NULL,
|
|
701
|
-
published_at = ${publishedAt},
|
|
702
|
-
updated_at = ${now}
|
|
703
|
-
WHERE id = ${id}
|
|
704
|
-
AND deleted_at IS NULL
|
|
705
|
-
`.execute(this.db);
|
|
706
|
-
else await sql`
|
|
707
|
+
let claimedScheduledAt = null;
|
|
708
|
+
let claimedUpdatedAt = null;
|
|
709
|
+
if (requireScheduledDue) {
|
|
710
|
+
const claim = await sql`
|
|
707
711
|
UPDATE ${sql.ref(tableName)}
|
|
708
|
-
SET
|
|
709
|
-
draft_revision_id = NULL,
|
|
710
|
-
status = 'published',
|
|
711
|
-
scheduled_at = NULL,
|
|
712
|
-
published_at = COALESCE(published_at, ${now}),
|
|
712
|
+
SET scheduled_at = NULL,
|
|
713
713
|
updated_at = ${now}
|
|
714
714
|
WHERE id = ${id}
|
|
715
|
+
AND scheduled_at IS NOT NULL
|
|
716
|
+
AND scheduled_at <= ${now}
|
|
715
717
|
AND deleted_at IS NULL
|
|
716
718
|
`.execute(this.db);
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
719
|
+
if (Number(claim.numAffectedRows ?? 0) === 0) throw new ScheduledNotDueError();
|
|
720
|
+
claimedScheduledAt = existing.scheduledAt;
|
|
721
|
+
claimedUpdatedAt = existing.updatedAt;
|
|
722
|
+
}
|
|
723
|
+
let publishCommitted = false;
|
|
724
|
+
try {
|
|
725
|
+
const revisionRepo = new RevisionRepository(this.db);
|
|
726
|
+
let revisionToPublish = existing.draftRevisionId || existing.liveRevisionId;
|
|
727
|
+
if (!revisionToPublish) revisionToPublish = (await revisionRepo.create({
|
|
728
|
+
collection: type,
|
|
729
|
+
entryId: id,
|
|
730
|
+
data: existing.data
|
|
731
|
+
})).id;
|
|
732
|
+
const revision = await revisionRepo.findById(revisionToPublish);
|
|
733
|
+
if (revision) {
|
|
734
|
+
await this.syncDataColumns(type, id, revision.data);
|
|
735
|
+
if (typeof revision.data._slug === "string") await sql`
|
|
736
|
+
UPDATE ${sql.ref(tableName)}
|
|
737
|
+
SET slug = ${revision.data._slug}
|
|
738
|
+
WHERE id = ${id}
|
|
739
|
+
`.execute(this.db);
|
|
740
|
+
}
|
|
741
|
+
if (publishedAt !== void 0) await sql`
|
|
742
|
+
UPDATE ${sql.ref(tableName)}
|
|
743
|
+
SET live_revision_id = ${revisionToPublish},
|
|
744
|
+
draft_revision_id = NULL,
|
|
745
|
+
status = 'published',
|
|
746
|
+
scheduled_at = NULL,
|
|
747
|
+
published_at = ${publishedAt},
|
|
748
|
+
updated_at = ${now}
|
|
749
|
+
WHERE id = ${id}
|
|
750
|
+
AND deleted_at IS NULL
|
|
751
|
+
`.execute(this.db);
|
|
752
|
+
else await sql`
|
|
753
|
+
UPDATE ${sql.ref(tableName)}
|
|
754
|
+
SET live_revision_id = ${revisionToPublish},
|
|
755
|
+
draft_revision_id = NULL,
|
|
756
|
+
status = 'published',
|
|
757
|
+
scheduled_at = NULL,
|
|
758
|
+
published_at = COALESCE(published_at, ${now}),
|
|
759
|
+
updated_at = ${now}
|
|
760
|
+
WHERE id = ${id}
|
|
761
|
+
AND deleted_at IS NULL
|
|
762
|
+
`.execute(this.db);
|
|
763
|
+
publishCommitted = true;
|
|
764
|
+
const updated = await this.findById(type, id);
|
|
765
|
+
if (!updated) throw new Error("Content not found");
|
|
766
|
+
return updated;
|
|
767
|
+
} catch (error) {
|
|
768
|
+
if (requireScheduledDue && claimedScheduledAt && !publishCommitted) try {
|
|
769
|
+
await sql`
|
|
770
|
+
UPDATE ${sql.ref(tableName)}
|
|
771
|
+
SET scheduled_at = ${claimedScheduledAt},
|
|
772
|
+
updated_at = ${claimedUpdatedAt ?? now}
|
|
773
|
+
WHERE id = ${id}
|
|
774
|
+
AND scheduled_at IS NULL
|
|
775
|
+
AND deleted_at IS NULL
|
|
776
|
+
AND (status != 'published' OR draft_revision_id IS NOT NULL)
|
|
777
|
+
`.execute(this.db);
|
|
778
|
+
} catch (restoreError) {
|
|
779
|
+
console.error(`[content] Failed to restore schedule for ${type}/${id} after publish failure:`, restoreError);
|
|
780
|
+
}
|
|
781
|
+
throw error;
|
|
782
|
+
}
|
|
720
783
|
}
|
|
721
784
|
/**
|
|
722
785
|
* Stage an existing revision as the draft for a content item.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { n as validateJsonFieldName } from "./validate-VPnKoIzW.mjs";
|
|
2
2
|
import { c as jsonExtractExpr } from "./dialect-helpers-fk43GbDb.mjs";
|
|
3
|
-
import { t as ContentRepository } from "./content-
|
|
4
|
-
import {
|
|
5
|
-
import { t as MediaRepository } from "./media-
|
|
6
|
-
import { t as UserRepository } from "./user-
|
|
7
|
-
import { t as OptionsRepository } from "./options-
|
|
8
|
-
import { t as withTransaction } from "./transaction-
|
|
9
|
-
import { t as SeoRepository } from "./seo-
|
|
3
|
+
import { t as ContentRepository } from "./content-QaryevFO.mjs";
|
|
4
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-DfuD0Afl.mjs";
|
|
5
|
+
import { t as MediaRepository } from "./media-DUAjMfvR.mjs";
|
|
6
|
+
import { t as UserRepository } from "./user-DtNmjNYt.mjs";
|
|
7
|
+
import { t as OptionsRepository } from "./options-BvJoSSJR.mjs";
|
|
8
|
+
import { t as withTransaction } from "./transaction-CShMWIej.mjs";
|
|
9
|
+
import { t as SeoRepository } from "./seo-Cd45Po8L.mjs";
|
|
10
10
|
import { a as validateExternalUrl, i as stripCredentialHeaders, t as SsrfError } from "./ssrf-DiKqWd3N.mjs";
|
|
11
11
|
import { t as CronAccessImpl } from "./cron-DxCAU_Sn.mjs";
|
|
12
12
|
import { sql } from "kysely";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-
|
|
2
|
-
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-
|
|
1
|
+
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-gKWiGLt1.mjs";
|
|
2
|
+
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-DaN9Z91j.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/context.ts
|
|
5
5
|
async function handleContextEntryList(db, input = {}) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-
|
|
1
|
+
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-C9u37D5z.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/context-route-helpers.ts
|
|
4
4
|
function resolveContextRouteActor(locals) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
2
|
-
import { t as ContentRepository } from "./content-
|
|
3
|
-
import { t as MediaRepository } from "./media-
|
|
4
|
-
import { t as UserRepository } from "./user-
|
|
5
|
-
import { t as ReviewRequestRepository } from "./review-requests-
|
|
2
|
+
import { t as ContentRepository } from "./content-QaryevFO.mjs";
|
|
3
|
+
import { t as MediaRepository } from "./media-DUAjMfvR.mjs";
|
|
4
|
+
import { t as UserRepository } from "./user-DtNmjNYt.mjs";
|
|
5
|
+
import { t as ReviewRequestRepository } from "./review-requests-gGMyYYhy.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
|
|
8
8
|
//#region src/api/handlers/dashboard.ts
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../types-
|
|
1
|
+
import "../types-eu5UDgHN.mjs";
|
|
2
2
|
import { a as SqliteConfig, c as sqlite, i as PostgresConfig, n as DatabaseDialectType, o as libsql, r as LibsqlConfig, s as postgres, t as DatabaseDescriptor } from "../adapters-OQCImOL7.mjs";
|
|
3
|
-
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-
|
|
3
|
+
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-D4FL9usy.mjs";
|
|
4
4
|
export { type DatabaseDescriptor, type DatabaseDialectType, type LibsqlConfig, type MigrationStatus, type PostgresConfig, type SqliteConfig, getMigrationStatus, libsql, postgres, rollbackMigration, runMigrations, sqlite };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration } from "../runner-
|
|
1
|
+
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration } from "../runner-B-tbV751.mjs";
|
|
2
2
|
import "../dialect-helpers-fk43GbDb.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/db/adapters.ts
|
|
@@ -13,7 +13,8 @@ const defaultSeed = {
|
|
|
13
13
|
supports: [
|
|
14
14
|
"drafts",
|
|
15
15
|
"revisions",
|
|
16
|
-
"search"
|
|
16
|
+
"search",
|
|
17
|
+
"seo"
|
|
17
18
|
],
|
|
18
19
|
fields: [
|
|
19
20
|
{
|
|
@@ -48,7 +49,8 @@ const defaultSeed = {
|
|
|
48
49
|
supports: [
|
|
49
50
|
"drafts",
|
|
50
51
|
"revisions",
|
|
51
|
-
"search"
|
|
52
|
+
"search",
|
|
53
|
+
"seo"
|
|
52
54
|
],
|
|
53
55
|
fields: [{
|
|
54
56
|
slug: "title",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as withTransaction } from "./transaction-
|
|
1
|
+
import { t as withTransaction } from "./transaction-CShMWIej.mjs";
|
|
2
2
|
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-Dh4DUoD_.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-CYUoFGo7.mjs";
|
|
4
4
|
import { o as lookupOAuthClient } from "./oauth-clients-CzeMGyUU.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-B-tbV751.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
3
|
import { s as isSqlite, u as tableExists } from "./dialect-helpers-fk43GbDb.mjs";
|
|
4
4
|
import { sql } from "kysely";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-Dh4DUoD_.mjs";
|
|
2
|
-
import { n as HitlRequestService } from "./site-context-
|
|
2
|
+
import { n as HitlRequestService } from "./site-context-DaN9Z91j.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/hitl-requests.ts
|
|
5
5
|
const HITL_NOT_FOUND_RE = /not found/i;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as apiError } from "./error-DCSuUAZW.mjs";
|
|
2
2
|
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-Dh4DUoD_.mjs";
|
|
3
|
-
import { t as WorkflowHitlCoordinator } from "./site-context-
|
|
4
|
-
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-
|
|
3
|
+
import { t as WorkflowHitlCoordinator } from "./site-context-DaN9Z91j.mjs";
|
|
4
|
+
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-C9u37D5z.mjs";
|
|
5
5
|
import { Role } from "@dineway-ai/auth";
|
|
6
6
|
|
|
7
7
|
//#region src/api/hitl-route-helpers.ts
|