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
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../types-
|
|
3
|
-
import { _ as MediaValue, c as EmbedResult, l as ImageEmbed, s as EmbedOptions } from "../placeholder-
|
|
4
|
-
import "../runner-
|
|
5
|
-
import "../index-
|
|
6
|
-
import "../types-
|
|
7
|
-
import "../public-url-
|
|
8
|
-
import { x as MediaReference } from "../validate-
|
|
9
|
-
import "../byline-fields-
|
|
10
|
-
import "../types
|
|
11
|
-
import { t as getPublicOrigin } from "../public-url-
|
|
12
|
-
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as renderPageMetadata, f as resolvePageMetadata, i as generateBaseSeoContributions, l as createSha256CspHash, o as renderFragments } from "../jsonld-
|
|
1
|
+
import { $i as getEditMeta, F as PageMetadataContribution, Nn as getTaxonomyTerms, Rs as PublicComment, Tn as Widget, Tt as PublicPageContext, Wa as getCollectionInfo, Wn as getMenu, Zi as getDinewayCollection, _n as getWidgetArea, ba as sanitizeHref, rr as getComments, sr as getSiteSettings } from "../types-QjOcidFc.mjs";
|
|
2
|
+
import "../types-7Th6Mwz3.mjs";
|
|
3
|
+
import { _ as MediaValue, c as EmbedResult, l as ImageEmbed, s as EmbedOptions } from "../placeholder-BHTaoCYx.mjs";
|
|
4
|
+
import "../runner-JnJSGXEB.mjs";
|
|
5
|
+
import "../index-CSUSBfdD.mjs";
|
|
6
|
+
import "../types-DkXuBo8k.mjs";
|
|
7
|
+
import "../public-url-BV-YQ_LF.mjs";
|
|
8
|
+
import { x as MediaReference } from "../validate-A27peRc4.mjs";
|
|
9
|
+
import "../byline-fields-BmkhEDFF.mjs";
|
|
10
|
+
import "../types-DTjrkhKU.mjs";
|
|
11
|
+
import { t as getPublicOrigin } from "../public-url-B9zEdO8p.mjs";
|
|
12
|
+
import { a as generateSiteSeoContributions, c as ResolvedPageMetadata, d as renderPageMetadata, f as resolvePageMetadata, i as generateBaseSeoContributions, l as createSha256CspHash, o as renderFragments } from "../jsonld-CqIVIeZK.mjs";
|
|
13
13
|
import { getPageRuntime } from "../page/index.mjs";
|
|
14
|
-
import { t as getMediaProvider } from "../provider-loader-
|
|
14
|
+
import { t as getMediaProvider } from "../provider-loader-C0GaLwKB.mjs";
|
|
15
15
|
|
|
16
16
|
//#region src/utils/sanitize.d.ts
|
|
17
17
|
/**
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import "../
|
|
2
|
-
import "../
|
|
3
|
-
import "../
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
17
|
-
import "../
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
import {
|
|
21
|
-
import "../
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import { t as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
1
|
+
import "../d1-binding-D6HZa3ks.mjs";
|
|
2
|
+
import "../dialect-helpers-C6xtO-Ui.mjs";
|
|
3
|
+
import "../base64-Cz-aU0X1.mjs";
|
|
4
|
+
import "../types-BqxIv8Il.mjs";
|
|
5
|
+
import "../loader-Cgsx23wU.mjs";
|
|
6
|
+
import "../after-BVaUn7bK.mjs";
|
|
7
|
+
import "../object-cache-BGjIlY9s.mjs";
|
|
8
|
+
import "../media-3fK0u-bo.mjs";
|
|
9
|
+
import "../comment-Bi7cJ9SS.mjs";
|
|
10
|
+
import "../options-BcqHWpc-.mjs";
|
|
11
|
+
import "../request-cache-DPmV5nk4.mjs";
|
|
12
|
+
import "../content-refresh-l4mPoGeX.mjs";
|
|
13
|
+
import "../fts-manager-BeWtB7ZD.mjs";
|
|
14
|
+
import "../public-discovery-BAbOvKiR.mjs";
|
|
15
|
+
import "../registry-RD9qTnYL.mjs";
|
|
16
|
+
import { n as buildRenderMediaUrl } from "../url-D375-6LM.mjs";
|
|
17
|
+
import { i as getSiteSettings } from "../settings-DFzevIrU.mjs";
|
|
18
|
+
import { t as getCollectionInfo } from "../query-DAS6VbMS.mjs";
|
|
19
|
+
import "../resolve-C80Pm2DW.mjs";
|
|
20
|
+
import { a as getTaxonomyTerms } from "../taxonomies-CllxqaH0.mjs";
|
|
21
|
+
import { n as sanitizeHref } from "../url-bv5i4JN0.mjs";
|
|
22
|
+
import { r as getEditMeta, t as getDinewayCollection } from "../query-CEn9HXnf.mjs";
|
|
23
|
+
import "../comment-reaction-BLqIj5mx.mjs";
|
|
24
|
+
import { i as getComments, t as getMenu } from "../menus-CbR_J8cJ.mjs";
|
|
25
|
+
import { t as getWidgetArea } from "../widgets-Di-6yDH7.mjs";
|
|
26
|
+
import { t as getMediaProvider } from "../provider-loader-3MY1SjzA.mjs";
|
|
27
|
+
import { n as getPublicOrigin } from "../public-url-D5Wjq0sy.mjs";
|
|
28
|
+
import { a as createSha256CspHash, c as resolvePageMetadata, g as absolutizeMediaUrl, n as generateSiteSeoContributions, o as escapeHtmlAttr, r as renderFragments, s as renderPageMetadata, t as generateBaseSeoContributions } from "../seo-contributions-Dt57p6Sq.mjs";
|
|
27
29
|
import { getPageRuntime } from "../page/index.mjs";
|
|
28
30
|
import sanitizeHtml from "sanitize-html";
|
|
29
31
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as encodeCursor, r as decodeCursor } from "./types-
|
|
2
|
-
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-
|
|
1
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-BqxIv8Il.mjs";
|
|
2
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-BnG3LPMN.mjs";
|
|
3
3
|
import { ulid } from "ulidx";
|
|
4
4
|
|
|
5
5
|
//#region src/database/repositories/user.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as slugify } from "./slugify-
|
|
2
|
-
import { o as RESERVED_FIELD_SLUGS } from "./types-
|
|
1
|
+
import { n as slugify } from "./slugify-Di8Q_MFq.mjs";
|
|
2
|
+
import { o as RESERVED_FIELD_SLUGS } from "./types-CyBH89BS.mjs";
|
|
3
3
|
import mime from "mime/lite";
|
|
4
4
|
|
|
5
5
|
//#region src/import/utils.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as FieldType, m as PublicDiscoveryRules } from "./types-
|
|
2
|
-
import { t as Database } from "./types-
|
|
3
|
-
import { d as Storage } from "./types-
|
|
1
|
+
import { d as FieldType, m as PublicDiscoveryRules } from "./types-Bs-7Geuh.mjs";
|
|
2
|
+
import { t as Database } from "./types-7Th6Mwz3.mjs";
|
|
3
|
+
import { d as Storage } from "./types-CwkJp6zr.mjs";
|
|
4
4
|
import { Kysely } from "kysely";
|
|
5
5
|
|
|
6
6
|
//#region src/settings/types.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as FIELD_TYPES } from "./types-
|
|
3
|
-
import { r as publicDiscoveryRulesSchema } from "./public-discovery-
|
|
1
|
+
import { c as __exportAll } from "./runner-CVeq0266.mjs";
|
|
2
|
+
import { n as FIELD_TYPES } from "./types-CyBH89BS.mjs";
|
|
3
|
+
import { r as publicDiscoveryRulesSchema } from "./public-discovery-BAbOvKiR.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/seed/validate.ts
|
|
6
6
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as getDb } from "./loader-
|
|
2
|
-
import { r as requestCached } from "./request-cache-
|
|
3
|
-
import { t as getWidgetComponents$1 } from "./components-
|
|
1
|
+
import { r as getDb } from "./loader-Cgsx23wU.mjs";
|
|
2
|
+
import { r as requestCached } from "./request-cache-DPmV5nk4.mjs";
|
|
3
|
+
import { t as getWidgetComponents$1 } from "./components-BWQUCJEr.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/widgets/index.ts
|
|
6
6
|
/**
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { getRequestContext, runWithContext } from "./request-context.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { AtomicWriteConflict, atomicBatch, isD1Database, rowUnchanged } from "./database/batch.mjs";
|
|
3
|
+
import { t as ContentRepository } from "./content-NobcQti0.mjs";
|
|
4
|
+
import { t as SiteActivityRepository } from "./site-activity-BrN2NviL.mjs";
|
|
5
|
+
import { t as buildStableHash } from "./stable-hash-DEtJgcp7.mjs";
|
|
6
|
+
import { r as ReviewRequestRepository } from "./review-requests-BF2eEKr8.mjs";
|
|
7
|
+
import { t as PublicationAuthorizationError } from "./publication-authorization-BrEZ2TsE.mjs";
|
|
8
|
+
import { t as ReviewPayloadBuilder } from "./review-payload-DEylbssM.mjs";
|
|
9
|
+
import { t as DinewayToolsError } from "./service-wYQ_ePZ4.mjs";
|
|
10
|
+
import { i as REVIEW_MODEL, o as matchesDecisionModel } from "./runs-B5BExdKO.mjs";
|
|
11
|
+
import { i as reviewDraft, n as loadReviewContext, r as loadReviewImages, t as ReviewEvidenceError } from "./evidence-xJf8hQgH.mjs";
|
|
12
|
+
import { a as reviewQuestions, n as classifyReview, r as getReviewPolicy, t as REVIEW_THRESHOLDS } from "./policy-Dej7NJFD.mjs";
|
|
13
|
+
import { sql } from "kysely";
|
|
11
14
|
import { z } from "zod";
|
|
12
15
|
|
|
13
16
|
//#region src/site-context/publication-transaction.ts
|
|
@@ -100,44 +103,52 @@ var ReviewAutomationWorker = class {
|
|
|
100
103
|
const response = await this.options.gateway.decide(request);
|
|
101
104
|
if (!matchesDecisionModel(REVIEW_MODEL, response.model)) throw new ReviewEvidenceError("The provider returned a different model. A reviewer must assess this content.");
|
|
102
105
|
const decision = classifyReview(policy, response);
|
|
106
|
+
const snapshot = await new ContentRepository(this.options.db).snapshot(review.collection, review.entryId);
|
|
107
|
+
if (!snapshot) throw new ReviewEvidenceError("The content no longer exists.");
|
|
108
|
+
const revisionIds = [snapshot.item.liveRevisionId, snapshot.item.draftRevisionId].filter((id) => id !== null);
|
|
109
|
+
const revisions = revisionIds.length ? await this.options.db.selectFrom("revisions").selectAll().where("id", "in", revisionIds).execute() : [];
|
|
103
110
|
if ((await new ReviewPayloadBuilder(this.options.handlers).buildContentReviewPayload({
|
|
104
111
|
collection: review.collection,
|
|
105
112
|
id: review.entryId
|
|
106
113
|
})).actionHash !== review.actionHash) throw new ReviewEvidenceError("The content changed during automated review. Submit the current revision.");
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
114
|
+
const statements = [this.options.db.updateTable(JOBS).set({
|
|
115
|
+
evidence_json: JSON.stringify({
|
|
116
|
+
...evidence,
|
|
117
|
+
resolvedModel: response.model,
|
|
118
|
+
answers: response.answers,
|
|
119
|
+
usage: response.usage,
|
|
120
|
+
assessedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
121
|
+
}),
|
|
122
|
+
state: decision.outcome === "manual" ? "manual" : "complete",
|
|
123
|
+
reason: decision.reason
|
|
124
|
+
}).where("review_id", "=", job.review_id).where("state", "=", "assessing").where("updated_at", "=", claimed.updated_at).compile()];
|
|
125
|
+
statements.push(new SiteActivityRepository(this.options.db).prepareCreate({
|
|
126
|
+
actorType: "system",
|
|
127
|
+
actorId: "jev-review",
|
|
128
|
+
authMetadata: {
|
|
129
|
+
auth_method: "automated_review",
|
|
130
|
+
model: response.model
|
|
131
|
+
},
|
|
132
|
+
actionType: `review.${decision.outcome === "manual" ? "manual_required" : decision.outcome}`,
|
|
133
|
+
subjectType: "review_request",
|
|
134
|
+
subjectId: job.review_id,
|
|
135
|
+
scope: review.scope,
|
|
136
|
+
summary: decision.reason,
|
|
137
|
+
sourceType: "system",
|
|
138
|
+
sourceName: "jev-review",
|
|
139
|
+
resultStatus: decision.outcome === "manual" ? "pending" : "succeeded",
|
|
140
|
+
detail: {
|
|
141
|
+
model: response.model,
|
|
142
|
+
policyVersion: policy.version
|
|
143
|
+
}
|
|
144
|
+
}).statement);
|
|
145
|
+
const checks = [
|
|
146
|
+
snapshot.check,
|
|
147
|
+
...revisions.map((row) => rowUnchanged("revisions", row)),
|
|
148
|
+
sql`EXISTS (SELECT 1 FROM _dineway_review_jobs WHERE review_id = ${job.review_id} AND state = 'assessing' AND updated_at = ${claimed.updated_at})`
|
|
149
|
+
];
|
|
150
|
+
if (decision.outcome !== "manual") {
|
|
151
|
+
const resolution = await new ReviewRequestRepository(this.options.db).prepareResolve(job.review_id, {
|
|
141
152
|
decision: decision.outcome,
|
|
142
153
|
resolvedByActorType: "system",
|
|
143
154
|
resolvedByActorId: "jev-review",
|
|
@@ -147,7 +158,19 @@ var ReviewAutomationWorker = class {
|
|
|
147
158
|
},
|
|
148
159
|
reviewNote: decision.reason
|
|
149
160
|
});
|
|
150
|
-
|
|
161
|
+
if (!resolution) return;
|
|
162
|
+
checks.push(...resolution.checks ?? []);
|
|
163
|
+
statements.push(...resolution.statements);
|
|
164
|
+
}
|
|
165
|
+
try {
|
|
166
|
+
await atomicBatch(this.options.db, {
|
|
167
|
+
checks,
|
|
168
|
+
statements
|
|
169
|
+
});
|
|
170
|
+
} catch (error) {
|
|
171
|
+
if (error instanceof AtomicWriteConflict) return;
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
151
174
|
} catch (error) {
|
|
152
175
|
await this.manual(claimed, error instanceof ReviewEvidenceError || error instanceof DinewayToolsError ? error.message : "Complete review evidence or the provider response could not be verified. A human reviewer is required.");
|
|
153
176
|
}
|
|
@@ -160,11 +183,17 @@ var ReviewAutomationWorker = class {
|
|
|
160
183
|
}).where("review_id", "=", job.review_id).where("state", "=", "assessing").where("updated_at", "=", job.updated_at).execute();
|
|
161
184
|
}
|
|
162
185
|
async release(job) {
|
|
163
|
-
|
|
186
|
+
const claimed = await this.options.db.updateTable(JOBS).set({
|
|
164
187
|
release_state: "releasing",
|
|
165
188
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
166
|
-
}).where("review_id", "=", job.review_id).where("release_state", "=", "queued").returningAll().executeTakeFirst()
|
|
189
|
+
}).where("review_id", "=", job.review_id).where("release_state", "=", "queued").returningAll().executeTakeFirst();
|
|
190
|
+
if (!claimed) return;
|
|
167
191
|
try {
|
|
192
|
+
if (isD1Database(this.options.db)) {
|
|
193
|
+
const result = await this.options.release(job.review_id);
|
|
194
|
+
if ((await this.options.db.selectFrom(JOBS).select("release_state").where("review_id", "=", job.review_id).executeTakeFirst())?.release_state !== result) throw new ReviewEvidenceError("D1 publication must commit its release job in the same atomic batch.");
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
168
197
|
await runPublicationTransaction(this.options.db, async (trx) => {
|
|
169
198
|
const review = await new ReviewRequestRepository(trx).findById(job.review_id);
|
|
170
199
|
if (!review || review.status !== "approved" || review.revokedAt) throw new ReviewEvidenceError("The approval is no longer valid.");
|
|
@@ -180,7 +209,7 @@ var ReviewAutomationWorker = class {
|
|
|
180
209
|
release_state: "blocked",
|
|
181
210
|
release_reason: error instanceof PublicationAuthorizationError || error instanceof ReviewEvidenceError ? error.message : "Approved, but publication could not complete.",
|
|
182
211
|
updated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
183
|
-
}).where("review_id", "=", job.review_id).where("release_state", "=", "releasing").execute();
|
|
212
|
+
}).where("review_id", "=", job.review_id).where("release_state", "=", "releasing").where("updated_at", "=", claimed.updated_at).execute();
|
|
184
213
|
}
|
|
185
214
|
}
|
|
186
215
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
|
|
5
|
+
//#region src/astro/integration/workers-build.ts
|
|
6
|
+
const WORKERS_BUILD_METADATA = "dineway-workers.json";
|
|
7
|
+
const databaseSchema = z.object({
|
|
8
|
+
entrypoint: z.literal("dineway/db/d1"),
|
|
9
|
+
binding: z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/)
|
|
10
|
+
});
|
|
11
|
+
async function writeWorkersBuildMetadata(directory, config) {
|
|
12
|
+
const database = databaseSchema.parse({
|
|
13
|
+
entrypoint: config.database?.entrypoint,
|
|
14
|
+
binding: z.object({ binding: z.string() }).parse(config.database?.config).binding
|
|
15
|
+
});
|
|
16
|
+
await writeFile(join(directory, WORKERS_BUILD_METADATA), JSON.stringify({ database }) + "\n");
|
|
17
|
+
}
|
|
18
|
+
async function validateWorkersBindings(directory, config) {
|
|
19
|
+
let metadata;
|
|
20
|
+
try {
|
|
21
|
+
metadata = JSON.parse(await readFile(join(directory, WORKERS_BUILD_METADATA), "utf8"));
|
|
22
|
+
} catch (cause) {
|
|
23
|
+
throw new Error("Missing Dineway build metadata. Rebuild the Cloudflare application before deploying.", { cause });
|
|
24
|
+
}
|
|
25
|
+
const { database } = z.object({ database: databaseSchema }).parse(metadata);
|
|
26
|
+
const bindings = z.array(z.object({
|
|
27
|
+
binding: z.string(),
|
|
28
|
+
database_id: z.string().uuid()
|
|
29
|
+
})).safeParse(config.d1_databases ?? []);
|
|
30
|
+
if (!bindings.success) throw new Error("D1 bindings require a binding name and a valid database_id.");
|
|
31
|
+
if (new Set(bindings.data.map((binding) => binding.binding)).size !== bindings.data.length) throw new Error("D1 binding names must be unique.");
|
|
32
|
+
if (!bindings.data.some((binding) => binding.binding === database.binding)) throw new Error(`Missing D1 binding ${database.binding}. Add it to the Wrangler configuration and rebuild.`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { validateWorkersBindings as n, writeWorkersBuildMetadata as r, WORKERS_BUILD_METADATA as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as hashString } from "./hash-
|
|
1
|
+
import { c as __exportAll } from "./runner-CVeq0266.mjs";
|
|
2
|
+
import { n as hashString } from "./hash-lNx3KJis.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/schema/zod-generator.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dineway",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.34",
|
|
4
4
|
"description": "Agentic Website builder for restaurants — structured content meets AI via the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -83,10 +83,6 @@
|
|
|
83
83
|
"types": "./dist/db/sqlite.d.mts",
|
|
84
84
|
"default": "./dist/db/sqlite.mjs"
|
|
85
85
|
},
|
|
86
|
-
"./db/libsql-http": {
|
|
87
|
-
"types": "./dist/db/libsql-http.d.mts",
|
|
88
|
-
"default": "./dist/db/libsql-http.mjs"
|
|
89
|
-
},
|
|
90
86
|
"./db/libsql": {
|
|
91
87
|
"types": "./dist/db/libsql.d.mts",
|
|
92
88
|
"default": "./dist/db/libsql.mjs"
|
|
@@ -197,6 +193,22 @@
|
|
|
197
193
|
"./plugins/adapt-sandbox-entry": {
|
|
198
194
|
"types": "./dist/plugins/adapt-sandbox-entry.d.mts",
|
|
199
195
|
"default": "./dist/plugins/adapt-sandbox-entry.mjs"
|
|
196
|
+
},
|
|
197
|
+
"./middleware/workers": {
|
|
198
|
+
"types": "./dist/astro/middleware/workers.d.mts",
|
|
199
|
+
"default": "./dist/astro/middleware/workers.mjs"
|
|
200
|
+
},
|
|
201
|
+
"./db/d1": {
|
|
202
|
+
"types": "./dist/db/d1.d.mts",
|
|
203
|
+
"default": "./dist/db/d1.mjs"
|
|
204
|
+
},
|
|
205
|
+
"./db/batch": {
|
|
206
|
+
"types": "./dist/database/batch.d.mts",
|
|
207
|
+
"default": "./dist/database/batch.mjs"
|
|
208
|
+
},
|
|
209
|
+
"./db/d1-migrations": {
|
|
210
|
+
"types": "./dist/database/d1/index.d.mts",
|
|
211
|
+
"default": "./dist/database/d1/index.mjs"
|
|
200
212
|
}
|
|
201
213
|
},
|
|
202
214
|
"imports": {
|
|
@@ -274,9 +286,6 @@
|
|
|
274
286
|
"db": [
|
|
275
287
|
"dist/db/index.d.mts"
|
|
276
288
|
],
|
|
277
|
-
"db/libsql-http": [
|
|
278
|
-
"dist/db/libsql-http.d.mts"
|
|
279
|
-
],
|
|
280
289
|
"db/libsql": [
|
|
281
290
|
"dist/db/libsql.d.mts"
|
|
282
291
|
],
|
|
@@ -354,6 +363,18 @@
|
|
|
354
363
|
],
|
|
355
364
|
"": [
|
|
356
365
|
"dist/index.d.mts"
|
|
366
|
+
],
|
|
367
|
+
"middleware/workers": [
|
|
368
|
+
"dist/astro/middleware/workers.d.mts"
|
|
369
|
+
],
|
|
370
|
+
"db/d1": [
|
|
371
|
+
"dist/db/d1.d.mts"
|
|
372
|
+
],
|
|
373
|
+
"db/batch": [
|
|
374
|
+
"dist/database/batch.d.mts"
|
|
375
|
+
],
|
|
376
|
+
"db/d1-migrations": [
|
|
377
|
+
"dist/database/d1/index.d.mts"
|
|
357
378
|
]
|
|
358
379
|
}
|
|
359
380
|
},
|
|
@@ -385,8 +406,10 @@
|
|
|
385
406
|
"croner": "^10.0.1",
|
|
386
407
|
"image-size": "^2.0.2",
|
|
387
408
|
"jose": "^6.1.3",
|
|
409
|
+
"jiti": "^2.6.1",
|
|
388
410
|
"jpeg-js": "^0.4.4",
|
|
389
411
|
"kysely": "^0.27.0",
|
|
412
|
+
"kysely-d1": "0.4.0",
|
|
390
413
|
"mime": "^4.1.0",
|
|
391
414
|
"minisearch": "^7.2.0",
|
|
392
415
|
"modern-tar": "^0.7.5",
|
|
@@ -397,8 +420,8 @@
|
|
|
397
420
|
"ulidx": "^2.4.1",
|
|
398
421
|
"upng-js": "^2.1.0",
|
|
399
422
|
"zod": "^4.4.1",
|
|
400
|
-
"@dineway-ai/admin": "^0.2.12",
|
|
401
423
|
"@dineway-ai/auth": "^0.2.6",
|
|
424
|
+
"@dineway-ai/admin": "^0.2.13",
|
|
402
425
|
"@dineway-ai/gutenberg-to-portable-text": "^0.2.3"
|
|
403
426
|
},
|
|
404
427
|
"optionalDependencies": {
|
|
@@ -416,6 +439,7 @@
|
|
|
416
439
|
"devDependencies": {
|
|
417
440
|
"@apidevtools/swagger-parser": "^12.1.0",
|
|
418
441
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
442
|
+
"@cloudflare/workers-types": "5.20261109.1",
|
|
419
443
|
"@types/better-sqlite3": "^7.6.12",
|
|
420
444
|
"@types/pg": "^8.16.0",
|
|
421
445
|
"@types/react": "19.2.14",
|
|
@@ -423,6 +447,8 @@
|
|
|
423
447
|
"@types/sax": "^1.2.7",
|
|
424
448
|
"@vitest/ui": "4.0.18",
|
|
425
449
|
"astro": "^7.0.0",
|
|
450
|
+
"esbuild": "0.28.1",
|
|
451
|
+
"miniflare": "4.20260730.0",
|
|
426
452
|
"publint": "0.3.17",
|
|
427
453
|
"tsdown": "0.20.3",
|
|
428
454
|
"typescript": "^5.9.3",
|
package/dist/after-BfniwgIf.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ALL_VALID_SCOPES, TOKEN_PREFIXES, generatePrefixedToken, hasScope, hashPrefixedToken, hashPrefixedToken as hashApiToken, validateScopes } from "@dineway-ai/auth";
|
|
2
|
-
|
|
3
|
-
export { hashApiToken as a, hasScope as i, TOKEN_PREFIXES as n, hashPrefixedToken as o, generatePrefixedToken as r, validateScopes as s, ALL_VALID_SCOPES as t };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { i as LibsqlHttpConfig } from "../adapters-DHt3f2lu.mjs";
|
|
2
|
-
import { Kysely, MigrationLockOptions, SqliteAdapter } from "kysely";
|
|
3
|
-
import { LibsqlDialect } from "@libsql/kysely-libsql";
|
|
4
|
-
|
|
5
|
-
//#region src/db/libsql-dialect.d.ts
|
|
6
|
-
interface MigrationLockRow {
|
|
7
|
-
id: string;
|
|
8
|
-
is_locked: number;
|
|
9
|
-
}
|
|
10
|
-
type MigrationLockDatabase = Record<string, MigrationLockRow>;
|
|
11
|
-
declare class LibsqlMigrationLockAdapter extends SqliteAdapter {
|
|
12
|
-
#private;
|
|
13
|
-
acquireMigrationLock(db: Kysely<MigrationLockDatabase>, options: MigrationLockOptions): Promise<void>;
|
|
14
|
-
releaseMigrationLock(db: Kysely<MigrationLockDatabase>, options: MigrationLockOptions): Promise<void>;
|
|
15
|
-
}
|
|
16
|
-
declare class LibsqlDialect$1 extends LibsqlDialect {
|
|
17
|
-
createAdapter(): LibsqlMigrationLockAdapter;
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/db/libsql-http.d.ts
|
|
21
|
-
declare function resolveLibsqlHttpConfig(config: LibsqlHttpConfig): {
|
|
22
|
-
url: string;
|
|
23
|
-
authToken?: string;
|
|
24
|
-
};
|
|
25
|
-
declare function createDialect(config: LibsqlHttpConfig): LibsqlDialect$1;
|
|
26
|
-
//#endregion
|
|
27
|
-
export { createDialect, resolveLibsqlHttpConfig };
|
package/dist/db/libsql-http.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { t as LibsqlDialect } from "../libsql-dialect-CANq6UNI.mjs";
|
|
2
|
-
|
|
3
|
-
//#region src/db/libsql-http.ts
|
|
4
|
-
const LIBSQL_SCHEME = /^libsql:/;
|
|
5
|
-
function resolveLibsqlHttpConfig(config) {
|
|
6
|
-
const url = config.url || process.env.DINEWAY_DATABASE_URL;
|
|
7
|
-
if (!url) throw new Error("libsqlHttp requires DINEWAY_DATABASE_URL at runtime.");
|
|
8
|
-
let parsed;
|
|
9
|
-
try {
|
|
10
|
-
parsed = new URL(url);
|
|
11
|
-
} catch {
|
|
12
|
-
throw new Error("libsqlHttp requires a remote libsql:// or HTTP(S) database URL.");
|
|
13
|
-
}
|
|
14
|
-
if (![
|
|
15
|
-
"libsql:",
|
|
16
|
-
"http:",
|
|
17
|
-
"https:"
|
|
18
|
-
].includes(parsed.protocol) || !parsed.hostname || parsed.username || parsed.password) throw new Error("libsqlHttp requires a remote libsql:// or HTTP(S) database URL without embedded credentials.");
|
|
19
|
-
return {
|
|
20
|
-
url: parsed.protocol === "libsql:" ? url.replace(LIBSQL_SCHEME, "https:") : url,
|
|
21
|
-
authToken: config.authToken || process.env.DINEWAY_DATABASE_AUTH_TOKEN
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
function createDialect(config) {
|
|
25
|
-
return new LibsqlDialect(resolveLibsqlHttpConfig(config));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//#endregion
|
|
29
|
-
export { createDialect, resolveLibsqlHttpConfig };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { SqliteAdapter } from "kysely";
|
|
2
|
-
import { LibsqlDialect } from "@libsql/kysely-libsql";
|
|
3
|
-
|
|
4
|
-
//#region src/db/libsql-dialect.ts
|
|
5
|
-
const MIGRATION_LOCK_LEASE_MS = 5 * 6e4;
|
|
6
|
-
const MIGRATION_LOCK_WAIT_MS = 3e4;
|
|
7
|
-
const MIGRATION_LOCK_POLL_MS = 50;
|
|
8
|
-
function sleep(ms) {
|
|
9
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
|
-
}
|
|
11
|
-
var LibsqlMigrationLockAdapter = class extends SqliteAdapter {
|
|
12
|
-
#claims = /* @__PURE__ */ new Map();
|
|
13
|
-
async acquireMigrationLock(db, options) {
|
|
14
|
-
const queryDb = options.lockTableSchema ? db.withSchema(options.lockTableSchema) : db;
|
|
15
|
-
const claimKey = `${options.lockTableSchema ?? ""}.${options.lockTable}:${options.lockRowId}`;
|
|
16
|
-
const waitDeadline = Date.now() + MIGRATION_LOCK_WAIT_MS;
|
|
17
|
-
for (;;) {
|
|
18
|
-
const now = Date.now();
|
|
19
|
-
const claim = now + MIGRATION_LOCK_LEASE_MS;
|
|
20
|
-
if ((await queryDb.updateTable(options.lockTable).set({ is_locked: claim }).where("id", "=", options.lockRowId).where((expression) => expression.or([expression("is_locked", "=", 0), expression("is_locked", "<=", now)])).executeTakeFirst()).numUpdatedRows === 1n) {
|
|
21
|
-
this.#claims.set(claimKey, claim);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
if (now >= waitDeadline) throw new Error("Timed out waiting for the libSQL migration lock");
|
|
25
|
-
await sleep(MIGRATION_LOCK_POLL_MS);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
async releaseMigrationLock(db, options) {
|
|
29
|
-
const claimKey = `${options.lockTableSchema ?? ""}.${options.lockTable}:${options.lockRowId}`;
|
|
30
|
-
const claim = this.#claims.get(claimKey);
|
|
31
|
-
if (claim === void 0) return;
|
|
32
|
-
const queryDb = options.lockTableSchema ? db.withSchema(options.lockTableSchema) : db;
|
|
33
|
-
try {
|
|
34
|
-
await queryDb.updateTable(options.lockTable).set({ is_locked: 0 }).where("id", "=", options.lockRowId).where("is_locked", "=", claim).execute();
|
|
35
|
-
} finally {
|
|
36
|
-
this.#claims.delete(claimKey);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var LibsqlDialect$1 = class extends LibsqlDialect {
|
|
41
|
-
createAdapter() {
|
|
42
|
-
return new LibsqlMigrationLockAdapter();
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
//#endregion
|
|
47
|
-
export { LibsqlDialect$1 as t };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { toRoleLevel } from "@dineway-ai/auth";
|
|
2
|
-
|
|
3
|
-
//#region src/api/handlers/oauth-user-lookup.ts
|
|
4
|
-
/**
|
|
5
|
-
* Shared user lookup for OAuth token operations.
|
|
6
|
-
*
|
|
7
|
-
* Extracts user role and disabled status from the database. Used by
|
|
8
|
-
* handleTokenRefresh() to revalidate scopes against the user's current
|
|
9
|
-
* role and reject disabled users.
|
|
10
|
-
*/
|
|
11
|
-
/**
|
|
12
|
-
* Look up a user's current role and disabled status.
|
|
13
|
-
* Returns null if the user doesn't exist.
|
|
14
|
-
*/
|
|
15
|
-
async function lookupUserRoleAndStatus(db, userId) {
|
|
16
|
-
const row = await db.selectFrom("users").select(["role", "disabled"]).where("id", "=", userId).executeTakeFirst();
|
|
17
|
-
if (!row) return null;
|
|
18
|
-
return {
|
|
19
|
-
role: toRoleLevel(row.role),
|
|
20
|
-
disabled: row.disabled === 1
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
export { lookupUserRoleAndStatus as t };
|