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,5 +1,5 @@
|
|
|
1
|
-
import { _ as toPublicContextDiff, v as toPublicContextEntry, y as toPublicContextEntryPage } from "./site-context-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as toPublicContextDiff, v as toPublicContextEntry, y as toPublicContextEntryPage } from "./site-context-vCiDRr4H.mjs";
|
|
2
|
+
import { d as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-CkCi6S-W.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/context.ts
|
|
5
5
|
async function handleContextEntryList(db, input = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { p as logSiteActivitySafely } from "./activity-events-
|
|
1
|
+
import { i as resolveActorIdentity } from "./actor-DxUAJgQX.mjs";
|
|
2
|
+
import { p as logSiteActivitySafely } from "./activity-events-D-yGV7cW.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/context-route-helpers.ts
|
|
5
5
|
function resolveContextRouteActor(locals) {
|
|
@@ -38,22 +38,26 @@ var CronExecutor = class {
|
|
|
38
38
|
* 4. On failure: reset to idle (retry on next tick).
|
|
39
39
|
*/
|
|
40
40
|
async tick() {
|
|
41
|
-
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
42
41
|
let processed = 0;
|
|
43
|
-
|
|
42
|
+
for (let index = 0; index < 10; index++) {
|
|
43
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
44
|
+
const lease = ulid();
|
|
45
|
+
const task = (await sql`
|
|
44
46
|
UPDATE _dineway_cron_tasks
|
|
45
|
-
SET status = 'running', locked_at = ${now}
|
|
46
|
-
WHERE id IN (
|
|
47
|
+
SET status = 'running', locked_at = ${now}, lease_token = ${lease}
|
|
48
|
+
WHERE status = 'idle' AND enabled = 1 AND next_run_at <= ${now} AND id IN (
|
|
47
49
|
SELECT id FROM _dineway_cron_tasks
|
|
48
50
|
WHERE next_run_at <= ${now}
|
|
49
51
|
AND status = 'idle'
|
|
50
52
|
AND enabled = 1
|
|
51
53
|
ORDER BY next_run_at ASC
|
|
52
|
-
LIMIT
|
|
54
|
+
LIMIT 1
|
|
53
55
|
)
|
|
54
56
|
RETURNING id, plugin_id, task_name, schedule, is_oneshot, data, next_run_at
|
|
55
|
-
`.execute(this.db);
|
|
56
|
-
|
|
57
|
+
`.execute(this.db)).rows[0];
|
|
58
|
+
if (!task) break;
|
|
59
|
+
const ownedOccurrence = sql`id = ${task.id} AND status = 'running' AND enabled = 1 AND lease_token = ${lease}
|
|
60
|
+
AND schedule = ${task.schedule} AND next_run_at = ${task.next_run_at} AND data IS NOT DISTINCT FROM ${task.data}`;
|
|
57
61
|
let parsedData;
|
|
58
62
|
if (task.data) try {
|
|
59
63
|
parsedData = JSON.parse(task.data);
|
|
@@ -61,12 +65,13 @@ var CronExecutor = class {
|
|
|
61
65
|
console.error(`[cron] Invalid JSON data for ${task.plugin_id}:${task.task_name}, skipping`);
|
|
62
66
|
await sql`
|
|
63
67
|
UPDATE _dineway_cron_tasks
|
|
64
|
-
SET status = '
|
|
65
|
-
WHERE
|
|
68
|
+
SET status = 'failed', enabled = 0, locked_at = NULL, lease_token = NULL
|
|
69
|
+
WHERE ${ownedOccurrence}
|
|
66
70
|
`.execute(this.db);
|
|
67
71
|
continue;
|
|
68
72
|
}
|
|
69
73
|
const event = {
|
|
74
|
+
executionId: `${task.id}:${task.is_oneshot ? task.schedule : task.next_run_at}`,
|
|
70
75
|
name: task.task_name,
|
|
71
76
|
data: parsedData,
|
|
72
77
|
scheduledAt: task.next_run_at
|
|
@@ -83,35 +88,37 @@ var CronExecutor = class {
|
|
|
83
88
|
const rawRetryCount = retryMeta?.retryCount;
|
|
84
89
|
const retryCount = typeof rawRetryCount === "number" && Number.isFinite(rawRetryCount) && rawRetryCount > 0 ? Math.floor(rawRetryCount) : 0;
|
|
85
90
|
if (retryCount >= MAX_ONESHOT_RETRIES) {
|
|
86
|
-
console.error(`[cron] One-shot task ${task.plugin_id}:${task.task_name} exceeded ${MAX_ONESHOT_RETRIES} retries,
|
|
91
|
+
console.error(`[cron] One-shot task ${task.plugin_id}:${task.task_name} exceeded ${MAX_ONESHOT_RETRIES} retries, retaining failed task`);
|
|
87
92
|
await sql`
|
|
88
|
-
|
|
93
|
+
UPDATE _dineway_cron_tasks SET status = 'failed', enabled = 0, locked_at = NULL, lease_token = NULL WHERE ${ownedOccurrence}
|
|
89
94
|
`.execute(this.db);
|
|
90
95
|
} else {
|
|
91
96
|
const backoffMs = 6e4 * Math.pow(2, retryCount);
|
|
92
97
|
await sql`
|
|
93
98
|
UPDATE _dineway_cron_tasks
|
|
94
|
-
SET status = 'idle', locked_at = NULL, next_run_at = ${new Date(Date.now() + backoffMs).toISOString()}, data = ${JSON.stringify({
|
|
99
|
+
SET status = 'idle', locked_at = NULL, lease_token = NULL, next_run_at = ${new Date(Date.now() + backoffMs).toISOString()}, data = ${JSON.stringify({
|
|
95
100
|
...parsedData,
|
|
96
101
|
__dineway: {
|
|
97
102
|
...retryMeta,
|
|
98
103
|
retryCount: retryCount + 1
|
|
99
104
|
}
|
|
100
105
|
})}
|
|
101
|
-
WHERE
|
|
106
|
+
WHERE ${ownedOccurrence}
|
|
102
107
|
`.execute(this.db);
|
|
103
108
|
}
|
|
104
109
|
} else await sql`
|
|
105
|
-
DELETE FROM _dineway_cron_tasks WHERE
|
|
110
|
+
DELETE FROM _dineway_cron_tasks WHERE ${ownedOccurrence}
|
|
106
111
|
`.execute(this.db);
|
|
107
112
|
else await sql`
|
|
108
113
|
UPDATE _dineway_cron_tasks
|
|
109
114
|
SET status = 'idle',
|
|
110
|
-
locked_at = NULL,
|
|
115
|
+
locked_at = NULL, lease_token = NULL,
|
|
111
116
|
last_run_at = ${now},
|
|
112
117
|
next_run_at = ${nextCronTime(task.schedule)}
|
|
113
|
-
WHERE
|
|
118
|
+
WHERE ${ownedOccurrence}
|
|
114
119
|
`.execute(this.db);
|
|
120
|
+
await sql`UPDATE _dineway_cron_tasks SET status = 'idle', locked_at = NULL, lease_token = NULL
|
|
121
|
+
WHERE id = ${task.id} AND status = 'running' AND lease_token = ${lease}`.execute(this.db);
|
|
115
122
|
processed++;
|
|
116
123
|
}
|
|
117
124
|
return processed;
|
|
@@ -123,7 +130,7 @@ var CronExecutor = class {
|
|
|
123
130
|
async recoverStaleLocks() {
|
|
124
131
|
const result = await sql`
|
|
125
132
|
UPDATE _dineway_cron_tasks
|
|
126
|
-
SET status = 'idle', locked_at = NULL
|
|
133
|
+
SET status = 'idle', locked_at = NULL, lease_token = NULL
|
|
127
134
|
WHERE status = 'running'
|
|
128
135
|
AND locked_at < ${(/* @__PURE__ */ new Date(Date.now() - STALE_LOCK_MINUTES * 60 * 1e3)).toISOString()}
|
|
129
136
|
`.execute(this.db);
|
|
@@ -155,18 +162,20 @@ var CronAccessImpl = class {
|
|
|
155
162
|
validateTaskName(name);
|
|
156
163
|
validateSchedule(opts.schedule);
|
|
157
164
|
const oneshot = isOneShot(opts.schedule);
|
|
158
|
-
const
|
|
165
|
+
const schedule = oneshot ? new Date(opts.schedule).toISOString() : opts.schedule;
|
|
166
|
+
const nextRun = oneshot ? schedule : nextCronTime(schedule);
|
|
159
167
|
const dataJson = opts.data ? JSON.stringify(opts.data) : null;
|
|
160
168
|
await sql`
|
|
161
169
|
INSERT INTO _dineway_cron_tasks (id, plugin_id, task_name, schedule, is_oneshot, data, next_run_at, status, enabled)
|
|
162
|
-
VALUES (${ulid()}, ${this.pluginId}, ${name}, ${
|
|
170
|
+
VALUES (${ulid()}, ${this.pluginId}, ${name}, ${schedule}, ${oneshot ? 1 : 0}, ${dataJson}, ${nextRun}, 'idle', 1)
|
|
163
171
|
ON CONFLICT (plugin_id, task_name) DO UPDATE SET
|
|
164
|
-
schedule = ${
|
|
172
|
+
schedule = ${schedule},
|
|
165
173
|
is_oneshot = ${oneshot ? 1 : 0},
|
|
166
174
|
data = ${dataJson},
|
|
167
175
|
next_run_at = ${nextRun},
|
|
168
176
|
status = CASE WHEN _dineway_cron_tasks.status = 'running' THEN 'running' ELSE 'idle' END,
|
|
169
177
|
locked_at = CASE WHEN _dineway_cron_tasks.status = 'running' THEN _dineway_cron_tasks.locked_at ELSE NULL END,
|
|
178
|
+
lease_token = CASE WHEN _dineway_cron_tasks.status = 'running' THEN _dineway_cron_tasks.lease_token ELSE NULL END,
|
|
170
179
|
enabled = 1
|
|
171
180
|
`.execute(this.db);
|
|
172
181
|
this.reschedule();
|
|
@@ -180,12 +189,13 @@ var CronAccessImpl = class {
|
|
|
180
189
|
}
|
|
181
190
|
async list() {
|
|
182
191
|
return (await sql`
|
|
183
|
-
SELECT task_name, schedule, next_run_at, last_run_at
|
|
192
|
+
SELECT task_name, schedule, next_run_at, last_run_at, status
|
|
184
193
|
FROM _dineway_cron_tasks
|
|
185
|
-
WHERE plugin_id = ${this.pluginId} AND enabled = 1
|
|
194
|
+
WHERE plugin_id = ${this.pluginId} AND (enabled = 1 OR status = 'failed')
|
|
186
195
|
ORDER BY next_run_at ASC
|
|
187
196
|
`.execute(this.db)).rows.map((row) => ({
|
|
188
197
|
name: row.task_name,
|
|
198
|
+
status: row.status,
|
|
189
199
|
schedule: row.schedule,
|
|
190
200
|
nextRunAt: row.next_run_at,
|
|
191
201
|
lastRunAt: row.last_run_at
|
|
@@ -227,17 +237,11 @@ function isCronExpression(schedule) {
|
|
|
227
237
|
return false;
|
|
228
238
|
}
|
|
229
239
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
* a recurring cron expression.
|
|
233
|
-
*
|
|
234
|
-
* Tries to parse as a cron expression first. Only if that fails does it
|
|
235
|
-
* attempt Date.parse. This avoids misclassifying cron range expressions
|
|
236
|
-
* like "1-5 * * * *" which Date.parse accepts as valid dates.
|
|
237
|
-
*/
|
|
240
|
+
const ISO_DATETIME = /^\d{4}-\d{2}-\d{2}T/;
|
|
241
|
+
/** Croner accepts ISO timestamps too; distinguish those before testing cron patterns. */
|
|
238
242
|
function isOneShot(schedule) {
|
|
239
|
-
if (
|
|
240
|
-
if (isCronExpression(schedule)) return false;
|
|
243
|
+
if (ISO_DATETIME.test(schedule)) return !isNaN(Date.parse(schedule));
|
|
244
|
+
if (schedule.startsWith("@") || isCronExpression(schedule)) return false;
|
|
241
245
|
return !isNaN(Date.parse(schedule));
|
|
242
246
|
}
|
|
243
247
|
/** Max length for a task name */
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { t as D1_BINDING } from "./d1-binding-D6HZa3ks.mjs";
|
|
2
|
+
import { OperationNodeTransformer, SqliteAdapter, SqliteIntrospector, TableNode, WhereNode, sql } from "kysely";
|
|
3
|
+
import { D1Dialect } from "kysely-d1";
|
|
4
|
+
|
|
5
|
+
//#region src/db/d1-dialect.ts
|
|
6
|
+
var DinewayD1Adapter = class extends SqliteAdapter {
|
|
7
|
+
[D1_BINDING];
|
|
8
|
+
constructor(database) {
|
|
9
|
+
super();
|
|
10
|
+
this[D1_BINDING] = database;
|
|
11
|
+
}
|
|
12
|
+
async acquireMigrationLock() {
|
|
13
|
+
throw new Error("D1 schema changes require the explicit Dineway migration runner.");
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
var DinewayD1Dialect = class extends D1Dialect {
|
|
17
|
+
constructor(binding) {
|
|
18
|
+
super({ database: binding });
|
|
19
|
+
this.binding = binding;
|
|
20
|
+
}
|
|
21
|
+
createAdapter() {
|
|
22
|
+
return new DinewayD1Adapter(this.binding);
|
|
23
|
+
}
|
|
24
|
+
createIntrospector(db) {
|
|
25
|
+
const transformer = new D1IntrospectionFilter();
|
|
26
|
+
return new SqliteIntrospector(db.withPlugin({
|
|
27
|
+
transformQuery: ({ node }) => transformer.transformNode(node),
|
|
28
|
+
transformResult: async ({ result }) => result
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var D1IntrospectionFilter = class extends OperationNodeTransformer {
|
|
33
|
+
transformSelectQuery(node) {
|
|
34
|
+
const select = super.transformSelectQuery(node);
|
|
35
|
+
if (!select.from?.froms.some((from) => TableNode.is(from) && from.table.identifier.name === "sqlite_master")) return select;
|
|
36
|
+
const filter = sql`name NOT GLOB '_cf_*'`.toOperationNode();
|
|
37
|
+
return {
|
|
38
|
+
...select,
|
|
39
|
+
where: select.where ? WhereNode.cloneWithOperation(select.where, "And", filter) : WhereNode.create(filter)
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
function createD1Dialect(database) {
|
|
44
|
+
return new DinewayD1Dialect(database);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { createD1Dialect as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as validateIdentifier } from "./validate-
|
|
2
|
-
import { t as ContentRepository } from "./content-
|
|
3
|
-
import { t as MediaRepository } from "./media-
|
|
4
|
-
import { t as UserRepository } from "./user-
|
|
5
|
-
import {
|
|
1
|
+
import { t as validateIdentifier } from "./validate-Co3j6T_K.mjs";
|
|
2
|
+
import { t as ContentRepository } from "./content-NobcQti0.mjs";
|
|
3
|
+
import { t as MediaRepository } from "./media-3fK0u-bo.mjs";
|
|
4
|
+
import { t as UserRepository } from "./user-1-YV30lf.mjs";
|
|
5
|
+
import { r as ReviewRequestRepository } from "./review-requests-BF2eEKr8.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
|
|
8
8
|
//#region src/api/handlers/dashboard.ts
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CompiledQuery, Kysely, QueryResult, RawBuilder } from "kysely";
|
|
2
|
+
|
|
3
|
+
//#region src/database/batch.d.ts
|
|
4
|
+
interface AtomicBatch {
|
|
5
|
+
/** Conditions evaluated inside the same transaction as all writes. */
|
|
6
|
+
checks?: readonly RawBuilder<boolean>[];
|
|
7
|
+
statements: readonly CompiledQuery[];
|
|
8
|
+
}
|
|
9
|
+
declare class AtomicWriteConflict extends Error {
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
declare function isD1Database<DB>(db: Kysely<DB>): boolean;
|
|
13
|
+
/** Guard a read used to prepare writes; pass the original database row, including its key. */
|
|
14
|
+
declare function rowUnchanged(table: string, row: Record<string, unknown>): RawBuilder<boolean>;
|
|
15
|
+
/** Called during explicit schema installation, never during a user write. */
|
|
16
|
+
declare function ensureAtomicBatchSchema<DB>(db: Kysely<DB>): Promise<void>;
|
|
17
|
+
/** Executes precompiled writes once; conflicts and unknown commit outcomes are never replayed. */
|
|
18
|
+
declare function atomicBatch<DB>(db: Kysely<DB>, batch: AtomicBatch): Promise<QueryResult<unknown>[]>;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { AtomicBatch, AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, rowUnchanged };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { n as d1Database } from "../d1-binding-D6HZa3ks.mjs";
|
|
2
|
+
import { getRequestContext } from "../request-context.mjs";
|
|
3
|
+
import { sql } from "kysely";
|
|
4
|
+
import { ulid } from "ulidx";
|
|
5
|
+
|
|
6
|
+
//#region src/database/batch.ts
|
|
7
|
+
var AtomicWriteConflict = class extends Error {
|
|
8
|
+
constructor() {
|
|
9
|
+
super("Atomic write precondition failed");
|
|
10
|
+
this.name = "AtomicWriteConflict";
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function isD1Database(db) {
|
|
14
|
+
return d1Database(db) !== void 0;
|
|
15
|
+
}
|
|
16
|
+
/** Guard a read used to prepare writes; pass the original database row, including its key. */
|
|
17
|
+
function rowUnchanged(table, row) {
|
|
18
|
+
const entries = Object.entries(row);
|
|
19
|
+
if (!entries.length) throw new Error("An atomic row check requires a nonempty database row.");
|
|
20
|
+
return sql`EXISTS (SELECT 1 FROM ${sql.table(table)} WHERE ${sql.join(entries.map(([column, value]) => sql`${sql.ref(column)} IS NOT DISTINCT FROM ${value}`), sql` AND `)})`;
|
|
21
|
+
}
|
|
22
|
+
/** Called during explicit schema installation, never during a user write. */
|
|
23
|
+
async function ensureAtomicBatchSchema(db) {
|
|
24
|
+
await sql`CREATE TABLE IF NOT EXISTS _dineway_atomic_guards (
|
|
25
|
+
id TEXT PRIMARY KEY,
|
|
26
|
+
ok INTEGER NOT NULL CONSTRAINT dineway_atomic_precondition CHECK (ok = 1)
|
|
27
|
+
)`.execute(db);
|
|
28
|
+
}
|
|
29
|
+
function assertQueryLimits(query) {
|
|
30
|
+
if (query.parameters.length > 100) throw new Error("D1 statements support at most 100 bound parameters.");
|
|
31
|
+
if (new TextEncoder().encode(query.sql).length > 1e5) throw new Error("D1 statements must not exceed 100 KB.");
|
|
32
|
+
}
|
|
33
|
+
/** Executes precompiled writes once; conflicts and unknown commit outcomes are never replayed. */
|
|
34
|
+
async function atomicBatch(db, batch) {
|
|
35
|
+
if (!batch.statements.length && !batch.checks?.length) return [];
|
|
36
|
+
const checks = [...await getRequestContext()?.prepareWriteChecks?.(db) ?? [], ...batch.checks ?? []];
|
|
37
|
+
const binding = d1Database(db);
|
|
38
|
+
if (!binding) {
|
|
39
|
+
const execute = async (transaction) => {
|
|
40
|
+
for (const check of checks) if ((await sql`SELECT CASE WHEN ${check} THEN 1 ELSE 0 END AS ok`.execute(transaction)).rows[0]?.ok !== 1) throw new AtomicWriteConflict();
|
|
41
|
+
const results = [];
|
|
42
|
+
for (const statement of batch.statements) results.push(await transaction.executeQuery(statement));
|
|
43
|
+
return results;
|
|
44
|
+
};
|
|
45
|
+
return db.isTransaction ? execute(db) : db.transaction().execute(execute);
|
|
46
|
+
}
|
|
47
|
+
const id = ulid();
|
|
48
|
+
const statements = checks.length ? [
|
|
49
|
+
...checks.map((check, index) => sql`INSERT INTO _dineway_atomic_guards (id, ok) VALUES (${sql.lit(`${id}:${index}`)}, CASE WHEN ${check} THEN 1 ELSE 0 END)`.compile(db)),
|
|
50
|
+
...batch.statements,
|
|
51
|
+
sql`DELETE FROM _dineway_atomic_guards WHERE id GLOB ${`${id}:*`}`.compile(db)
|
|
52
|
+
] : [...batch.statements];
|
|
53
|
+
if (!statements.length) return [];
|
|
54
|
+
for (const statement of statements) assertQueryLimits(statement);
|
|
55
|
+
try {
|
|
56
|
+
const results = await binding.batch(statements.map((statement) => binding.prepare(statement.sql).bind(...statement.parameters)));
|
|
57
|
+
return (checks.length ? results.slice(checks.length, -1) : results).map((result) => ({
|
|
58
|
+
rows: result.results,
|
|
59
|
+
numAffectedRows: BigInt(result.meta.changes),
|
|
60
|
+
insertId: BigInt(result.meta.last_row_id)
|
|
61
|
+
}));
|
|
62
|
+
} catch (error) {
|
|
63
|
+
if (error instanceof Error && `${error.message} ${String(error.cause)}`.includes("dineway_atomic_precondition")) throw new AtomicWriteConflict();
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
//#endregion
|
|
69
|
+
export { AtomicWriteConflict, atomicBatch, ensureAtomicBatchSchema, isD1Database, rowUnchanged };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { At as ResolvedPlugin, ac as compileD1Schema, ec as D1Migration, ic as D1SchemaObject, nc as assertD1Migrations, rc as migrateD1, tc as D1MigrationOptions } 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
|
+
import { Kysely } from "kysely";
|
|
11
|
+
|
|
12
|
+
//#region src/database/d1/release.d.ts
|
|
13
|
+
/** Explicit maintenance entry point. A failed release stays unavailable until a successful retry. */
|
|
14
|
+
declare function migrateD1Release<DB>(db: Kysely<DB>, plugins: readonly ResolvedPlugin[], options?: {
|
|
15
|
+
adopt?: boolean;
|
|
16
|
+
}): Promise<Record<string, string[]>>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { type D1Migration, type D1MigrationOptions, type D1SchemaObject, assertD1Migrations, compileD1Schema, migrateD1, migrateD1Release };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { o as assertD1Migrations, s as migrateD1 } from "../../runner-CVeq0266.mjs";
|
|
2
|
+
import "../../d1-binding-D6HZa3ks.mjs";
|
|
3
|
+
import "../../dialect-helpers-C6xtO-Ui.mjs";
|
|
4
|
+
import "../../migrations-CMdxWKx-.mjs";
|
|
5
|
+
import "../../state-jyNZ6-7L.mjs";
|
|
6
|
+
import { n as compileD1Schema, t as migrateD1Release } from "../../release-BR08Slqf.mjs";
|
|
7
|
+
|
|
8
|
+
export { assertD1Migrations, compileD1Schema, migrateD1, migrateD1Release };
|
package/dist/db/d1.d.mts
ADDED
package/dist/db/d1.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../d1-binding-D6HZa3ks.mjs";
|
|
2
|
+
import { t as createD1Dialect } from "../d1-dialect-B1b8cmxX.mjs";
|
|
3
|
+
import { env } from "cloudflare:workers";
|
|
4
|
+
|
|
5
|
+
//#region src/db/d1.ts
|
|
6
|
+
function createDialect(config) {
|
|
7
|
+
const binding = Reflect.get(env, config.binding);
|
|
8
|
+
if (!binding || typeof binding !== "object" || !("prepare" in binding) || !("batch" in binding)) throw new Error(`Missing D1 database binding: ${config.binding}`);
|
|
9
|
+
return createD1Dialect(binding);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { createDialect };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-
|
|
3
|
-
import { a as PostgresConfig, c as
|
|
4
|
-
export { type
|
|
1
|
+
import "../types-7Th6Mwz3.mjs";
|
|
2
|
+
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-JnJSGXEB.mjs";
|
|
3
|
+
import { a as PostgresConfig, c as libsql, i as LibsqlConfig, l as postgres, n as DatabaseDescriptor, o as SqliteConfig, r as DatabaseDialectType, s as d1, t as D1Config, u as sqlite } from "../adapters-BQ8CQbBm.mjs";
|
|
4
|
+
export { type D1Config, type DatabaseDescriptor, type DatabaseDialectType, type LibsqlConfig, type MigrationStatus, type PostgresConfig, type SqliteConfig, d1, getMigrationStatus, libsql, postgres, rollbackMigration, runMigrations, sqlite };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../
|
|
1
|
+
import { a as runMigrations, i as rollbackMigration, r as getMigrationStatus } from "../runner-CVeq0266.mjs";
|
|
2
|
+
import "../d1-binding-D6HZa3ks.mjs";
|
|
3
|
+
import "../dialect-helpers-C6xtO-Ui.mjs";
|
|
3
4
|
|
|
4
5
|
//#region src/db/adapters.ts
|
|
5
6
|
/**
|
|
@@ -40,11 +41,13 @@ function libsql(config) {
|
|
|
40
41
|
type: "sqlite"
|
|
41
42
|
};
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
const BINDING_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
45
|
+
/** Cloudflare D1 binding. Schema migrations run explicitly before deployment. */
|
|
46
|
+
function d1(config = { binding: "DB" }) {
|
|
47
|
+
if (!BINDING_NAME.test(config.binding)) throw new Error("D1 binding must be a valid identifier.");
|
|
45
48
|
return {
|
|
46
|
-
entrypoint: "dineway/db/
|
|
47
|
-
config,
|
|
49
|
+
entrypoint: "dineway/db/d1",
|
|
50
|
+
config: { binding: config.binding },
|
|
48
51
|
type: "sqlite"
|
|
49
52
|
};
|
|
50
53
|
}
|
|
@@ -67,4 +70,4 @@ function postgres(config) {
|
|
|
67
70
|
}
|
|
68
71
|
|
|
69
72
|
//#endregion
|
|
70
|
-
export { getMigrationStatus, libsql,
|
|
73
|
+
export { d1, getMigrationStatus, libsql, postgres, rollbackMigration, runMigrations, sqlite };
|
package/dist/db/libsql.d.mts
CHANGED
package/dist/db/libsql.mjs
CHANGED
|
@@ -1,7 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SqliteDialect } from "kysely";
|
|
1
|
+
import { SqliteAdapter, SqliteDialect } from "kysely";
|
|
3
2
|
import BetterSqlite3 from "better-sqlite3";
|
|
3
|
+
import { LibsqlDialect } from "@libsql/kysely-libsql";
|
|
4
4
|
|
|
5
|
+
//#region src/db/libsql-dialect.ts
|
|
6
|
+
const MIGRATION_LOCK_LEASE_MS = 5 * 6e4;
|
|
7
|
+
const MIGRATION_LOCK_WAIT_MS = 3e4;
|
|
8
|
+
const MIGRATION_LOCK_POLL_MS = 50;
|
|
9
|
+
function sleep(ms) {
|
|
10
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
11
|
+
}
|
|
12
|
+
var LibsqlMigrationLockAdapter = class extends SqliteAdapter {
|
|
13
|
+
#claims = /* @__PURE__ */ new Map();
|
|
14
|
+
async acquireMigrationLock(db, options) {
|
|
15
|
+
const queryDb = options.lockTableSchema ? db.withSchema(options.lockTableSchema) : db;
|
|
16
|
+
const claimKey = `${options.lockTableSchema ?? ""}.${options.lockTable}:${options.lockRowId}`;
|
|
17
|
+
const waitDeadline = Date.now() + MIGRATION_LOCK_WAIT_MS;
|
|
18
|
+
for (;;) {
|
|
19
|
+
const now = Date.now();
|
|
20
|
+
const claim = now + MIGRATION_LOCK_LEASE_MS;
|
|
21
|
+
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) {
|
|
22
|
+
this.#claims.set(claimKey, claim);
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (now >= waitDeadline) throw new Error("Timed out waiting for the libSQL migration lock");
|
|
26
|
+
await sleep(MIGRATION_LOCK_POLL_MS);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
async releaseMigrationLock(db, options) {
|
|
30
|
+
const claimKey = `${options.lockTableSchema ?? ""}.${options.lockTable}:${options.lockRowId}`;
|
|
31
|
+
const claim = this.#claims.get(claimKey);
|
|
32
|
+
if (claim === void 0) return;
|
|
33
|
+
const queryDb = options.lockTableSchema ? db.withSchema(options.lockTableSchema) : db;
|
|
34
|
+
try {
|
|
35
|
+
await queryDb.updateTable(options.lockTable).set({ is_locked: 0 }).where("id", "=", options.lockRowId).where("is_locked", "=", claim).execute();
|
|
36
|
+
} finally {
|
|
37
|
+
this.#claims.delete(claimKey);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var LibsqlDialect$1 = class extends LibsqlDialect {
|
|
42
|
+
createAdapter() {
|
|
43
|
+
return new LibsqlMigrationLockAdapter();
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
5
48
|
//#region src/db/libsql.ts
|
|
6
49
|
/**
|
|
7
50
|
* libSQL runtime adapter
|
|
@@ -17,7 +60,7 @@ import BetterSqlite3 from "better-sqlite3";
|
|
|
17
60
|
*/
|
|
18
61
|
function createDialect(config) {
|
|
19
62
|
if (config.url === ":memory:" || config.url.startsWith("file:")) return new SqliteDialect({ database: new BetterSqlite3(config.url === ":memory:" ? config.url : config.url.slice(5)) });
|
|
20
|
-
return new LibsqlDialect({
|
|
63
|
+
return new LibsqlDialect$1({
|
|
21
64
|
url: config.url,
|
|
22
65
|
authToken: config.authToken
|
|
23
66
|
});
|
package/dist/db/postgres.d.mts
CHANGED
package/dist/db/sqlite.d.mts
CHANGED