dineway 0.2.32 → 0.2.34
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/dist/{activity-CfryM8jO.mjs → activity-CZnq5YlZ.mjs} +2 -2
- package/dist/{activity-events-BVo9rMUz.mjs → activity-events-D-yGV7cW.mjs} +1 -1
- package/dist/{actor-DrJJsvy6.mjs → actor-DxUAJgQX.mjs} +20 -6
- package/dist/{adapters-DHt3f2lu.d.mts → adapters-BQ8CQbBm.d.mts} +5 -7
- package/dist/after-BVaUn7bK.mjs +24 -0
- package/dist/{allowed-origins-DtBQa4JR.mjs → allowed-origins-DV3LWuWW.mjs} +1 -1
- package/dist/api/route-utils.d.mts +10 -10
- package/dist/api/route-utils.mjs +23 -19
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-DF92r_un.mjs → api-CL4pG2zf.mjs} +55 -1215
- package/dist/api-tokens-D5K_Csub.mjs +3 -0
- package/dist/{api-tokens-CSomx-l3.mjs → api-tokens-_6tMD1W4.mjs} +1 -1
- package/dist/{apply-Bs2jXsms.mjs → apply-CYLUMiZg.mjs} +109 -93
- package/dist/astro/index.d.mts +16 -12
- package/dist/astro/index.mjs +50 -9
- package/dist/astro/middleware/auth.d.mts +9 -9
- package/dist/astro/middleware/auth.mjs +29 -8
- package/dist/astro/middleware/redirect.mjs +8 -7
- package/dist/astro/middleware/request-context.mjs +17 -10
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +93 -71
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware/workers.d.mts +6 -0
- package/dist/astro/middleware/workers.mjs +8 -0
- package/dist/astro/middleware.mjs +288 -159
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +7 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +7 -7
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +7 -7
- package/dist/astro/routes/api/admin/briefing.mjs +25 -23
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +5 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +11 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +11 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +11 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +22 -20
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +22 -20
- package/dist/astro/routes/api/admin/bylines/index.mjs +22 -20
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +17 -16
- package/dist/astro/routes/api/admin/comments/_id_.mjs +8 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +14 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +8 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +14 -13
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +43 -31
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +43 -31
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +48 -36
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +48 -36
- package/dist/astro/routes/api/admin/context/diff.mjs +47 -35
- package/dist/astro/routes/api/admin/context/index.mjs +48 -36
- package/dist/astro/routes/api/admin/context/stale.mjs +47 -35
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +43 -31
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +47 -35
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +47 -35
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +44 -32
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +3 -3
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +7 -7
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +7 -7
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +72 -66
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +72 -66
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +64 -58
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +71 -65
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +71 -65
- package/dist/astro/routes/api/admin/plugins/index.mjs +64 -58
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +64 -58
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +71 -65
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +64 -58
- package/dist/astro/routes/api/admin/plugins/updates.mjs +64 -58
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +26 -23
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +33 -25
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +56 -43
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +10 -9
- package/dist/astro/routes/api/admin/review-requests/index.mjs +54 -41
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +64 -58
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +64 -58
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +20 -12
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +40 -32
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +7 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +6 -5
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +11 -11
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +12 -11
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +11 -11
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +5 -4
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +5 -4
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +7 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +14 -13
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +12 -12
- package/dist/astro/routes/api/auth/setup-token/index.mjs +32 -23
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +32 -26
- package/dist/astro/routes/api/auth/signup/complete.mjs +12 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +12 -11
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +21 -18
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +19 -16
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +24 -21
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +35 -22
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +35 -22
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +23 -19
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +8 -7
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +14 -13
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +14 -13
- package/dist/astro/routes/api/content/_collection_/trash.mjs +8 -8
- package/dist/astro/routes/api/dashboard.mjs +16 -11
- package/dist/astro/routes/api/dev/emails.mjs +2 -2
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/probe.d.mts +3 -3
- package/dist/astro/routes/api/import/probe.mjs +25 -24
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +12 -11
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +51 -42
- package/dist/astro/routes/api/import/wordpress/media.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +14 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +52 -40
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +10 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +50 -38
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +29 -27
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +9 -9
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +56 -47
- package/dist/astro/routes/api/integration/artifact.mjs +11 -8
- package/dist/astro/routes/api/integration/dispatch.mjs +17 -14
- package/dist/astro/routes/api/integrations/_provider_.mjs +11 -8
- package/dist/astro/routes/api/integrations/index.mjs +10 -7
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +98 -88
- package/dist/astro/routes/api/media/_id_/confirm.mjs +12 -12
- package/dist/astro/routes/api/media/_id_.mjs +9 -9
- package/dist/astro/routes/api/media/file/_...key_.mjs +1 -1
- package/dist/astro/routes/api/media/providers/_providerId_/_itemId_.mjs +2 -2
- package/dist/astro/routes/api/media/providers/_providerId_/index.mjs +2 -2
- package/dist/astro/routes/api/media/providers/index.mjs +2 -2
- package/dist/astro/routes/api/media/upload-url.mjs +13 -13
- package/dist/astro/routes/api/media.mjs +16 -16
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +48 -36
- package/dist/astro/routes/api/menus/_name_/items.mjs +48 -36
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +48 -36
- package/dist/astro/routes/api/menus/_name_/translations.mjs +48 -36
- package/dist/astro/routes/api/menus/_name_.mjs +48 -36
- package/dist/astro/routes/api/menus/index.mjs +48 -36
- package/dist/astro/routes/api/oauth/authorize.mjs +9 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +7 -6
- package/dist/astro/routes/api/oauth/device/code.mjs +11 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +10 -8
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +7 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +7 -6
- package/dist/astro/routes/api/oauth/token.mjs +8 -6
- package/dist/astro/routes/api/openapi.json.mjs +5 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +15 -14
- package/dist/astro/routes/api/redirects/404s/summary.mjs +15 -14
- package/dist/astro/routes/api/redirects/_id_.mjs +48 -37
- package/dist/astro/routes/api/redirects/index.mjs +48 -37
- package/dist/astro/routes/api/revisions/_revisionId_/index.mjs +2 -2
- package/dist/astro/routes/api/revisions/_revisionId_/restore.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +66 -60
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +66 -60
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +66 -60
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +66 -60
- package/dist/astro/routes/api/schema/collections/index.mjs +66 -60
- package/dist/astro/routes/api/schema/index.mjs +12 -11
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +64 -58
- package/dist/astro/routes/api/schema/orphans/index.mjs +64 -58
- package/dist/astro/routes/api/search/enable.mjs +15 -14
- package/dist/astro/routes/api/search/index.mjs +14 -13
- package/dist/astro/routes/api/search/rebuild.mjs +15 -14
- package/dist/astro/routes/api/search/stats.mjs +9 -8
- package/dist/astro/routes/api/search/suggest.mjs +14 -13
- package/dist/astro/routes/api/sections/_slug_.mjs +48 -36
- package/dist/astro/routes/api/sections/index.mjs +48 -36
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings/reviews.mjs +11 -10
- package/dist/astro/routes/api/settings.mjs +48 -36
- package/dist/astro/routes/api/setup/admin-verify.mjs +14 -14
- package/dist/astro/routes/api/setup/admin.mjs +12 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +35 -31
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +37 -33
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +11 -9
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +51 -39
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +51 -39
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +51 -39
- package/dist/astro/routes/api/taxonomies/index.mjs +51 -39
- package/dist/astro/routes/api/themes/preview.mjs +8 -6
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +3 -3
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +3 -3
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +47 -35
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +48 -36
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +48 -36
- package/dist/astro/routes/api/widget-areas/_name_.mjs +45 -33
- package/dist/astro/routes/api/widget-areas/index.mjs +48 -36
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +11 -10
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +20 -18
- package/dist/astro/routes/sitemap.xml.mjs +19 -17
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +4 -4
- package/dist/astro/types.d.mts +13 -13
- package/dist/atomic-authority-CnBQJ14T.mjs +33 -0
- package/dist/{audit-CYjfxG9i.mjs → audit-F5iWkbcJ.mjs} +11 -4
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-CITT8ZA_.mjs → auth-control-guard-D4WW-wFF.mjs} +1 -1
- package/dist/{authorize-KcI0pAfN.mjs → authorize-EnP57AQl.mjs} +1 -1
- package/dist/{briefing-r3hXCDQC.mjs → briefing-BXsVwd4P.mjs} +1 -1
- package/dist/{briefing-BgQTljQt.mjs → briefing-CkCi6S-W.mjs} +445 -447
- package/dist/{bundle-S6zx-V4D.mjs → bundle-Cgak1zGE.mjs} +3 -3
- package/dist/{byline-Ctil4rij.mjs → byline-DEZKlzD9.mjs} +107 -113
- package/dist/{byline-fields-QpmruT5r.mjs → byline-fields-BGEIA9dZ.mjs} +3 -3
- package/dist/{byline-fields-DNXKWUW9.d.mts → byline-fields-BmkhEDFF.d.mts} +2 -2
- package/dist/{byline-fields-DiCyW6eQ.mjs → byline-fields-Qg8TesxL.mjs} +1 -1
- package/dist/{byline-registry-rkr73qSE.mjs → byline-registry-CkuVVeJJ.mjs} +46 -76
- package/dist/{bylines-BcuBpzVi.mjs → bylines-7BQxRGyG.mjs} +4 -4
- package/dist/{bylines-v_ZUQnR-.mjs → bylines-LqNRjma2.mjs} +6 -6
- package/dist/{cache-V2BCplaY.mjs → cache-CSTy-R-K.mjs} +2 -2
- package/dist/{chunks-CnuL55JE.mjs → chunks-BnG3LPMN.mjs} +1 -1
- package/dist/cli/index.mjs +452 -263
- package/dist/cli/plugin-kit.d.mts +9 -9
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +11 -11
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-C-y9VZDX.mjs → client-factory-BLSkgsTg.mjs} +1 -1
- package/dist/{comment-_nvJSS-A.mjs → comment-Bi7cJ9SS.mjs} +2 -2
- package/dist/{comment-reaction-DhVgJ17S.mjs → comment-reaction-BLqIj5mx.mjs} +1 -1
- package/dist/{comments-D4mIDjvA.mjs → comments-Dg_gWBEB.mjs} +1 -1
- package/dist/content-De_XeXy_.mjs +1230 -0
- package/dist/{content-CVCrcuvD.mjs → content-NobcQti0.mjs} +240 -161
- package/dist/{content-refresh-QvBIyb_g.mjs → content-refresh-l4mPoGeX.mjs} +170 -193
- package/dist/{context-MftkHbWx.mjs → context-6uqzU-M9.mjs} +95 -77
- package/dist/{context-JjKucxBm.mjs → context-B0SG9Xkc.mjs} +2 -2
- package/dist/{context-route-helpers-e1APrqSm.mjs → context-route-helpers-C8s26uDT.mjs} +2 -2
- package/dist/{cron-mGVPQ5e6.mjs → cron-D7zB6m8i.mjs} +36 -32
- package/dist/d1-binding-D6HZa3ks.mjs +8 -0
- package/dist/d1-dialect-B1b8cmxX.mjs +48 -0
- package/dist/{dashboard-ZJ7sMcBI.mjs → dashboard-B-OybCMw.mjs} +5 -5
- package/dist/database/batch.d.mts +20 -0
- package/dist/database/batch.mjs +69 -0
- package/dist/database/d1/index.d.mts +18 -0
- package/dist/database/d1/index.mjs +8 -0
- package/dist/db/d1.d.mts +7 -0
- package/dist/db/d1.mjs +13 -0
- package/dist/db/index.d.mts +4 -4
- package/dist/db/index.mjs +10 -7
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/libsql.mjs +46 -3
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-eOcL5m0Q.mjs → device-flow-DhpCzMo0.mjs} +130 -94
- package/dist/{dialect-helpers-fk43GbDb.mjs → dialect-helpers-C6xtO-Ui.mjs} +1 -1
- package/dist/{discovery-CJkuHGhZ.mjs → discovery-CqXbN0WZ.mjs} +5 -5
- package/dist/{enrich-KErvJOuI.mjs → enrich-BjF-J4sF.mjs} +1 -1
- package/dist/{evidence-6IUv9ML3.mjs → evidence-xJf8hQgH.mjs} +7 -7
- package/dist/{field-defs-cache-CwrIyZFT.mjs → field-defs-cache-BKKFFf_V.mjs} +5 -5
- package/dist/{forgeway-account-lYJ8iX3G.mjs → forgeway-account-BeKJlKh1.mjs} +1 -1
- package/dist/{fts-manager-DX7ZkrCa.mjs → fts-manager-BeWtB7ZD.mjs} +72 -57
- package/dist/{hitl-requests-CmYVunm-.mjs → hitl-requests-evSsel48.mjs} +2 -2
- package/dist/{hitl-route-helpers-CRm537zS.mjs → hitl-route-helpers-D2kJSOFX.mjs} +5 -5
- package/dist/{import-DqRAgsKr.mjs → import-Jpta-CYE.mjs} +9 -9
- package/dist/{index-Co7xtjkd.d.mts → index-CSUSBfdD.d.mts} +7 -4
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +104 -96
- package/dist/{integration-credentials-qudN6yRr.mjs → integration-credentials-BrQr0fb_.mjs} +2 -2
- package/dist/{jsonld-DTd-AVWg.d.mts → jsonld-CqIVIeZK.d.mts} +2 -2
- package/dist/{load-fCOciq0Q.mjs → load-Dc5ttyg4.mjs} +1 -1
- package/dist/{loader-BDje8ME2.mjs → loader-Cgsx23wU.mjs} +4 -4
- package/dist/{manifest-schema-CfKD0thC.mjs → manifest-schema-DG29meRy.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-DmhM3Cy6.mjs → mcp-reviewed-executor-DAZL3Ckt.mjs} +7 -7
- package/dist/media/image-endpoint.mjs +1 -1
- package/dist/media/index.d.mts +1 -1
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +11 -11
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-dvRjj4po.mjs → media-3fK0u-bo.mjs} +1 -1
- package/dist/{media-allowlist-DaG6lNoy.mjs → media-allowlist-rN4qIF6W.mjs} +1 -1
- package/dist/{menus-CpuR4Qkm.mjs → menus-5liJusbp.mjs} +138 -90
- package/dist/{menus-CZbz5L_V.mjs → menus-CbR_J8cJ.mjs} +8 -8
- package/dist/migrations-CMdxWKx-.mjs +76 -0
- package/dist/oauth-authority-CCqo4eBm.mjs +43 -0
- package/dist/{oauth-authorization-Jf5e3azH.mjs → oauth-authorization--0UtTZpv.mjs} +89 -98
- package/dist/{oauth-clients-tovQ4D4h.mjs → oauth-clients-D4WBYaYW.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-D51qOseS.mjs → object-cache-BGjIlY9s.mjs} +1 -1
- package/dist/page/index.d.mts +10 -10
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-IsGn-5lt.mjs → parse--7nG62_h.mjs} +1 -1
- package/dist/plugin-utils.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +9 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-DXyLI3Hb.mjs → plugins-DK1wLuao.mjs} +35 -84
- package/dist/{policy-950odoX_.mjs → policy-Dej7NJFD.mjs} +2 -2
- package/dist/{preview-BXmS1SXL.mjs → preview-q0pkibNO.mjs} +2 -2
- package/dist/{provider-loader-DDq7R_RN.d.mts → provider-loader-C0GaLwKB.d.mts} +1 -1
- package/dist/{public-url-CT-T1D_w.d.mts → public-url-B9zEdO8p.d.mts} +1 -1
- package/dist/{public-url-BQ9vf0AS.d.mts → public-url-BV-YQ_LF.d.mts} +2 -2
- package/dist/{publication-authorization-C-vYPGD8.mjs → publication-authorization-BrEZ2TsE.mjs} +459 -33
- package/dist/{query-CrW2yI6G.mjs → query-CEn9HXnf.mjs} +15 -15
- package/dist/{query-DcB9uGTW.mjs → query-DAS6VbMS.mjs} +4 -4
- package/dist/{rate-limit-DEkoxTsP.mjs → rate-limit-Dd1TnzZP.mjs} +2 -2
- package/dist/{redirect-DG-o0CKV.mjs → redirect-HLI3wT5Y.mjs} +26 -14
- package/dist/{redirects-Bjp4iKJU.mjs → redirects-DmOdfRjI.mjs} +5 -5
- package/dist/{redirects-N8gmWhVM.mjs → redirects-UCXyL0lP.mjs} +3 -3
- package/dist/{registry-D-IV_h50.mjs → registry-RD9qTnYL.mjs} +183 -186
- package/dist/release-BR08Slqf.mjs +5148 -0
- package/dist/request-context.d.mts +8 -0
- package/dist/{request-meta-BW0the1R.mjs → request-meta-BOcuHAXD.mjs} +1 -1
- package/dist/{resolve-pZ4NQM-X.mjs → resolve-C80Pm2DW.mjs} +1 -1
- package/dist/{review-payload-f1L4lzQg.mjs → review-payload-DEylbssM.mjs} +52 -4
- package/dist/{review-requests-DICrYH2-.mjs → review-requests-BF2eEKr8.mjs} +93 -37
- package/dist/{review-requests-BTKfeWlS.mjs → review-requests-CyfWbJ6W.mjs} +2 -2
- package/dist/{review-route-helpers-DaZBBps8.mjs → review-route-helpers-lKA-CXms.mjs} +2 -2
- package/dist/{revision-De7OmYVD.mjs → revision-090sZyGc.mjs} +28 -22
- package/dist/revocation-B7GL5fMl.mjs +53 -0
- package/dist/{runner-DJiRFyLI.mjs → runner-CVeq0266.mjs} +594 -491
- package/dist/{runner-Dye73myO.d.mts → runner-JnJSGXEB.d.mts} +1 -1
- package/dist/{runs-DEujUDOj.mjs → runs-B5BExdKO.mjs} +5 -5
- package/dist/runtime-env-CQVAWHzH.mjs +19 -0
- package/dist/runtime.d.mts +10 -10
- package/dist/runtime.mjs +5 -5
- package/dist/schema-DLMkODQc.mjs +8 -0
- package/dist/{search-DxUKN9Zz.mjs → search-CRzWNfxX.mjs} +4 -4
- package/dist/{secrets-AdCrGg1c.mjs → secrets-Cg0D2gQW.mjs} +10 -11
- package/dist/{sections-BPFOEMK6.mjs → sections-BwUjOGqn.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +29 -25
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +11 -10
- package/dist/{seo-DWHdo5aW.mjs → seo-BOTuCeh-.mjs} +25 -15
- package/dist/{seo-GfovzqpU.mjs → seo-B_tBFyud.mjs} +1 -1
- package/dist/{service-DbgjHWyW.mjs → service--bQht6oN.mjs} +2 -2
- package/dist/{service-BrNKVCjC.mjs → service-DilVsWGD.mjs} +3 -3
- package/dist/{session-user-DyqWGIh4.mjs → session-user-DeqTcAmR.mjs} +1 -1
- package/dist/{settings-CAsQLi0N.mjs → settings-DFzevIrU.mjs} +8 -8
- package/dist/{settings-BKEHw6Bu.mjs → settings-Deqx3Upy.mjs} +2 -2
- package/dist/{setup-complete-C8LTo8cO.mjs → setup-complete-BFqudwbW.mjs} +1 -1
- package/dist/{site-activity-7oezuHXK.mjs → site-activity-BrN2NviL.mjs} +11 -4
- package/dist/{site-context-CA7rbxux.mjs → site-context-vCiDRr4H.mjs} +50 -37
- package/dist/{site-url-DoZf_jVj.mjs → site-url-wXFqbm9c.mjs} +1 -1
- package/dist/state-jyNZ6-7L.mjs +30 -0
- package/dist/storage/local.d.mts +1 -1
- package/dist/storage/local.mjs +1 -1
- package/dist/storage/s3.d.mts +1 -1
- package/dist/storage/s3.mjs +3 -3
- package/dist/{store-c4qx3gVh.mjs → store-C1yDxxfv.mjs} +37 -12
- package/dist/submission-BsHNfHc7.mjs +155 -0
- package/dist/{taxonomies-ALDiRQ84.mjs → taxonomies-4cnTcbD6.mjs} +3 -3
- package/dist/{taxonomies-93DV-1QT.mjs → taxonomies-CllxqaH0.mjs} +7 -7
- package/dist/{taxonomy-BOBTJ_aE.mjs → taxonomy-DWxxLpp5.mjs} +3 -3
- package/dist/{tokens-c-qxNqzC.mjs → tokens-Bjuf1HID.mjs} +1 -1
- package/dist/{trusted-proxy-CdEl6g6B.mjs → trusted-proxy-CAW9o4Dw.mjs} +4 -12
- package/dist/{types-BRCUO8NR.d.mts → types-7Th6Mwz3.d.mts} +1 -0
- package/dist/{types-BpSTdH1H.mjs → types-BqxIv8Il.mjs} +2 -2
- package/dist/{types-6KmeXInJ.d.mts → types-CFgTpfPk.d.mts} +1 -1
- package/dist/{types-TpXK8km5.d.mts → types-QjOcidFc.d.mts} +300 -172
- package/dist/ui/server-runtime.d.mts +13 -13
- package/dist/ui/server-runtime.mjs +28 -26
- package/dist/{user-D0NJ7gYf.mjs → user-1-YV30lf.mjs} +2 -2
- package/dist/{utils-BK2efsHv.mjs → utils-Cglcqpm2.mjs} +2 -2
- package/dist/{validate-CDWVODvc.d.mts → validate-A27peRc4.d.mts} +3 -3
- package/dist/{validate-C9g9iX3q.mjs → validate-Wl4MSf3V.mjs} +3 -3
- package/dist/version-BWxyC5s4.mjs +6 -0
- package/dist/{widgets-Cm5Qx2Np.mjs → widgets-Di-6yDH7.mjs} +3 -3
- package/dist/{wordpress-slugs-WdPZaVXf.mjs → wordpress-slugs-vOx7R1dM.mjs} +1 -1
- package/dist/{worker-D7OccgB8.mjs → worker-RpaMP71d.mjs} +76 -47
- package/dist/workers-build-BaQCrSmf.mjs +36 -0
- package/dist/{zod-generator-DS5oZNaL.mjs → zod-generator-Cylvl_SM.mjs} +2 -2
- package/package.json +35 -9
- package/dist/after-BfniwgIf.mjs +0 -9
- package/dist/api-tokens-CmT83Bgj.mjs +0 -3
- package/dist/db/libsql-http.d.mts +0 -27
- package/dist/db/libsql-http.mjs +0 -29
- package/dist/libsql-dialect-CANq6UNI.mjs +0 -47
- package/dist/oauth-user-lookup-B451pZmd.mjs +0 -25
- package/dist/revocation-CkTOhdlw.mjs +0 -42
- package/dist/schema-IjuRxkqq.mjs +0 -8
- package/dist/submission-C47cHBIg.mjs +0 -67
- package/dist/transaction-BGQgnwUi.mjs +0 -28
- package/dist/version-9orir5LL.mjs +0 -6
- /package/dist/{base64-F8-DUraK.mjs → base64-Cz-aU0X1.mjs} +0 -0
- /package/dist/{challenge-store-CYrg4F4t.mjs → challenge-store-D-_-VavY.mjs} +0 -0
- /package/dist/{components-DAq_4iPX.mjs → components-BWQUCJEr.mjs} +0 -0
- /package/dist/{config-CVssduLe.mjs → config-XW5tMrH8.mjs} +0 -0
- /package/dist/{content-index-names-Bbu1FY1r.mjs → content-index-names-CDc2IQIx.mjs} +0 -0
- /package/dist/{context-types-CPWAJRs5.mjs → context-types-DqTo6C79.mjs} +0 -0
- /package/dist/{default-BeIzUa1e.mjs → default-D9zxuUU7.mjs} +0 -0
- /package/dist/{email-console-Bfi_exVg.mjs → email-console-BONByQiC.mjs} +0 -0
- /package/dist/{error-DLg1H2LT.mjs → error-Dd8LtpG5.mjs} +0 -0
- /package/dist/{escape-C6lkys0j.mjs → escape-BWC4s5bV.mjs} +0 -0
- /package/dist/{experimental-workflows-B9x8delL.mjs → experimental-workflows-M5D3RTFo.mjs} +0 -0
- /package/dist/{hash-jhbF98tT.mjs → hash-lNx3KJis.mjs} +0 -0
- /package/dist/{media-url-CL3NzgLh.mjs → media-url-B4YtTY6c.mjs} +0 -0
- /package/dist/{mime-CDTtL7jE.mjs → mime-D_ae-u_U.mjs} +0 -0
- /package/dist/{mode-D554vAgH.mjs → mode-CPf_KZ37.mjs} +0 -0
- /package/dist/{normalize-Ev3FiBMx.mjs → normalize-5rct_U0I.mjs} +0 -0
- /package/dist/{oauth-state-store-Do1a_o3H.mjs → oauth-state-store-CMgcimzA.mjs} +0 -0
- /package/dist/{options-1dBRkoCl.mjs → options-BcqHWpc-.mjs} +0 -0
- /package/dist/{output-8j9oltTf.mjs → output-BYpiVUBf.mjs} +0 -0
- /package/dist/{parser-C9rzPuSZ.mjs → parser-BV0wzQHo.mjs} +0 -0
- /package/dist/{passkey-config-CRN44T04.mjs → passkey-config-BG4GO4OO.mjs} +0 -0
- /package/dist/{patterns-3XE9bU4r.mjs → patterns-CZ7D4y_R.mjs} +0 -0
- /package/dist/{placeholder-D03pGvqM.d.mts → placeholder-BHTaoCYx.d.mts} +0 -0
- /package/dist/{portable-text-tIk9_uz_.mjs → portable-text-B9YuySom.mjs} +0 -0
- /package/dist/{portable-text-BdRm4uZq.d.mts → portable-text-FKf3IrPz.d.mts} +0 -0
- /package/dist/{process-cache-B-L-A9zg.mjs → process-cache-MHM4Sqzs.mjs} +0 -0
- /package/dist/{provider-loader-C4i82ll1.mjs → provider-loader-3MY1SjzA.mjs} +0 -0
- /package/dist/{public-discovery-CyDzK1-S.mjs → public-discovery-BAbOvKiR.mjs} +0 -0
- /package/dist/{public-url-oudwI7K0.mjs → public-url-C7pbmS_7.mjs} +0 -0
- /package/dist/{public-url-BVIjzMo3.mjs → public-url-D5Wjq0sy.mjs} +0 -0
- /package/dist/{redirect-Dp5u-8dH.mjs → redirect-Bx96u2nS.mjs} +0 -0
- /package/dist/{request-cache-BruBnFAR.mjs → request-cache-DPmV5nk4.mjs} +0 -0
- /package/dist/{seo-contributions-BAtRDXEQ.mjs → seo-contributions-Dt57p6Sq.mjs} +0 -0
- /package/dist/{service-DeX1PRNt.mjs → service-wYQ_ePZ4.mjs} +0 -0
- /package/dist/{setup-nonce-D-CEYlw7.mjs → setup-nonce-CAqDUxxU.mjs} +0 -0
- /package/dist/{sidecar-client-Bw2C0XTf.mjs → sidecar-client-CnpGTvYq.mjs} +0 -0
- /package/dist/{slugify-KSsVD_D3.mjs → slugify-Di8Q_MFq.mjs} +0 -0
- /package/dist/{ssrf-C7tTSD1r.mjs → ssrf-LN16WMip.mjs} +0 -0
- /package/dist/{stable-hash-DF7R5eN8.mjs → stable-hash-DEtJgcp7.mjs} +0 -0
- /package/dist/{status-Bba6RbkS.mjs → status-Bwkeuz8g.mjs} +0 -0
- /package/dist/{transport-BddGhTAI.mjs → transport-472KVGBe.mjs} +0 -0
- /package/dist/{transport-ktLL9r2O.d.mts → transport-C0jj-Nc8.d.mts} +0 -0
- /package/dist/{types-BQZFeZjd.mjs → types-BDq9t5lG.mjs} +0 -0
- /package/dist/{types-CKIt_jmM.d.mts → types-Bs-7Geuh.d.mts} +0 -0
- /package/dist/{types-CLMOusxP.d.mts → types-CwkJp6zr.d.mts} +0 -0
- /package/dist/{types-C0DPvhR5.mjs → types-CyBH89BS.mjs} +0 -0
- /package/dist/{types-BbkkkAb6.mjs → types-D17dJRht.mjs} +0 -0
- /package/dist/{types--3oJQ0hs.d.mts → types-DTjrkhKU.d.mts} +0 -0
- /package/dist/{types-CPaVj_GC.d.mts → types-DkXuBo8k.d.mts} +0 -0
- /package/dist/{types-CU3Wn2HC.d.mts → types-b2sq7ZDk.d.mts} +0 -0
- /package/dist/{url-C_pLSrGZ.mjs → url-D375-6LM.mjs} +0 -0
- /package/dist/{url-Dumsft7G.mjs → url-bv5i4JN0.mjs} +0 -0
- /package/dist/{validate-VPnKoIzW.mjs → validate-Co3j6T_K.mjs} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ALL_VALID_SCOPES, TOKEN_PREFIXES, generatePrefixedToken, hasScope as hasScope$1, hashPrefixedToken, hashPrefixedToken as hashApiToken, validateScopes } from "@dineway-ai/auth";
|
|
2
|
+
|
|
3
|
+
export { hashApiToken as a, hasScope$1 as i, TOKEN_PREFIXES as n, hashPrefixedToken as o, generatePrefixedToken as r, validateScopes as s, ALL_VALID_SCOPES as t };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as RedirectRepository } from "./redirect-
|
|
9
|
-
import { t as BylineRepository } from "./byline-
|
|
10
|
-
import { a as markContentMediaUsageCollectionStaleSafely } from "./content-refresh-
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { t as validateSeed } from "./validate-
|
|
1
|
+
import { c as __exportAll } from "./runner-CVeq0266.mjs";
|
|
2
|
+
import { atomicBatch, rowUnchanged } from "./database/batch.mjs";
|
|
3
|
+
import { n as getI18nConfig } from "./config-XW5tMrH8.mjs";
|
|
4
|
+
import { o as invalidateCollectionCache } from "./object-cache-BGjIlY9s.mjs";
|
|
5
|
+
import { t as ContentRepository } from "./content-NobcQti0.mjs";
|
|
6
|
+
import { t as MediaRepository } from "./media-3fK0u-bo.mjs";
|
|
7
|
+
import { t as TaxonomyRepository } from "./taxonomy-DWxxLpp5.mjs";
|
|
8
|
+
import { t as RedirectRepository } from "./redirect-HLI3wT5Y.mjs";
|
|
9
|
+
import { t as BylineRepository } from "./byline-DEZKlzD9.mjs";
|
|
10
|
+
import { a as markContentMediaUsageCollectionStaleSafely, o as prepareContentMediaUsageCollectionStale } from "./content-refresh-l4mPoGeX.mjs";
|
|
11
|
+
import { a as validateExternalUrl, r as ssrfSafeFetch } from "./ssrf-LN16WMip.mjs";
|
|
12
|
+
import { t as FTSManager } from "./fts-manager-BeWtB7ZD.mjs";
|
|
13
|
+
import { n as SchemaRegistry } from "./registry-RD9qTnYL.mjs";
|
|
14
|
+
import { s as setSiteSettings } from "./settings-DFzevIrU.mjs";
|
|
15
|
+
import { t as validateSeed } from "./validate-Wl4MSf3V.mjs";
|
|
16
|
+
import { sql } from "kysely";
|
|
16
17
|
import { ulid } from "ulidx";
|
|
17
18
|
import { imageSize } from "image-size";
|
|
18
19
|
import mime from "mime/lite";
|
|
@@ -288,7 +289,7 @@ async function applySeed(db, seed, options = {}) {
|
|
|
288
289
|
}
|
|
289
290
|
}
|
|
290
291
|
}
|
|
291
|
-
const { invalidateTaxonomyDefsCache } = await import("./taxonomies-
|
|
292
|
+
const { invalidateTaxonomyDefsCache } = await import("./taxonomies-CllxqaH0.mjs").then((n) => n.u);
|
|
292
293
|
invalidateTaxonomyDefsCache();
|
|
293
294
|
}
|
|
294
295
|
if (includeContent && seed.bylines) {
|
|
@@ -349,35 +350,10 @@ async function applySeed(db, seed, options = {}) {
|
|
|
349
350
|
if (existing) {
|
|
350
351
|
if (onConflict === "error") throw new Error(`Conflict: content "${entry.slug}" in "${collectionSlug}" already exists`);
|
|
351
352
|
if (onConflict === "update") {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
await withTransaction(db, async (trx) => {
|
|
357
|
-
const trxContentRepo = new ContentRepository(trx);
|
|
358
|
-
const trxBylineRepo = new BylineRepository(trx);
|
|
359
|
-
const trxRevisionRepo = new RevisionRepository(trx);
|
|
360
|
-
await trxContentRepo.update(collectionSlug, existing.id, {
|
|
361
|
-
status,
|
|
362
|
-
data: resolvedData
|
|
363
|
-
});
|
|
364
|
-
contentMutated = true;
|
|
365
|
-
await applyContentBylines(trxBylineRepo, collectionSlug, existing.id, entry, seedBylineIdMap, true);
|
|
366
|
-
await applyContentTaxonomies(trx, collectionSlug, existing.id, entry, true);
|
|
367
|
-
if (status === "published") {
|
|
368
|
-
const draft = await trxRevisionRepo.create({
|
|
369
|
-
collection: collectionSlug,
|
|
370
|
-
entryId: existing.id,
|
|
371
|
-
data: resolvedData
|
|
372
|
-
});
|
|
373
|
-
await trxContentRepo.setDraftRevision(collectionSlug, existing.id, draft.id);
|
|
374
|
-
await trxContentRepo.publish(collectionSlug, existing.id);
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
} catch (error) {
|
|
378
|
-
if (contentMutated) await markSeedContentCollectionStale(collectionSlug);
|
|
379
|
-
throw error;
|
|
380
|
-
}
|
|
353
|
+
await writeSeedContent(db, collectionSlug, entry, await resolveReferences(entry.data, seedIdMap, mediaContext, result), seedBylineIdMap, {
|
|
354
|
+
existingId: existing.id,
|
|
355
|
+
locale: entryLocale
|
|
356
|
+
});
|
|
381
357
|
seedIdMap.set(entry.id, existing.id);
|
|
382
358
|
result.content.updated++;
|
|
383
359
|
await markSeedContentCollectionStale(collectionSlug);
|
|
@@ -394,32 +370,10 @@ async function applySeed(db, seed, options = {}) {
|
|
|
394
370
|
if (!sourceId) console.warn(`content.${collectionSlug}: translationOf "${entry.translationOf}" not found (not yet created or missing). Skipping translation link.`);
|
|
395
371
|
else translationOf = sourceId;
|
|
396
372
|
}
|
|
397
|
-
const
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
created = await withTransaction(db, async (trx) => {
|
|
402
|
-
const trxContentRepo = new ContentRepository(trx);
|
|
403
|
-
const trxBylineRepo = new BylineRepository(trx);
|
|
404
|
-
const item = await trxContentRepo.create({
|
|
405
|
-
type: collectionSlug,
|
|
406
|
-
slug: entry.slug,
|
|
407
|
-
status,
|
|
408
|
-
data: resolvedData,
|
|
409
|
-
locale: entryLocale,
|
|
410
|
-
translationOf,
|
|
411
|
-
publishedAt: status === "published" ? (/* @__PURE__ */ new Date()).toISOString() : null
|
|
412
|
-
});
|
|
413
|
-
contentMutated = true;
|
|
414
|
-
await applyContentBylines(trxBylineRepo, collectionSlug, item.id, entry, seedBylineIdMap);
|
|
415
|
-
await applyContentTaxonomies(trx, collectionSlug, item.id, entry, false);
|
|
416
|
-
if (status === "published") await trxContentRepo.publish(collectionSlug, item.id);
|
|
417
|
-
return item;
|
|
418
|
-
});
|
|
419
|
-
} catch (error) {
|
|
420
|
-
if (contentMutated) await markSeedContentCollectionStale(collectionSlug);
|
|
421
|
-
throw error;
|
|
422
|
-
}
|
|
373
|
+
const created = await writeSeedContent(db, collectionSlug, entry, resolvedData, seedBylineIdMap, {
|
|
374
|
+
locale: entryLocale,
|
|
375
|
+
translationOf
|
|
376
|
+
});
|
|
423
377
|
seedIdMap.set(entry.id, created.id);
|
|
424
378
|
result.content.created++;
|
|
425
379
|
await markSeedContentCollectionStale(collectionSlug);
|
|
@@ -564,9 +518,9 @@ async function applySeed(db, seed, options = {}) {
|
|
|
564
518
|
}
|
|
565
519
|
}
|
|
566
520
|
}
|
|
567
|
-
const { invalidateBylineCache } = await import("./bylines-
|
|
568
|
-
const { invalidateUrlPatternCache } = await import("./query-
|
|
569
|
-
const { invalidateRedirectCache } = await import("./cache-
|
|
521
|
+
const { invalidateBylineCache } = await import("./bylines-LqNRjma2.mjs").then((n) => n.t);
|
|
522
|
+
const { invalidateUrlPatternCache } = await import("./query-CEn9HXnf.mjs").then((n) => n.o);
|
|
523
|
+
const { invalidateRedirectCache } = await import("./cache-CSTy-R-K.mjs").then((n) => n.t);
|
|
570
524
|
invalidateBylineCache();
|
|
571
525
|
invalidateUrlPatternCache();
|
|
572
526
|
invalidateRedirectCache();
|
|
@@ -622,14 +576,70 @@ async function applyHierarchicalTerms(termRepo, taxonomyName, defLocale, terms,
|
|
|
622
576
|
}
|
|
623
577
|
if (remaining.length > 0) console.warn(`Could not process ${remaining.length} terms due to missing parents/translations`);
|
|
624
578
|
}
|
|
579
|
+
async function writeSeedContent(db, collection, entry, data, bylineIds, target) {
|
|
580
|
+
const repository = new ContentRepository(db);
|
|
581
|
+
const status = entry.status ?? "published";
|
|
582
|
+
const checks = [];
|
|
583
|
+
const statements = [];
|
|
584
|
+
let id;
|
|
585
|
+
if (target.existingId) {
|
|
586
|
+
id = target.existingId;
|
|
587
|
+
const snapshot = await repository.snapshot(collection, id);
|
|
588
|
+
if (!snapshot) throw new Error("Seed content is no longer available");
|
|
589
|
+
checks.push(snapshot.check);
|
|
590
|
+
statements.push(repository.prepareUpdate(collection, id, {
|
|
591
|
+
status,
|
|
592
|
+
data
|
|
593
|
+
}));
|
|
594
|
+
} else {
|
|
595
|
+
const created = await repository.prepareCreate({
|
|
596
|
+
type: collection,
|
|
597
|
+
slug: entry.slug,
|
|
598
|
+
status,
|
|
599
|
+
data,
|
|
600
|
+
locale: target.locale,
|
|
601
|
+
translationOf: target.translationOf,
|
|
602
|
+
publishedAt: status === "published" ? (/* @__PURE__ */ new Date()).toISOString() : null
|
|
603
|
+
});
|
|
604
|
+
id = created.id;
|
|
605
|
+
checks.push(...created.batch.checks ?? []);
|
|
606
|
+
statements.push(...created.batch.statements);
|
|
607
|
+
}
|
|
608
|
+
const bylines = await prepareContentBylines(new BylineRepository(db), collection, id, entry, bylineIds, !!target.existingId);
|
|
609
|
+
const terms = await prepareContentTaxonomies(db, collection, id, entry, !!target.existingId);
|
|
610
|
+
const draft = await repository.prepareDraftSnapshot(collection, id);
|
|
611
|
+
for (const batch of [
|
|
612
|
+
bylines,
|
|
613
|
+
terms,
|
|
614
|
+
draft
|
|
615
|
+
]) {
|
|
616
|
+
checks.push(...batch.checks ?? []);
|
|
617
|
+
statements.push(...batch.statements);
|
|
618
|
+
}
|
|
619
|
+
if (status === "published") statements.push(sql`UPDATE ${sql.table(`ec_${collection}`)}
|
|
620
|
+
SET live_revision_id = draft_revision_id, draft_revision_id = NULL, status = 'published', scheduled_at = NULL,
|
|
621
|
+
published_at = COALESCE(published_at, ${(/* @__PURE__ */ new Date()).toISOString()}), updated_at = ${(/* @__PURE__ */ new Date()).toISOString()}
|
|
622
|
+
WHERE id = ${id}`.compile(db));
|
|
623
|
+
statements.push(prepareContentMediaUsageCollectionStale(db, collection, "CONTENT_USAGE_STALE"));
|
|
624
|
+
await atomicBatch(db, {
|
|
625
|
+
checks,
|
|
626
|
+
statements
|
|
627
|
+
});
|
|
628
|
+
invalidateCollectionCache(collection);
|
|
629
|
+
const { invalidateTermCache } = await import("./taxonomies-CllxqaH0.mjs").then((n) => n.u);
|
|
630
|
+
invalidateTermCache();
|
|
631
|
+
const item = await repository.findById(collection, id);
|
|
632
|
+
if (!item) throw new Error("Failed to reload seeded content");
|
|
633
|
+
return item;
|
|
634
|
+
}
|
|
625
635
|
/**
|
|
626
636
|
* Apply byline credits to a content entry.
|
|
627
637
|
* In update mode, clears existing credits even if the seed has none.
|
|
628
638
|
*/
|
|
629
|
-
async function
|
|
639
|
+
async function prepareContentBylines(bylineRepo, collectionSlug, contentId, entry, seedBylineIdMap, isUpdate = false) {
|
|
630
640
|
if (!entry.bylines || entry.bylines.length === 0) {
|
|
631
|
-
if (isUpdate)
|
|
632
|
-
return;
|
|
641
|
+
if (isUpdate) return bylineRepo.prepareContentBylines(collectionSlug, contentId, []);
|
|
642
|
+
return { statements: [] };
|
|
633
643
|
}
|
|
634
644
|
const credits = entry.bylines.map((credit) => {
|
|
635
645
|
const bylineId = seedBylineIdMap.get(credit.byline);
|
|
@@ -640,30 +650,36 @@ async function applyContentBylines(bylineRepo, collectionSlug, contentId, entry,
|
|
|
640
650
|
};
|
|
641
651
|
}).filter((credit) => Boolean(credit));
|
|
642
652
|
if (credits.length !== entry.bylines.length) console.warn(`content.${collectionSlug}.${entry.slug}: one or more byline refs could not be resolved`);
|
|
643
|
-
if (credits.length > 0 || isUpdate)
|
|
653
|
+
if (credits.length > 0 || isUpdate) return bylineRepo.prepareContentBylines(collectionSlug, contentId, credits);
|
|
654
|
+
return { statements: [] };
|
|
644
655
|
}
|
|
645
656
|
/**
|
|
646
657
|
* Apply taxonomy term assignments to a content entry.
|
|
647
658
|
* In update mode, clears existing assignments before re-attaching.
|
|
648
659
|
*/
|
|
649
|
-
async function
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
}
|
|
656
|
-
return;
|
|
657
|
-
}
|
|
658
|
-
for (const [taxonomyName, termSlugs] of Object.entries(entry.taxonomies)) {
|
|
659
|
-
const termRepo = new TaxonomyRepository(db);
|
|
660
|
+
async function prepareContentTaxonomies(db, collectionSlug, contentId, entry, isUpdate) {
|
|
661
|
+
const checks = [];
|
|
662
|
+
const statements = [];
|
|
663
|
+
if (isUpdate) statements.push(db.deleteFrom("content_taxonomies").where("collection", "=", collectionSlug).where("entry_id", "=", contentId).compile());
|
|
664
|
+
for (const [taxonomyName, termSlugs] of Object.entries(entry.taxonomies ?? {})) {
|
|
665
|
+
const repository = new TaxonomyRepository(db);
|
|
660
666
|
for (const termSlug of termSlugs) {
|
|
661
|
-
const term = await
|
|
662
|
-
if (term)
|
|
667
|
+
const term = await repository.findBySlug(taxonomyName, termSlug);
|
|
668
|
+
if (!term) continue;
|
|
669
|
+
const row = await db.selectFrom("taxonomies").selectAll().where("id", "=", term.id).executeTakeFirst();
|
|
670
|
+
if (!row) throw new Error("Seed taxonomy changed during import");
|
|
671
|
+
checks.push(rowUnchanged("taxonomies", row));
|
|
672
|
+
statements.push(db.insertInto("content_taxonomies").values({
|
|
673
|
+
collection: collectionSlug,
|
|
674
|
+
entry_id: contentId,
|
|
675
|
+
taxonomy_id: row.translation_group ?? row.id
|
|
676
|
+
}).onConflict((conflict) => conflict.doNothing()).compile());
|
|
663
677
|
}
|
|
664
678
|
}
|
|
665
|
-
|
|
666
|
-
|
|
679
|
+
return {
|
|
680
|
+
checks,
|
|
681
|
+
statements
|
|
682
|
+
};
|
|
667
683
|
}
|
|
668
684
|
/**
|
|
669
685
|
* Apply menu items recursively
|
package/dist/astro/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { i as ContentItem } from "../types-
|
|
2
|
-
import { Ao as
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../runner-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../types-
|
|
7
|
-
import { i as ObjectCacheRuntimeConfig, r as ObjectCacheDescriptor } from "../types-
|
|
8
|
-
import "../public-url-
|
|
9
|
-
import "../validate-
|
|
10
|
-
import "../byline-fields-
|
|
11
|
-
import "../types
|
|
1
|
+
import { i as ContentItem } from "../types-CFgTpfPk.mjs";
|
|
2
|
+
import { Ao as DinewayConfig, At as ResolvedPlugin, Fo as StorageDescriptor, Mo as getStoredConfig, No as LocalStorageConfig, Po as S3StorageConfig, Vs as MediaItem } from "../types-QjOcidFc.mjs";
|
|
3
|
+
import "../types-7Th6Mwz3.mjs";
|
|
4
|
+
import "../runner-JnJSGXEB.mjs";
|
|
5
|
+
import "../index-CSUSBfdD.mjs";
|
|
6
|
+
import "../types-DkXuBo8k.mjs";
|
|
7
|
+
import { i as ObjectCacheRuntimeConfig, r as ObjectCacheDescriptor } from "../types-b2sq7ZDk.mjs";
|
|
8
|
+
import "../public-url-BV-YQ_LF.mjs";
|
|
9
|
+
import "../validate-A27peRc4.mjs";
|
|
10
|
+
import "../byline-fields-BmkhEDFF.mjs";
|
|
11
|
+
import "../types-DTjrkhKU.mjs";
|
|
12
12
|
import { DinewayHandlers, DinewayManifest, ManifestCollection } from "./types.mjs";
|
|
13
13
|
import { AstroIntegration } from "astro";
|
|
14
14
|
|
|
@@ -82,6 +82,10 @@ declare function memoryCache(options?: MemoryCacheOptions): ObjectCacheDescripto
|
|
|
82
82
|
/**
|
|
83
83
|
* Create the Dineway Astro integration
|
|
84
84
|
*/
|
|
85
|
-
declare function dineway(config?: DinewayConfig): AstroIntegration
|
|
85
|
+
declare function dineway(config?: DinewayConfig): AstroIntegration & {
|
|
86
|
+
api: {
|
|
87
|
+
dinewayConfig: DinewayConfig;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
86
90
|
//#endregion
|
|
87
91
|
export { type ContentItem, type DinewayConfig, type DinewayHandlers, type DinewayManifest, type LocalStorageConfig, type ManifestCollection, type MediaItem, type MemoryCacheOptions, type ResolvedPlugin, type S3StorageConfig, type StorageDescriptor, dineway as default, getStoredConfig, local, memoryCache, s3 };
|
package/dist/astro/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { t as INTERNAL_MEDIA_PREFIX } from "../normalize-
|
|
2
|
-
import { n as VERSION, t as COMMIT } from "../version-
|
|
3
|
-
import { t as defaultSeed } from "../default-
|
|
4
|
-
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-
|
|
1
|
+
import { t as INTERNAL_MEDIA_PREFIX } from "../normalize-5rct_U0I.mjs";
|
|
2
|
+
import { n as VERSION, t as COMMIT } from "../version-BWxyC5s4.mjs";
|
|
3
|
+
import { t as defaultSeed } from "../default-D9zxuUU7.mjs";
|
|
4
|
+
import { n as validateAllowedOrigins, r as validateOriginShape } from "../allowed-origins-DV3LWuWW.mjs";
|
|
5
|
+
import { r as writeWorkersBuildMetadata } from "../workers-build-BaQCrSmf.mjs";
|
|
5
6
|
import { createRequire } from "node:module";
|
|
6
7
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
8
|
import { dirname, isAbsolute, relative, resolve } from "node:path";
|
|
8
|
-
import { fontProviders } from "astro/config";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { fontProviders } from "astro/config";
|
|
10
11
|
|
|
11
12
|
//#region src/astro/storage/adapters.ts
|
|
12
13
|
/**
|
|
@@ -1376,8 +1377,8 @@ function isWorkersAdapter(name) {
|
|
|
1376
1377
|
return name === "@astrojs/cloudflare";
|
|
1377
1378
|
}
|
|
1378
1379
|
function validateWorkersConfig(config) {
|
|
1379
|
-
if (config.database?.entrypoint !== "dineway/db/
|
|
1380
|
-
if (!config.storage || config.storage.entrypoint === "dineway/storage/local") throw new Error("Cloudflare Workers
|
|
1380
|
+
if (config.database?.entrypoint !== "dineway/db/d1") throw new Error("Cloudflare Workers require database: d1() from dineway/db. Apply D1 migrations explicitly before deployment.");
|
|
1381
|
+
if (!config.storage || config.storage.entrypoint === "dineway/storage/local") throw new Error("Cloudflare Workers require durable object storage. Use storage: s3() from dineway/astro, with S3_* runtime secrets (including R2's S3 API).");
|
|
1381
1382
|
if ((config.sandboxed?.length || config.marketplace) && !config.sandboxRunner) throw new Error("Cloudflare Workers require a Workers-compatible sandboxRunner for sandboxed plugins or the marketplace. The default Node worker-thread sandbox is unavailable.");
|
|
1382
1383
|
if (config.playground) throw new Error("The Node playground is unavailable on Cloudflare Workers.");
|
|
1383
1384
|
}
|
|
@@ -1519,6 +1520,28 @@ const NODE_NATIVE_EXTERNALS = [
|
|
|
1519
1520
|
"@libsql/kysely-libsql",
|
|
1520
1521
|
"pg"
|
|
1521
1522
|
];
|
|
1523
|
+
/** Apply SDK browser mappings after the Cloudflare plugin defines its neutral Worker environment. */
|
|
1524
|
+
function workersEnvironmentConfig(name) {
|
|
1525
|
+
if (name !== "ssr") return;
|
|
1526
|
+
const fields = {
|
|
1527
|
+
mainFields: [
|
|
1528
|
+
"browser",
|
|
1529
|
+
"module",
|
|
1530
|
+
"main"
|
|
1531
|
+
],
|
|
1532
|
+
aliasFields: [["browser"]]
|
|
1533
|
+
};
|
|
1534
|
+
return {
|
|
1535
|
+
build: { rolldownOptions: { resolve: fields } },
|
|
1536
|
+
optimizeDeps: {
|
|
1537
|
+
esbuildOptions: {
|
|
1538
|
+
platform: "browser",
|
|
1539
|
+
mainFields: fields.mainFields
|
|
1540
|
+
},
|
|
1541
|
+
rolldownOptions: { resolve: fields }
|
|
1542
|
+
}
|
|
1543
|
+
};
|
|
1544
|
+
}
|
|
1522
1545
|
/**
|
|
1523
1546
|
* Creates the Vite config update for Dineway.
|
|
1524
1547
|
*/
|
|
@@ -1575,7 +1598,15 @@ function createViteConfig(options, command) {
|
|
|
1575
1598
|
}
|
|
1576
1599
|
]
|
|
1577
1600
|
},
|
|
1578
|
-
plugins: [
|
|
1601
|
+
plugins: [
|
|
1602
|
+
createVirtualModulesPlugin(options),
|
|
1603
|
+
...workers ? [{
|
|
1604
|
+
name: "dineway-workers-package-resolution",
|
|
1605
|
+
enforce: "post",
|
|
1606
|
+
configEnvironment: workersEnvironmentConfig
|
|
1607
|
+
}] : [],
|
|
1608
|
+
...useSource ? devPlugins : []
|
|
1609
|
+
],
|
|
1579
1610
|
ssr: {
|
|
1580
1611
|
...workers ? { resolve: { mainFields: [
|
|
1581
1612
|
"browser",
|
|
@@ -1755,8 +1786,10 @@ function dineway(config = {}) {
|
|
|
1755
1786
|
};
|
|
1756
1787
|
const useExternalAuth = !!(resolvedConfig.auth && "entrypoint" in resolvedConfig.auth);
|
|
1757
1788
|
let astroCommand;
|
|
1789
|
+
let workersServerDirectory;
|
|
1758
1790
|
return {
|
|
1759
1791
|
name: "dineway",
|
|
1792
|
+
api: { dinewayConfig: resolvedConfig },
|
|
1760
1793
|
hooks: {
|
|
1761
1794
|
"astro:config:setup": ({ injectRoute, addMiddleware, logger, updateConfig, config: astroConfig, command }) => {
|
|
1762
1795
|
if (isWorkersAdapter(astroConfig.adapter?.name)) validateWorkersConfig(resolvedConfig);
|
|
@@ -1832,6 +1865,10 @@ function dineway(config = {}) {
|
|
|
1832
1865
|
entrypoint: resolvedConfig.playground.middlewareEntrypoint,
|
|
1833
1866
|
order: "pre"
|
|
1834
1867
|
});
|
|
1868
|
+
if (isWorkersAdapter(astroConfig.adapter?.name)) addMiddleware({
|
|
1869
|
+
entrypoint: "dineway/middleware/workers",
|
|
1870
|
+
order: "pre"
|
|
1871
|
+
});
|
|
1835
1872
|
addMiddleware({
|
|
1836
1873
|
entrypoint: "dineway/middleware",
|
|
1837
1874
|
order: "pre"
|
|
@@ -1897,7 +1934,11 @@ function dineway(config = {}) {
|
|
|
1897
1934
|
}
|
|
1898
1935
|
});
|
|
1899
1936
|
},
|
|
1900
|
-
"astro:
|
|
1937
|
+
"astro:config:done": ({ config: astroConfig }) => {
|
|
1938
|
+
if (isWorkersAdapter(astroConfig.adapter?.name)) workersServerDirectory = fileURLToPath(astroConfig.build.server);
|
|
1939
|
+
},
|
|
1940
|
+
"astro:build:done": async ({ logger }) => {
|
|
1941
|
+
if (workersServerDirectory) await writeWorkersBuildMetadata(workersServerDirectory, resolvedConfig);
|
|
1901
1942
|
logger.info("Build complete");
|
|
1902
1943
|
}
|
|
1903
1944
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../types-
|
|
3
|
-
import "../../runner-
|
|
4
|
-
import "../../index-
|
|
5
|
-
import "../../types-
|
|
6
|
-
import "../../public-url-
|
|
7
|
-
import "../../validate-
|
|
8
|
-
import "../../byline-fields-
|
|
9
|
-
import "../../types
|
|
1
|
+
import { ho as SiteAuthTokenContext } from "../../types-QjOcidFc.mjs";
|
|
2
|
+
import "../../types-7Th6Mwz3.mjs";
|
|
3
|
+
import "../../runner-JnJSGXEB.mjs";
|
|
4
|
+
import "../../index-CSUSBfdD.mjs";
|
|
5
|
+
import "../../types-DkXuBo8k.mjs";
|
|
6
|
+
import "../../public-url-BV-YQ_LF.mjs";
|
|
7
|
+
import "../../validate-A27peRc4.mjs";
|
|
8
|
+
import "../../byline-fields-BmkhEDFF.mjs";
|
|
9
|
+
import "../../types-DTjrkhKU.mjs";
|
|
10
10
|
import { DinewayHandlers } from "../types.mjs";
|
|
11
11
|
import { User } from "@dineway-ai/auth";
|
|
12
12
|
import * as astro from "astro";
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
1
|
+
import "../../d1-binding-D6HZa3ks.mjs";
|
|
2
|
+
import { getRequestContext, runWithContext } from "../../request-context.mjs";
|
|
3
|
+
import "../../dialect-helpers-C6xtO-Ui.mjs";
|
|
4
|
+
import { n as bindOAuthTokenHash } from "../../actor-DxUAJgQX.mjs";
|
|
5
|
+
import { n as prepareAuthenticatedWriteChecks } from "../../atomic-authority-CnBQJ14T.mjs";
|
|
6
|
+
import "../../after-BVaUn7bK.mjs";
|
|
7
|
+
import { t as apiError } from "../../error-Dd8LtpG5.mjs";
|
|
8
|
+
import { a as hashApiToken, i as hasScope } from "../../api-tokens-D5K_Csub.mjs";
|
|
9
|
+
import { n as getPublicOrigin } from "../../public-url-D5Wjq0sy.mjs";
|
|
10
|
+
import { t as getAuthMode } from "../../mode-CPf_KZ37.mjs";
|
|
11
|
+
import { t as resolveSessionUser } from "../../session-user-DeqTcAmR.mjs";
|
|
12
|
+
import { a as resolveApiToken, o as resolveOAuthToken } from "../../api-tokens-_6tMD1W4.mjs";
|
|
7
13
|
import { ulid } from "ulidx";
|
|
8
14
|
import { defineMiddleware } from "astro:middleware";
|
|
9
15
|
import { createKyselyAdapter } from "@dineway-ai/auth/adapters/kysely";
|
|
@@ -180,7 +186,7 @@ function isPublicDinewayRoute(pathname, authProviders = []) {
|
|
|
180
186
|
function isCsrfExemptPublicRoute(pathname) {
|
|
181
187
|
return CSRF_EXEMPT_PUBLIC_ROUTES.has(pathname);
|
|
182
188
|
}
|
|
183
|
-
const
|
|
189
|
+
const authenticateRequest = defineMiddleware(async (context, next) => {
|
|
184
190
|
const { url } = context;
|
|
185
191
|
const isAdminRoute = url.pathname.startsWith("/_dineway/admin");
|
|
186
192
|
const isSetupRoute = url.pathname.startsWith("/_dineway/admin/setup");
|
|
@@ -442,7 +448,7 @@ async function handleBearerAuth(context) {
|
|
|
442
448
|
};
|
|
443
449
|
} else if (token.startsWith("ec_oat_")) {
|
|
444
450
|
resolved = await resolveOAuthToken(dineway.db, token);
|
|
445
|
-
if (resolved) authToken = { type: "oauth_token" };
|
|
451
|
+
if (resolved) authToken = bindOAuthTokenHash({ type: "oauth_token" }, hashApiToken(token));
|
|
446
452
|
} else return "invalid";
|
|
447
453
|
if (!resolved) return "invalid";
|
|
448
454
|
const user = await createKyselyAdapter(dineway.db).getUserById(resolved.userId);
|
|
@@ -700,6 +706,21 @@ function enforceTokenScope(pathname, method, tokenScopes) {
|
|
|
700
706
|
}
|
|
701
707
|
});
|
|
702
708
|
}
|
|
709
|
+
const onRequest = defineMiddleware((context, next) => authenticateRequest(context, () => {
|
|
710
|
+
const { user, authToken, tokenScopes, dineway } = context.locals;
|
|
711
|
+
if (!user || !dineway || !authToken && getAuthMode(dineway.config).type !== "passkey") return next();
|
|
712
|
+
const principal = {
|
|
713
|
+
id: user.id,
|
|
714
|
+
role: user.role
|
|
715
|
+
};
|
|
716
|
+
const scopes = tokenScopes ? [...tokenScopes] : void 0;
|
|
717
|
+
return runWithContext({
|
|
718
|
+
editMode: false,
|
|
719
|
+
...getRequestContext(),
|
|
720
|
+
writePrincipal: principal,
|
|
721
|
+
prepareWriteChecks: (db) => prepareAuthenticatedWriteChecks(db, principal, authToken, scopes)
|
|
722
|
+
}, next);
|
|
723
|
+
}));
|
|
703
724
|
|
|
704
725
|
//#endregion
|
|
705
726
|
export { onRequest };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import "../../
|
|
1
|
+
import "../../d1-binding-D6HZa3ks.mjs";
|
|
2
2
|
import { getRequestContext } from "../../request-context.mjs";
|
|
3
|
-
import "../../
|
|
4
|
-
import "../../
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
3
|
+
import "../../dialect-helpers-C6xtO-Ui.mjs";
|
|
4
|
+
import "../../base64-Cz-aU0X1.mjs";
|
|
5
|
+
import "../../types-BqxIv8Il.mjs";
|
|
6
|
+
import { r as getDb } from "../../loader-Cgsx23wU.mjs";
|
|
7
|
+
import { n as alternateTrailingSlashPath, t as RedirectRepository } from "../../redirect-HLI3wT5Y.mjs";
|
|
8
|
+
import { a as matchCachedPatterns, n as compileRedirectRules, o as setCachedRedirects, r as getCachedRedirects } from "../../cache-CSTy-R-K.mjs";
|
|
9
|
+
import { n as isTerminalStatus } from "../../status-Bwkeuz8g.mjs";
|
|
9
10
|
import { defineMiddleware } from "astro:middleware";
|
|
10
11
|
|
|
11
12
|
//#region src/astro/middleware/redirect.ts
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { runWithContext } from "../../request-context.mjs";
|
|
2
|
-
import "../../base64-
|
|
3
|
-
import "../../
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { getRequestContext, runWithContext } from "../../request-context.mjs";
|
|
2
|
+
import "../../base64-Cz-aU0X1.mjs";
|
|
3
|
+
import "../../after-BVaUn7bK.mjs";
|
|
4
|
+
import "../../options-BcqHWpc-.mjs";
|
|
5
|
+
import "../../runtime-env-CQVAWHzH.mjs";
|
|
6
|
+
import { a as resolveSecretsCached } from "../../secrets-Cg0D2gQW.mjs";
|
|
7
|
+
import { n as parseContentId, r as verifyPreviewToken } from "../../tokens-Bjuf1HID.mjs";
|
|
6
8
|
import { defineMiddleware } from "astro:middleware";
|
|
7
9
|
|
|
8
10
|
//#region src/visual-editing/toolbar.ts
|
|
@@ -1335,11 +1337,15 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1335
1337
|
const { user } = context.locals;
|
|
1336
1338
|
const isEditor = !!user && user.role >= 30;
|
|
1337
1339
|
const requestDb = context.locals.__dinewayRequestDb;
|
|
1338
|
-
if (requestDb)
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1340
|
+
if (requestDb) {
|
|
1341
|
+
const hasEditCookie = cookies.get("dineway-edit-mode")?.value === "true";
|
|
1342
|
+
return runWithContext({
|
|
1343
|
+
...getRequestContext(),
|
|
1344
|
+
editMode: hasEditCookie,
|
|
1345
|
+
db: requestDb,
|
|
1346
|
+
dbIsIsolated: true
|
|
1347
|
+
}, () => next());
|
|
1348
|
+
}
|
|
1343
1349
|
const hasEditCookie = cookies.get("dineway-edit-mode")?.value === "true";
|
|
1344
1350
|
const hasPreviewToken = url.searchParams.has("_preview");
|
|
1345
1351
|
if (!hasEditCookie && !hasPreviewToken && !isEditor) return next();
|
|
@@ -1364,6 +1370,7 @@ const onRequest = defineMiddleware(async (context, next) => {
|
|
|
1364
1370
|
} else console.warn("[dineway] Preview token present but Dineway runtime not initialized; preview disabled.");
|
|
1365
1371
|
}
|
|
1366
1372
|
if (hasEditCookie || hasPreviewToken) return runWithContext({
|
|
1373
|
+
...getRequestContext(),
|
|
1367
1374
|
editMode,
|
|
1368
1375
|
preview,
|
|
1369
1376
|
locale
|