dineway 0.2.40 → 0.2.41
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-LXZdjKwI.mjs → activity-BuhkMdv8.mjs} +2 -2
- package/dist/{activity-events-DoqeOM8x.mjs → activity-events-DkHsy7Y0.mjs} +1 -1
- package/dist/{allowed-origins-B4zstd2d.mjs → allowed-origins-Clitkhiv.mjs} +1 -1
- package/dist/api/route-utils.d.mts +15 -12
- package/dist/api/route-utils.mjs +27 -20
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +10 -5
- package/dist/{api-CQishNjZ.mjs → api-CMbsIQ46.mjs} +41 -13
- package/dist/{api-tokens-CNHnKO57.mjs → api-tokens-ciHNTdN2.mjs} +1 -1
- package/dist/{apply-D4rZHDyg.mjs → apply-B5qoX19G.mjs} +62 -18
- package/dist/astro/index.d.mts +16 -13
- package/dist/astro/index.mjs +31 -5
- package/dist/astro/middleware/auth.d.mts +14 -11
- package/dist/astro/middleware/auth.mjs +8 -8
- package/dist/astro/middleware/redirect.mjs +10 -6
- package/dist/astro/middleware/request-context.mjs +5 -5
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +2 -2
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.d.mts +2 -2
- package/dist/astro/middleware.mjs +266 -176
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +12 -7
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +12 -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 +41 -22
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +14 -10
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +14 -10
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +25 -19
- package/dist/astro/routes/api/admin/bylines/index.mjs +25 -19
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +20 -16
- package/dist/astro/routes/api/admin/comments/_id_.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/bulk.mjs +18 -13
- package/dist/astro/routes/api/admin/comments/counts.mjs +10 -7
- package/dist/astro/routes/api/admin/comments/index.mjs +18 -13
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +57 -44
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +57 -44
- package/dist/astro/routes/api/admin/context/diff.mjs +56 -43
- package/dist/astro/routes/api/admin/context/index.mjs +57 -44
- package/dist/astro/routes/api/admin/context/stale.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +51 -39
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +56 -43
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +56 -43
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +52 -40
- 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 +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +78 -68
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +78 -67
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/plugins/updates.mjs +71 -60
- package/dist/astro/routes/api/admin/review-requests/_id_/image.mjs +38 -23
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +46 -36
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +63 -52
- package/dist/astro/routes/api/admin/review-requests/_id_/revoke.mjs +9 -9
- package/dist/astro/routes/api/admin/review-requests/index.mjs +61 -50
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +71 -60
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +71 -60
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +11 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +3 -3
- package/dist/astro/routes/api/admin/users/index.mjs +12 -7
- package/dist/astro/routes/api/auth/dev-bypass.mjs +4 -4
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/invite/index.mjs +14 -9
- package/dist/astro/routes/api/auth/invite/register-options.mjs +16 -11
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +17 -12
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +14 -11
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +3 -3
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +3 -3
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +12 -7
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +19 -14
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +16 -11
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/passkey/verify.mjs +17 -12
- package/dist/astro/routes/api/auth/setup-token/index.mjs +6 -6
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/request.mjs +17 -12
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.d.mts +14 -11
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +23 -19
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +23 -18
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +25 -20
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/release-readiness.mjs +14 -9
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +41 -31
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +30 -20
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +25 -14
- package/dist/astro/routes/api/content/_collection_/trash.mjs +13 -8
- package/dist/astro/routes/api/dashboard.mjs +21 -13
- 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 +30 -23
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +13 -10
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/execute.mjs +58 -47
- package/dist/astro/routes/api/import/wordpress/media.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress/media.mjs +17 -14
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +61 -48
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +15 -12
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +58 -45
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +32 -26
- package/dist/astro/routes/api/import/wordpress-plugin/callback.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +14 -11
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +63 -52
- package/dist/astro/routes/api/integration/artifact.mjs +9 -9
- package/dist/astro/routes/api/integration/dispatch.mjs +14 -14
- package/dist/astro/routes/api/integrations/_provider_.mjs +9 -9
- package/dist/astro/routes/api/integrations/index.mjs +8 -8
- package/dist/astro/routes/api/manifest.mjs +5 -5
- package/dist/astro/routes/api/mcp.mjs +141 -93
- package/dist/astro/routes/api/media/_id_/confirm.mjs +15 -12
- package/dist/astro/routes/api/media/_id_.mjs +14 -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 +16 -13
- package/dist/astro/routes/api/media.mjs +19 -16
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/items.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_/translations.mjs +57 -44
- package/dist/astro/routes/api/menus/_name_.mjs +57 -44
- package/dist/astro/routes/api/menus/index.mjs +57 -44
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +5 -5
- package/dist/astro/routes/api/oauth/device/code.mjs +9 -9
- package/dist/astro/routes/api/oauth/device/token.mjs +8 -8
- package/dist/astro/routes/api/oauth/register.mjs +4 -4
- package/dist/astro/routes/api/oauth/token/refresh.mjs +5 -5
- package/dist/astro/routes/api/oauth/token/revoke.mjs +5 -5
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +10 -5
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +4 -4
- package/dist/astro/routes/api/redirects/404s/index.mjs +15 -13
- package/dist/astro/routes/api/redirects/404s/summary.mjs +15 -13
- package/dist/astro/routes/api/redirects/_id_.mjs +57 -44
- package/dist/astro/routes/api/redirects/index.mjs +57 -44
- 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 +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +73 -62
- package/dist/astro/routes/api/schema/collections/index.mjs +73 -62
- package/dist/astro/routes/api/schema/index.mjs +13 -10
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +71 -60
- package/dist/astro/routes/api/schema/orphans/index.mjs +71 -60
- package/dist/astro/routes/api/search/enable.mjs +20 -13
- package/dist/astro/routes/api/search/index.mjs +19 -12
- package/dist/astro/routes/api/search/rebuild.mjs +20 -13
- package/dist/astro/routes/api/search/stats.mjs +12 -7
- package/dist/astro/routes/api/search/suggest.mjs +19 -12
- package/dist/astro/routes/api/sections/_slug_.mjs +57 -44
- package/dist/astro/routes/api/sections/index.mjs +57 -44
- package/dist/astro/routes/api/settings/email.mjs +5 -5
- package/dist/astro/routes/api/settings/reviews.mjs +11 -11
- package/dist/astro/routes/api/settings.mjs +57 -44
- package/dist/astro/routes/api/setup/admin-verify.mjs +19 -14
- package/dist/astro/routes/api/setup/admin.mjs +17 -12
- package/dist/astro/routes/api/setup/dev-bypass.mjs +44 -32
- package/dist/astro/routes/api/setup/dev-reset.mjs +2 -2
- package/dist/astro/routes/api/setup/index.mjs +47 -34
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +9 -9
- package/dist/astro/routes/api/system/heartbeat.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +60 -47
- package/dist/astro/routes/api/taxonomies/index.mjs +60 -47
- package/dist/astro/routes/api/themes/preview.mjs +7 -7
- 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 +56 -43
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +57 -44
- package/dist/astro/routes/api/widget-areas/_name_.mjs +53 -41
- package/dist/astro/routes/api/widget-areas/index.mjs +57 -44
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +14 -9
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +20 -16
- package/dist/astro/routes/sitemap.xml.mjs +19 -15
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +8 -3
- package/dist/astro/types.d.mts +21 -14
- package/dist/{atomic-authority-CnBQJ14T.mjs → atomic-authority-Bf5QZboB.mjs} +2 -2
- package/dist/{audit-Cl495Ze3.mjs → audit-hXJBTPY0.mjs} +1 -1
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-DbjgJdlo.mjs → auth-control-guard-DpUP6Fs_.mjs} +1 -1
- package/dist/{authorize-DDmgmnW-.mjs → authorize-DWNOqMKq.mjs} +1 -1
- package/dist/{briefing-DsD-Ouwc.mjs → briefing-BzvBeIJh.mjs} +1 -1
- package/dist/{briefing-COw-WcYz.mjs → briefing-DYiV93rg.mjs} +995 -7
- package/dist/{bundle-bhiszAui.mjs → bundle-DWn5eFKz.mjs} +2 -2
- package/dist/{byline-TYk2kad6.mjs → byline-3qjp1-oa.mjs} +65 -14
- package/dist/{byline-fields-D-b9CWux.d.mts → byline-fields-Bne2v0ti.d.mts} +20 -16
- package/dist/{byline-fields-BKj5f3Ub.mjs → byline-fields-DRMCc0V_.mjs} +1 -1
- package/dist/{byline-fields-DZ46DF10.mjs → byline-fields-wWu2Cb3l.mjs} +3 -3
- package/dist/{byline-registry-CJihchD1.mjs → byline-registry-Caj0_gbU.mjs} +1 -1
- package/dist/{bylines-6T9iVC9j.mjs → bylines-BSn9O1Wx.mjs} +3 -3
- package/dist/{bylines-CvTSCAw9.mjs → bylines-CGuJi-zu.mjs} +5 -5
- package/dist/{patterns-Ay-4KImK.mjs → cache-DsEbwFVE.mjs} +51 -1
- package/dist/{chunks-C8vSD_5L.mjs → chunks-Bb56aCtB.mjs} +1 -1
- package/dist/cli/index.mjs +486 -48
- package/dist/cli/plugin-kit.d.mts +14 -11
- package/dist/cli/plugin-kit.mjs +2 -2
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +16 -13
- package/dist/client/index.mjs +2 -2
- package/dist/{client-factory-C1ZQCMog.mjs → client-factory-BLbm250o.mjs} +1 -1
- package/dist/{comment-DAQfUjqt.mjs → comment-BWDG1nQm.mjs} +2 -2
- package/dist/{comment-reaction-Dp3G7UZc.mjs → comment-reaction-B7pLTlQ7.mjs} +1 -1
- package/dist/{comments-BrvIaRAx.mjs → comments-xkten8nV.mjs} +1 -1
- package/dist/config-6R0bchVE.mjs +125 -0
- package/dist/{content-CIKsrvU9.mjs → content-BigS8BAv.mjs} +302 -45
- package/dist/content-Dr22fzA_.mjs +390 -0
- package/dist/{content-refresh-BilzqcLt.mjs → content-refresh-DJuFIqQ4.mjs} +14 -8
- package/dist/content-storage/index.d.mts +180 -0
- package/dist/content-storage/index.mjs +29 -0
- package/dist/content-storage/store.d.mts +3 -0
- package/dist/content-storage/store.mjs +5 -0
- package/dist/{review-payload-Bap86e75.mjs → content-write-DAZCNKWl.mjs} +838 -131
- package/dist/{context-DAs_MZjJ.mjs → context-0806nV9h.mjs} +292 -23
- package/dist/{context-DVTvucNb.mjs → context-CCsI5nTK.mjs} +2 -2
- package/dist/{context-route-helpers-BP-UJ4u8.mjs → context-route-helpers-TP3EqxRQ.mjs} +2 -2
- package/dist/{dashboard-BAjWCGCP.mjs → dashboard-CSrnhBO6.mjs} +4 -4
- package/dist/database/batch.d.mts +1 -1
- package/dist/database/batch.mjs +1 -1
- package/dist/database/d1/index.d.mts +14 -11
- package/dist/database/d1/index.mjs +4 -4
- package/dist/database/instrumentation.mjs +3 -2
- package/dist/db/index.d.mts +3 -3
- package/dist/db/index.mjs +1 -1
- package/dist/db/libsql.d.mts +1 -1
- package/dist/db/postgres.d.mts +1 -1
- package/dist/db/sqlite.d.mts +1 -1
- package/dist/{device-flow-Dh0rNlh1.mjs → device-flow-SoZh-HvN.mjs} +3 -3
- package/dist/{discovery-V0e0Gg8j.mjs → discovery-49qXmdwv.mjs} +4 -4
- package/dist/{enrich-B7PIJ8Iy.mjs → enrich-CAMsD1aT.mjs} +1 -1
- package/dist/{error-B5a45Tfb.mjs → error-sL4aemcW.mjs} +2 -0
- package/dist/{evidence-Vnp_fQbC.mjs → evidence-B3O9_VKm.mjs} +7 -7
- package/dist/{field-defs-cache-aXUeXJdC.mjs → field-defs-cache-dn5Tw79A.mjs} +4 -4
- package/dist/{fts-manager-BrPpYtK0.mjs → fts-manager-Zu5ITic0.mjs} +1 -1
- package/dist/{hitl-requests-BxMMON3s.mjs → hitl-requests-B5vOPseK.mjs} +2 -2
- package/dist/{hitl-route-helpers-sdnjpx2k.mjs → hitl-route-helpers-C3icmGdj.mjs} +5 -5
- package/dist/hook-events-BQw73jc7.d.mts +32 -0
- package/dist/{import-C2-v4FCs.mjs → import-CKnKQj3f.mjs} +9 -9
- package/dist/{index-BVGe04wF.d.mts → index-CLj17kW9.d.mts} +12 -5
- package/dist/index.d.mts +19 -16
- package/dist/index.mjs +107 -98
- package/dist/{integration-credentials-DMEXZU2J.mjs → integration-credentials-DpuRw1kx.mjs} +2 -2
- package/dist/{jsonld-wRF85RXo.d.mts → jsonld-CN91qtDw.d.mts} +2 -2
- package/dist/{load-DvCVppOF.mjs → load-CiRTddkJ.mjs} +1 -1
- package/dist/{loader-Dp6zLmQm.mjs → loader-CCwWFQSh.mjs} +16 -5
- package/dist/{manifest-schema-CCvogfrP.mjs → manifest-schema-DaQpgyTB.mjs} +1 -1
- package/dist/{mcp-reviewed-executor-B8Gbin3T.mjs → mcp-reviewed-executor-DA6Q9sDc.mjs} +6 -6
- 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 +16 -13
- package/dist/media/local-runtime.mjs +3 -3
- package/dist/{media-C5ba8fvI.mjs → media-BjH5OD-A.mjs} +1 -1
- package/dist/{media-allowlist-DQvscVkS.mjs → media-allowlist-C8HJ2O61.mjs} +1 -1
- package/dist/{menus-CyNpBQrX.mjs → menus-CbBi7Ad7.mjs} +2 -2
- package/dist/{menus-w5xwT-f5.mjs → menus-D0c8CeVg.mjs} +7 -7
- package/dist/migration-DJuj7ZwN.mjs +526 -0
- package/dist/{migrations-CLlX25HO.mjs → migrations-BAjF60cl.mjs} +1 -1
- package/dist/{oauth-authorization-CdqJZUMf.mjs → oauth-authorization-CSSRMOKn.mjs} +4 -4
- package/dist/{oauth-clients-CHNb9MAZ.mjs → oauth-clients-DX5HIJJv.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/{object-cache-mxCW-Rpt.mjs → object-cache-DyI1SOBK.mjs} +3 -1
- package/dist/owned-metadata-BPmUjZqI.mjs +69 -0
- package/dist/page/index.d.mts +15 -12
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-THHCpJLB.mjs → parse-C6kCR1OT.mjs} +1 -1
- package/dist/plugin-utils.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.d.mts +14 -11
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-pfraURNp.mjs → plugins-V0W65r3v.mjs} +16 -962
- package/dist/{policy-D2USlibj.mjs → policy-DbceGc4P.mjs} +2 -2
- package/dist/{preview-Bh7D7F27.mjs → preview-CWiIjMDi.mjs} +2 -2
- package/dist/{provider-loader-DT7vQ5FI.d.mts → provider-loader-oLKm1AU8.d.mts} +1 -1
- package/dist/{public-url-Ccv0Xmue.d.mts → public-url-CEC1vj02.d.mts} +2 -2
- package/dist/{public-url-CG5YbNqB.d.mts → public-url-CKrUov8D.d.mts} +1 -1
- package/dist/{publication-authorization-B_HJSnzR.mjs → publication-authorization-wMR-tEQ_.mjs} +43 -17
- package/dist/{query-xspvw7Ui.mjs → query-DDi367tF.mjs} +14 -14
- package/dist/{query-DLeahg3x.mjs → query-DLnnpEuf.mjs} +4 -4
- package/dist/{rate-limit-BsBr_U9g.mjs → rate-limit-DeVLLe4z.mjs} +2 -2
- package/dist/{redirect-BQFa1THe.mjs → redirect-CJ-FAbNK.mjs} +2 -2
- package/dist/{redirects-DJcsgz_X.mjs → redirects-BKi6mek4.mjs} +4 -5
- package/dist/{redirects-CVfxefrz.mjs → redirects-I78-ZYLV.mjs} +5 -386
- package/dist/{registry-Dclv9iHv.mjs → registry-zXXZezu-.mjs} +7 -7
- package/dist/{release-Da2UFygt.mjs → release-Cpi0-Bzq.mjs} +173 -22
- package/dist/request-context.d.mts +30 -0
- package/dist/{request-meta-CjORiJQ_.mjs → request-meta-DZYuLXx_.mjs} +1 -1
- package/dist/review-payload-Bhi52CbI.mjs +112 -0
- package/dist/{review-requests-CcSUTm_l.mjs → review-requests-C-ScxD9n.mjs} +2 -2
- package/dist/{review-requests-CUVn0RBl.mjs → review-requests-DZYM51yI.mjs} +2 -2
- package/dist/{review-route-helpers-CKBfGKCi.mjs → review-route-helpers-DXNDyx_q.mjs} +2 -2
- package/dist/{revision-W6FDfDqx.mjs → revision-B_HYO2AE.mjs} +42 -7
- package/dist/revisions-CQ7rMP5d.mjs +55 -0
- package/dist/{revocation-C_ZQvGRT.mjs → revocation-4we8kfBg.mjs} +2 -2
- package/dist/{runner-CRU7BXjr.mjs → runner-CuG8o1uW.mjs} +558 -487
- package/dist/{runner-SoP1rphP.d.mts → runner-DXQkyPeX.d.mts} +1 -1
- package/dist/{runs-BtaAiLTw.mjs → runs-BjgLfqCn.mjs} +5 -5
- package/dist/runtime-Bs2JMbb2.d.mts +45 -0
- package/dist/runtime-Ch5G-tnG.mjs +400 -0
- package/dist/runtime.d.mts +15 -12
- package/dist/runtime.mjs +9 -4
- package/dist/schema-BA05k0TN.mjs +8 -0
- package/dist/{search-BI9uKr7U.mjs → search-DMrzhfx_.mjs} +4 -98
- package/dist/{secrets-D_pergcD.mjs → secrets-CIYcw9T9.mjs} +4 -4
- package/dist/{sections-BqqYq9RW.mjs → sections-BTrSEhqB.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +38 -26
- package/dist/seo/index.d.mts +3 -3
- package/dist/seo/index.mjs +12 -9
- package/dist/{seo-Bs_DUxJf.mjs → seo-Cv7ud_m2.mjs} +44 -5
- package/dist/{seo-B-5PsaJO.mjs → seo-DkjtBh-y.mjs} +1 -1
- package/dist/{service-W2xuGLgw.mjs → service-BBJM08uD.mjs} +2 -2
- package/dist/{service-B65aJsN7.mjs → service-CkMuD5AE.mjs} +3 -3
- package/dist/{settings-DsBzKeUQ.mjs → settings-BUONaNnG.mjs} +7 -7
- package/dist/{settings-CyJ2-MKx.mjs → settings-CI-NtWEc.mjs} +2 -2
- package/dist/{setup-complete-t9yamqBb.mjs → setup-complete-DoVbVrHx.mjs} +1 -1
- package/dist/{site-activity-DU0UPDji.mjs → site-activity-hpfJkmxQ.mjs} +1 -1
- package/dist/{site-context-Dic2jHuw.mjs → site-context-BW3GRCJH.mjs} +15 -15
- package/dist/{site-url-Tw6CfBB2.mjs → site-url-CYatfe3q.mjs} +1 -1
- package/dist/{state-jx6Yiwsm.mjs → state-CKkqoA6i.mjs} +1 -1
- 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 +2 -2
- package/dist/{store-32e6dfD-.mjs → store-BzaAtszy.mjs} +3 -3
- package/dist/submission-DLgjQ_Ew.mjs +205 -0
- package/dist/{taxonomies-BFsUR7kc.mjs → taxonomies-C02-Vuh3.mjs} +3 -3
- package/dist/{taxonomies-lWGNLKgn.mjs → taxonomies-D5wO9zmB.mjs} +7 -7
- package/dist/{taxonomy-DN6i1upz.mjs → taxonomy-BK7JmHlo.mjs} +53 -3
- package/dist/terms-EskuqbKE.mjs +104 -0
- package/dist/text-extraction-CdqMGYQK.mjs +96 -0
- package/dist/{tokens-D-StaTAQ.mjs → tokens-D8HEH277.mjs} +1 -1
- package/dist/{trusted-proxy-hYufGFPK.mjs → trusted-proxy-Dg3U9Lrv.mjs} +1 -1
- package/dist/{types-RFzE_V1M.mjs → types-BI3ULB3A.mjs} +2 -2
- package/dist/{types-D5JfvPvx.d.mts → types-C3jUu4Bc.d.mts} +89 -33
- package/dist/{types-B--VyN3n.d.mts → types-Dpv_MvwZ.d.mts} +1 -1
- package/dist/{types-CgcOeaiQ.d.mts → types-ex-UrNlz.d.mts} +1 -1
- package/dist/types-qOEot0UQ.d.mts +83 -0
- package/dist/ui/server-runtime.d.mts +18 -15
- package/dist/ui/server-runtime.mjs +29 -25
- package/dist/{user-Btai9rl3.mjs → user-Bl2_8rhJ.mjs} +2 -2
- package/dist/{utils-CYxGuO_P.mjs → utils-CklSLz9F.mjs} +2 -2
- package/dist/{validate-C05z0m7M.mjs → validate-C-yk7mmX.mjs} +3 -3
- package/dist/{validate-kmN2lS8H.d.mts → validate-DUscf6VG.d.mts} +3 -3
- package/dist/version-BlE1LEPb.mjs +6 -0
- package/dist/version-store-BXv2D0de.mjs +208 -0
- package/dist/version-store-B_THJCc0.d.mts +98 -0
- package/dist/{widgets-BOrDZdQ3.mjs → widgets-9xHBhL_L.mjs} +3 -3
- package/dist/{wordpress-slugs-ROzITIBK.mjs → wordpress-slugs-yaeD7cxn.mjs} +1 -1
- package/dist/{worker-CKU70ODm.mjs → worker-CC_Rt1pB.mjs} +10 -10
- package/dist/write-intent-DuHVqks9.mjs +108 -0
- package/dist/{zod-generator-DkrWuID7.mjs → zod-generator-B5Pt8fv0.mjs} +2 -2
- package/package.json +16 -4
- package/dist/cache-B5NSHhxG.mjs +0 -52
- package/dist/cron-C7HCJPPl.mjs +0 -271
- package/dist/schema-CosVhHJt.mjs +0 -8
- package/dist/submission-DJmRejGR.mjs +0 -411
- package/dist/version-CISd4wX_.mjs +0 -6
- /package/dist/{actor-DxUAJgQX.mjs → actor-D0AW80ld.mjs} +0 -0
- /package/dist/{adapter-symbols-Bq3JsWGM.d.mts → adapter-symbols-B9mi-BUh.d.mts} +0 -0
- /package/dist/{adapters-C8nRpUuj.d.mts → adapters-lDnJjNDz.d.mts} +0 -0
- /package/dist/{api-tokens-0N3nafqZ.mjs → api-tokens-CdfsE9PL.mjs} +0 -0
- /package/dist/{base64-Cz-aU0X1.mjs → base64-qvSs0Gxy.mjs} +0 -0
- /package/dist/{challenge-store-DFGsDtCj.mjs → challenge-store-7IZ_NqWg.mjs} +0 -0
- /package/dist/{components-rFN8NH3N.mjs → components-JA6tFHmE.mjs} +0 -0
- /package/dist/{context-types-CPWAJRs5.mjs → context-types-DDIJhGLs.mjs} +0 -0
- /package/dist/{default-BS6VQRkB.mjs → default-C2azCFSB.mjs} +0 -0
- /package/dist/{email-console-GqK6hgMJ.mjs → email-console-BYQp_5Qr.mjs} +0 -0
- /package/dist/{escape-CE7xOWzJ.mjs → escape-4_NNa6GR.mjs} +0 -0
- /package/dist/{experimental-workflows-BbxpWwBy.mjs → experimental-workflows-CPNiI2EL.mjs} +0 -0
- /package/dist/{forgeway-account-DcTxh3Gw.mjs → forgeway-account-YzraapbX.mjs} +0 -0
- /package/dist/{hash-D2Rqd2J2.mjs → hash-qSYPMJ8w.mjs} +0 -0
- /package/dist/{media-url-D9kdpoLS.mjs → media-url-D5E1a47B.mjs} +0 -0
- /package/dist/{mime-BnVhH671.mjs → mime-FkfazULS.mjs} +0 -0
- /package/dist/{mode-BJwb_MgK.mjs → mode-C3RI5Z5t.mjs} +0 -0
- /package/dist/{normalize-aTwryvvi.mjs → normalize-DrmlLn40.mjs} +0 -0
- /package/dist/{oauth-authority-P5YMSk2z.mjs → oauth-authority-DVlLFhsZ.mjs} +0 -0
- /package/dist/{oauth-state-store-CMqLdo4I.mjs → oauth-state-store-nf-78RbK.mjs} +0 -0
- /package/dist/{options-JiLWB6Bt.mjs → options-yFkLUuTw.mjs} +0 -0
- /package/dist/{output-7HDrYTSQ.mjs → output-ljHaxIHX.mjs} +0 -0
- /package/dist/{parser-kettsjWc.mjs → parser-CTlxybRo.mjs} +0 -0
- /package/dist/{passkey-config-DVzQ3dv3.mjs → passkey-config-BLon3ct9.mjs} +0 -0
- /package/dist/{placeholder-DJLP_HY7.d.mts → placeholder-DdZV3I8x.d.mts} +0 -0
- /package/dist/{portable-text-tQhvPLf1.mjs → portable-text-CSbRjM-T.mjs} +0 -0
- /package/dist/{portable-text-BE7nszX6.d.mts → portable-text-HNmwL-7L.d.mts} +0 -0
- /package/dist/{process-cache-C19OA3am.mjs → process-cache-CMy5M80h.mjs} +0 -0
- /package/dist/{provider-loader-DERzBMUz.mjs → provider-loader-DlaT1usE.mjs} +0 -0
- /package/dist/{public-discovery-BGyhuD5U.mjs → public-discovery-BnqYofSK.mjs} +0 -0
- /package/dist/{public-url-DFXUU6Wp.mjs → public-url-BHjYWuaN.mjs} +0 -0
- /package/dist/{public-url-sR8SVmTt.mjs → public-url-GQygrYmg.mjs} +0 -0
- /package/dist/{redirect-BxacnBYL.mjs → redirect-CokmLN5o.mjs} +0 -0
- /package/dist/{request-cache-8_ifFzVw.mjs → request-cache-CizvDoxV.mjs} +0 -0
- /package/dist/{resolve-DEKC4qVa.mjs → resolve-BxFGSKYu.mjs} +0 -0
- /package/dist/{runtime-env-CPTzh0mZ.mjs → runtime-env-DpYGy4pT.mjs} +0 -0
- /package/dist/{scheduled-publish-BxdShRGs.d.mts → scheduled-publish-eCNGpvNm.d.mts} +0 -0
- /package/dist/{seo-contributions-LEFs1d7w.mjs → seo-contributions-ZKqrqsdT.mjs} +0 -0
- /package/dist/{service-kQ5ljRzX.mjs → service-DeX1PRNt.mjs} +0 -0
- /package/dist/{session-user-B8yYh0g5.mjs → session-user-D36BRaZY.mjs} +0 -0
- /package/dist/{setup-nonce-B6A5Y1ea.mjs → setup-nonce-B9IO7PbK.mjs} +0 -0
- /package/dist/{sidecar-client-BwPhhz-F.mjs → sidecar-client-2hx5G46s.mjs} +0 -0
- /package/dist/{slugify-kD31VIv2.mjs → slugify-DvoaEPtL.mjs} +0 -0
- /package/dist/{ssrf-C9dyjU8O.mjs → ssrf-DcD8vn3E.mjs} +0 -0
- /package/dist/{stable-hash-B9Tbb2f_.mjs → stable-hash-9RDJgfif.mjs} +0 -0
- /package/dist/{status-Bjf_uSrW.mjs → status-B2xUokyJ.mjs} +0 -0
- /package/dist/{transport-BrU1aDY5.mjs → transport-BHYE4pox.mjs} +0 -0
- /package/dist/{transport-CZbtxgKZ.d.mts → transport-CVU5rp7W.d.mts} +0 -0
- /package/dist/{types-DNBL-4Sn.mjs → types-B3Uq7Czg.mjs} +0 -0
- /package/dist/{types-DsJTXStN.d.mts → types-BJztoTbF.d.mts} +0 -0
- /package/dist/{types-COvyXIp7.mjs → types-BgUxCuwu.mjs} +0 -0
- /package/dist/{types-KFzuijKE.d.mts → types-C0heD9oI.d.mts} +0 -0
- /package/dist/{types-B03h5jt_.d.mts → types-DheoByey.d.mts} +0 -0
- /package/dist/{types-SlLXjRpg.d.mts → types-I5LHzk_M.d.mts} +0 -0
- /package/dist/{types-PLJ9hlhh.mjs → types-Nm0cMxEh.mjs} +0 -0
- /package/dist/{types-CtGSEKEJ.d.mts → types-PxxPTFSl.d.mts} +0 -0
- /package/dist/{url-DGG3hw_h.mjs → url-Coamqvs4.mjs} +0 -0
- /package/dist/{url-DUz3LbCs.mjs → url-dn4mFfCI.mjs} +0 -0
- /package/dist/{workers-build-BkmPhclj.mjs → workers-build-4926MPc0.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -1,55 +1,68 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as runMigrations, n as getMigrationFingerprint, r as getMigrationStatus } from "../runner-
|
|
2
|
+
import { a as runMigrations, n as getMigrationFingerprint, r as getMigrationStatus } from "../runner-CuG8o1uW.mjs";
|
|
3
3
|
import { t as createDatabase } from "../connection-DJ3GzHVH.mjs";
|
|
4
|
-
import "../d1-binding-DrLMBUxu.mjs";
|
|
4
|
+
import { t as d1Database } from "../d1-binding-DrLMBUxu.mjs";
|
|
5
5
|
import { AtomicWriteConflict, atomicBatch, rowUnchanged } from "../database/batch.mjs";
|
|
6
6
|
import { t as validateIdentifier } from "../validate-Co3j6T_K.mjs";
|
|
7
7
|
import { l as listTablesLike } from "../dialect-helpers-C6xtO-Ui.mjs";
|
|
8
8
|
import { n as getI18nConfig, r as isI18nEnabled } from "../config-XW5tMrH8.mjs";
|
|
9
|
-
import {
|
|
10
|
-
import "../
|
|
11
|
-
import
|
|
12
|
-
import "../
|
|
13
|
-
import "../
|
|
14
|
-
import "../
|
|
15
|
-
import {
|
|
16
|
-
import "../
|
|
17
|
-
import
|
|
18
|
-
import { t as
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import "../
|
|
22
|
-
import "../
|
|
23
|
-
import "../byline-
|
|
24
|
-
import "../
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import "../
|
|
28
|
-
import
|
|
29
|
-
import "../
|
|
30
|
-
import {
|
|
31
|
-
import "../
|
|
32
|
-
import "../
|
|
33
|
-
import
|
|
34
|
-
import "../
|
|
35
|
-
import { n as
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import "../
|
|
39
|
-
import { t as
|
|
40
|
-
import
|
|
41
|
-
import { n as
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import { n as
|
|
9
|
+
import { a as validateContentStorage, n as contentDigest, r as contentStorageConfigSchema, t as canonicalContentJson } from "../config-6R0bchVE.mjs";
|
|
10
|
+
import { c as installContentStorageConfig, f as freezeContentPartition, l as beginContentMigration, o as registerContentStorage, r as getContentStorage, t as assertContentStorageConfiguration, u as cancelContentMigration } from "../runtime-Ch5G-tnG.mjs";
|
|
11
|
+
import "../revisions-CQ7rMP5d.mjs";
|
|
12
|
+
import "../runtime-env-DpYGy4pT.mjs";
|
|
13
|
+
import { i as encodeBase64url } from "../base64-qvSs0Gxy.mjs";
|
|
14
|
+
import "../types-BI3ULB3A.mjs";
|
|
15
|
+
import { o as isMissingTableError } from "../loader-CCwWFQSh.mjs";
|
|
16
|
+
import "../actor-D0AW80ld.mjs";
|
|
17
|
+
import "../atomic-authority-Bf5QZboB.mjs";
|
|
18
|
+
import { t as ContentRepository } from "../content-BigS8BAv.mjs";
|
|
19
|
+
import "../request-cache-CizvDoxV.mjs";
|
|
20
|
+
import "../byline-registry-Caj0_gbU.mjs";
|
|
21
|
+
import "../field-defs-cache-dn5Tw79A.mjs";
|
|
22
|
+
import "../object-cache-DyI1SOBK.mjs";
|
|
23
|
+
import { t as BylineRepository } from "../byline-3qjp1-oa.mjs";
|
|
24
|
+
import "../owned-metadata-BPmUjZqI.mjs";
|
|
25
|
+
import { n as slugify } from "../slugify-DvoaEPtL.mjs";
|
|
26
|
+
import "../revision-B_HYO2AE.mjs";
|
|
27
|
+
import { t as MediaRepository } from "../media-BjH5OD-A.mjs";
|
|
28
|
+
import "../user-Bl2_8rhJ.mjs";
|
|
29
|
+
import "../terms-EskuqbKE.mjs";
|
|
30
|
+
import { t as TaxonomyRepository } from "../taxonomy-BK7JmHlo.mjs";
|
|
31
|
+
import { t as OptionsRepository } from "../options-yFkLUuTw.mjs";
|
|
32
|
+
import "../redirect-CJ-FAbNK.mjs";
|
|
33
|
+
import "../content-write-DAZCNKWl.mjs";
|
|
34
|
+
import "../text-extraction-CdqMGYQK.mjs";
|
|
35
|
+
import { n as assertContentVersionStore, o as installContentVersionStore, r as contentStoreCollectionSchema, t as ContentVersionStore } from "../version-store-BXv2D0de.mjs";
|
|
36
|
+
import "../write-intent-DuHVqks9.mjs";
|
|
37
|
+
import "../seo-Cv7ud_m2.mjs";
|
|
38
|
+
import { n as DinewayToolsService, r as integrationResponse, t as DinewayToolsError } from "../service-DeX1PRNt.mjs";
|
|
39
|
+
import { i as parseEncryptionKeys, n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-CIYcw9T9.mjs";
|
|
40
|
+
import "../content-refresh-DJuFIqQ4.mjs";
|
|
41
|
+
import { n as resolveAndValidateExternalUrl, t as SsrfError } from "../ssrf-DcD8vn3E.mjs";
|
|
42
|
+
import "../fts-manager-Zu5ITic0.mjs";
|
|
43
|
+
import "../public-discovery-BnqYofSK.mjs";
|
|
44
|
+
import { n as SchemaRegistry } from "../registry-zXXZezu-.mjs";
|
|
45
|
+
import "../settings-BUONaNnG.mjs";
|
|
46
|
+
import { n as VERSION } from "../version-BlE1LEPb.mjs";
|
|
47
|
+
import { t as IntegrationCredentialStore } from "../store-BzaAtszy.mjs";
|
|
48
|
+
import { a as reconcileManifestAccess, i as pluginManifestSchema } from "../manifest-schema-DaQpgyTB.mjs";
|
|
49
|
+
import "../content-Dr22fzA_.mjs";
|
|
50
|
+
import "../migrations-BAjF60cl.mjs";
|
|
51
|
+
import { t as validateSeed } from "../validate-C-yk7mmX.mjs";
|
|
52
|
+
import { t as applySeed } from "../apply-B5qoX19G.mjs";
|
|
53
|
+
import { n as validateWorkersBindings, t as WORKERS_BUILD_METADATA } from "../workers-build-4926MPc0.mjs";
|
|
54
|
+
import { n as d1ReleaseRevision } from "../state-CKkqoA6i.mjs";
|
|
55
|
+
import { a as createForgewayAccountClient, c as normalizeForgewayApiUrl, d as refreshForgewayAccountCredentials, f as removeStoredForgewayAccount, g as writeForgewayCredentials, h as readForgewayCredentials, i as completeForgewayAccountLogin, l as normalizeForgewayEmail, m as listForgewayCredentials, n as DEFAULT_FORGEWAY_API_BASE_URL, o as getForgewayDinewayAccount, p as sendForgewayAccountLoginLink, r as InvalidForgewayAccountCredentialsError, s as normalizeDinewayWebUrl, t as DEFAULT_DINEWAY_WEB_URL, u as readStoredForgewayAccount } from "../forgeway-account-YzraapbX.mjs";
|
|
56
|
+
import { n as output, t as configureOutputMode } from "../output-ljHaxIHX.mjs";
|
|
45
57
|
import { createHeaderAwareFetch, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
46
|
-
import { t as convertDataForRead } from "../portable-text-
|
|
47
|
-
import { _ as saveMarketplaceCredential, a as ensureProjectGitignoreDinewayLocalState, c as resolveDinewayBaseUrl, d as getCredentials, f as getMarketplaceCredential, g as saveCredentials, h as resolveCredentialKey, i as DEFAULT_DINEWAY_URL, l as resolveDinewayToken, m as removeMarketplaceCredential, n as connectionArgs, o as ensureProjectGitignoreEntry, p as removeCredentials, r as createClientFromArgs, s as readProjectEnv, u as upsertProjectEnv } from "../client-factory-
|
|
48
|
-
import { t as migrateD1Release } from "../release-
|
|
58
|
+
import { t as convertDataForRead } from "../portable-text-CSbRjM-T.mjs";
|
|
59
|
+
import { _ as saveMarketplaceCredential, a as ensureProjectGitignoreDinewayLocalState, c as resolveDinewayBaseUrl, d as getCredentials, f as getMarketplaceCredential, g as saveCredentials, h as resolveCredentialKey, i as DEFAULT_DINEWAY_URL, l as resolveDinewayToken, m as removeMarketplaceCredential, n as connectionArgs, o as ensureProjectGitignoreEntry, p as removeCredentials, r as createClientFromArgs, s as readProjectEnv, u as upsertProjectEnv } from "../client-factory-BLbm250o.mjs";
|
|
60
|
+
import { t as migrateD1Release } from "../release-Cpi0-Bzq.mjs";
|
|
61
|
+
import { a as verifyContentMigration, c as contentMigrationSnapshotSchema, i as stageContentMigrationEntry, l as migrateContentStorageConfig, n as completeContentMigration, o as bootstrapContentDirectoryPage, r as rollbackContentMigration, t as activateContentMigrationEntry } from "../migration-DJuj7ZwN.mjs";
|
|
49
62
|
import { LocalStorage } from "../storage/local.mjs";
|
|
50
|
-
import { r as fileExists$11, t as bundleCommand } from "../bundle-
|
|
63
|
+
import { r as fileExists$11, t as bundleCommand } from "../bundle-DWn5eFKz.mjs";
|
|
51
64
|
import { createRequire } from "node:module";
|
|
52
|
-
import { createHash } from "node:crypto";
|
|
65
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
53
66
|
import { CompiledQuery, Kysely, sql } from "kysely";
|
|
54
67
|
import { z } from "zod";
|
|
55
68
|
import { createGzipDecoder, unpackTar } from "modern-tar";
|
|
@@ -57,7 +70,7 @@ import { createReadStream, existsSync, readFileSync, writeFileSync } from "node:
|
|
|
57
70
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
58
71
|
import sax from "sax";
|
|
59
72
|
import { pathToFileURL } from "node:url";
|
|
60
|
-
import { access, mkdir, mkdtemp, readFile, readdir, realpath, rm, stat, writeFile } from "node:fs/promises";
|
|
73
|
+
import { access, link, mkdir, mkdtemp, open, readFile, readdir, realpath, rm, stat, writeFile } from "node:fs/promises";
|
|
61
74
|
import { defineCommand, runCommand, runMain } from "citty";
|
|
62
75
|
import { createInterface } from "node:readline/promises";
|
|
63
76
|
import consola, { consola as consola$1 } from "consola";
|
|
@@ -883,6 +896,7 @@ const integrationSchema = z.object({
|
|
|
883
896
|
entrypoint: z.string(),
|
|
884
897
|
config: z.unknown()
|
|
885
898
|
}).optional(),
|
|
899
|
+
contentStorage: contentStorageConfigSchema.optional(),
|
|
886
900
|
plugins: z.array(pluginDescriptor).default([])
|
|
887
901
|
}) })
|
|
888
902
|
});
|
|
@@ -994,6 +1008,386 @@ async function loadD1Dialect(cwd) {
|
|
|
994
1008
|
return module.createD1Dialect;
|
|
995
1009
|
}
|
|
996
1010
|
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/content-storage/capacity.ts
|
|
1013
|
+
const CONTENT_CAPACITY_THRESHOLDS = {
|
|
1014
|
+
warning: 6e9,
|
|
1015
|
+
prepare: 7e9,
|
|
1016
|
+
relocate: 8e9
|
|
1017
|
+
};
|
|
1018
|
+
async function readContentDatabaseCapacity(db) {
|
|
1019
|
+
const binding = d1Database(db);
|
|
1020
|
+
if (!binding) throw new Error("Physical content capacity requires a D1 database binding.");
|
|
1021
|
+
const result = await binding.prepare("SELECT 1 AS content_capacity_probe").all();
|
|
1022
|
+
const metadata = z.object({
|
|
1023
|
+
size_after: z.number().finite().positive().optional(),
|
|
1024
|
+
served_by_region: z.string().optional()
|
|
1025
|
+
}).passthrough().safeParse(result.meta);
|
|
1026
|
+
const bytes = metadata.success ? metadata.data.size_after ?? null : null;
|
|
1027
|
+
return {
|
|
1028
|
+
bytes,
|
|
1029
|
+
source: "D1 result meta.size_after",
|
|
1030
|
+
region: metadata.success ? metadata.data.served_by_region ?? null : null,
|
|
1031
|
+
status: bytes === null ? "unknown" : bytes >= CONTENT_CAPACITY_THRESHOLDS.relocate ? "relocate" : bytes >= CONTENT_CAPACITY_THRESHOLDS.prepare ? "prepare" : bytes >= CONTENT_CAPACITY_THRESHOLDS.warning ? "warning" : "healthy",
|
|
1032
|
+
thresholdBytes: CONTENT_CAPACITY_THRESHOLDS,
|
|
1033
|
+
measuredAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
//#endregion
|
|
1038
|
+
//#region src/cli/content-archive.ts
|
|
1039
|
+
/** Private, immutable archives survive a process crash before or after the atomic file link. */
|
|
1040
|
+
function createFileContentArchive(directory) {
|
|
1041
|
+
const root = resolve(directory);
|
|
1042
|
+
const filename = async (key) => join(root, `${await contentDigest(key)}.json`);
|
|
1043
|
+
return {
|
|
1044
|
+
async put(key, snapshot) {
|
|
1045
|
+
await mkdir(root, {
|
|
1046
|
+
recursive: true,
|
|
1047
|
+
mode: 448
|
|
1048
|
+
});
|
|
1049
|
+
const data = canonicalContentJson(contentMigrationSnapshotSchema.parse(snapshot));
|
|
1050
|
+
const target = await filename(key);
|
|
1051
|
+
const temporary = join(root, `.pending-${randomUUID()}`);
|
|
1052
|
+
try {
|
|
1053
|
+
const file = await open(temporary, "wx", 384);
|
|
1054
|
+
try {
|
|
1055
|
+
await file.writeFile(data);
|
|
1056
|
+
await file.sync();
|
|
1057
|
+
} finally {
|
|
1058
|
+
await file.close();
|
|
1059
|
+
}
|
|
1060
|
+
try {
|
|
1061
|
+
await link(temporary, target);
|
|
1062
|
+
} catch (error) {
|
|
1063
|
+
if (!(error instanceof Error && "code" in error && error.code === "EEXIST")) throw error;
|
|
1064
|
+
if (await readFile(target, "utf8") !== data) throw new Error("An immutable archive already exists with different or incomplete data.", { cause: error });
|
|
1065
|
+
}
|
|
1066
|
+
const folder = await open(root, "r");
|
|
1067
|
+
try {
|
|
1068
|
+
await folder.sync();
|
|
1069
|
+
} finally {
|
|
1070
|
+
await folder.close();
|
|
1071
|
+
}
|
|
1072
|
+
} finally {
|
|
1073
|
+
await rm(temporary, { force: true });
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
async get(key) {
|
|
1077
|
+
return contentMigrationSnapshotSchema.parse(JSON.parse(await readFile(await filename(key), "utf8")));
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region src/cli/content-storage-project.ts
|
|
1084
|
+
async function readContentStorageProject(options) {
|
|
1085
|
+
if (options.local === options.remote) throw new Error("Choose exactly one target: --local or --remote.");
|
|
1086
|
+
const cwd = resolve(options.cwd);
|
|
1087
|
+
const project = await readProjectDinewayConfig(cwd);
|
|
1088
|
+
if (project?.database?.entrypoint !== "@dineway-ai/cloudflare/db/d1" || !project.contentStorage) throw new Error("Configure D1 and contentStorage before running content storage maintenance.");
|
|
1089
|
+
const config = project.contentStorage;
|
|
1090
|
+
validateContentStorage(config);
|
|
1091
|
+
const main = await loadProjectWrangler(cwd, options.config, options.environment);
|
|
1092
|
+
const mainBinding = z.object({ binding: z.string() }).parse(project.database.config).binding;
|
|
1093
|
+
const accountId = main.config.account_id ?? process.env.CLOUDFLARE_ACCOUNT_ID;
|
|
1094
|
+
if (options.remote && !accountId) throw new Error("Set account_id or CLOUDFLARE_ACCOUNT_ID explicitly for remote maintenance.");
|
|
1095
|
+
const select = (configuration, binding) => {
|
|
1096
|
+
if (configuration.account_id && configuration.account_id !== accountId) throw new Error("All content databases must belong to the explicitly selected account.");
|
|
1097
|
+
const matches = configuration.d1_databases.filter((database) => database.binding === binding);
|
|
1098
|
+
if (matches.length !== 1) throw new Error(`Configure exactly one D1 database for binding ${binding}.`);
|
|
1099
|
+
return matches[0];
|
|
1100
|
+
};
|
|
1101
|
+
const targets = [{
|
|
1102
|
+
store: "primary",
|
|
1103
|
+
binding: "CONTENT_PRIMARY",
|
|
1104
|
+
database: select(main.config, mainBinding)
|
|
1105
|
+
}];
|
|
1106
|
+
for (const [store, descriptor] of Object.entries(config.stores)) {
|
|
1107
|
+
const target = z.object({
|
|
1108
|
+
config: z.string().min(1),
|
|
1109
|
+
binding: z.string().min(1)
|
|
1110
|
+
}).parse(descriptor.config.database);
|
|
1111
|
+
const worker = await loadProjectWrangler(cwd, target.config, options.environment);
|
|
1112
|
+
targets.push({
|
|
1113
|
+
store,
|
|
1114
|
+
binding: `CONTENT_STORE_${targets.length}`,
|
|
1115
|
+
database: select(worker.config, target.binding)
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
if (new Set(targets.map((target) => target.database.database_id)).size !== targets.length) throw new Error("Content stores must select distinct physical D1 databases.");
|
|
1119
|
+
return {
|
|
1120
|
+
cwd,
|
|
1121
|
+
config,
|
|
1122
|
+
main,
|
|
1123
|
+
targets,
|
|
1124
|
+
accountId
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
async function openContentStorageProject(options) {
|
|
1128
|
+
const project = await readContentStorageProject(options);
|
|
1129
|
+
const directory = await mkdtemp(join(tmpdir(), "dineway-content-"));
|
|
1130
|
+
let proxy;
|
|
1131
|
+
const databases = {};
|
|
1132
|
+
const close = async () => {
|
|
1133
|
+
try {
|
|
1134
|
+
await Promise.all(Object.values(databases).map((db) => db.destroy()));
|
|
1135
|
+
} finally {
|
|
1136
|
+
try {
|
|
1137
|
+
await proxy?.dispose();
|
|
1138
|
+
} finally {
|
|
1139
|
+
await rm(directory, {
|
|
1140
|
+
recursive: true,
|
|
1141
|
+
force: true
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
try {
|
|
1147
|
+
const path = join(directory, "wrangler.json");
|
|
1148
|
+
await writeFile(path, JSON.stringify({
|
|
1149
|
+
name: "dineway-content-maintenance",
|
|
1150
|
+
account_id: project.accountId,
|
|
1151
|
+
compatibility_date: project.main.config.compatibility_date ?? "2026-09-01",
|
|
1152
|
+
d1_databases: project.targets.map((target) => ({
|
|
1153
|
+
...target.database,
|
|
1154
|
+
binding: target.binding,
|
|
1155
|
+
remote: options.remote
|
|
1156
|
+
}))
|
|
1157
|
+
}));
|
|
1158
|
+
proxy = await project.main.api.getPlatformProxy({
|
|
1159
|
+
configPath: path,
|
|
1160
|
+
remoteBindings: options.remote,
|
|
1161
|
+
persist: options.remote ? false : { path: join(project.cwd, ".wrangler/state/v3") }
|
|
1162
|
+
});
|
|
1163
|
+
const dialect = await loadD1Dialect(project.cwd);
|
|
1164
|
+
for (const target of project.targets) {
|
|
1165
|
+
const binding = proxy.env[target.binding];
|
|
1166
|
+
if (!binding || typeof binding.batch !== "function") throw new Error(`Missing D1 binding for store ${target.store}.`);
|
|
1167
|
+
databases[target.store] = new Kysely({ dialect: dialect(binding) });
|
|
1168
|
+
}
|
|
1169
|
+
const jiti = createJiti(join(project.cwd, "package.json"), {
|
|
1170
|
+
fsCache: false,
|
|
1171
|
+
moduleCache: false
|
|
1172
|
+
});
|
|
1173
|
+
const resolvers = {};
|
|
1174
|
+
for (const [collection, rule] of Object.entries(project.config.rules)) {
|
|
1175
|
+
if (!("entrypoint" in rule.partitionBy)) continue;
|
|
1176
|
+
const imported = await jiti.import(rule.partitionBy.entrypoint, { default: true });
|
|
1177
|
+
if (typeof imported !== "function") throw new Error(`Partition resolver for ${collection} must export a default function.`);
|
|
1178
|
+
resolvers[collection] = async (context, config) => z.string().parse(await imported(context, config));
|
|
1179
|
+
}
|
|
1180
|
+
const primary = databases.primary;
|
|
1181
|
+
registerContentStorage(primary, {
|
|
1182
|
+
config: project.config,
|
|
1183
|
+
resolvers,
|
|
1184
|
+
createStores: () => Object.fromEntries(Object.keys(project.config.stores).map((store) => [store, new ContentVersionStore(databases[store], store, project.config.version)]))
|
|
1185
|
+
});
|
|
1186
|
+
return {
|
|
1187
|
+
...project,
|
|
1188
|
+
databases,
|
|
1189
|
+
primary,
|
|
1190
|
+
close
|
|
1191
|
+
};
|
|
1192
|
+
} catch (error) {
|
|
1193
|
+
await close();
|
|
1194
|
+
throw error;
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
//#endregion
|
|
1199
|
+
//#region src/cli/commands/content-storage.ts
|
|
1200
|
+
const actions = [
|
|
1201
|
+
"install",
|
|
1202
|
+
"schema",
|
|
1203
|
+
"config",
|
|
1204
|
+
"inventory",
|
|
1205
|
+
"bootstrap",
|
|
1206
|
+
"begin",
|
|
1207
|
+
"copy",
|
|
1208
|
+
"freeze",
|
|
1209
|
+
"verify",
|
|
1210
|
+
"activate",
|
|
1211
|
+
"resume",
|
|
1212
|
+
"rollback",
|
|
1213
|
+
"cancel"
|
|
1214
|
+
];
|
|
1215
|
+
async function runContentStorageCommand(options) {
|
|
1216
|
+
if (options.dryRun) {
|
|
1217
|
+
const project = await readContentStorageProject(options);
|
|
1218
|
+
return {
|
|
1219
|
+
dryRun: true,
|
|
1220
|
+
action: options.action,
|
|
1221
|
+
location: options.remote ? "remote" : "local",
|
|
1222
|
+
routingVersion: project.config.version,
|
|
1223
|
+
targets: project.targets
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
const project = await openContentStorageProject(options);
|
|
1227
|
+
try {
|
|
1228
|
+
const { primary, config, databases } = project;
|
|
1229
|
+
if (options.action === "install" || options.action === "schema") {
|
|
1230
|
+
if (options.action === "schema") await assertContentStorageConfiguration(primary, config);
|
|
1231
|
+
const schemas = Object.fromEntries(await Promise.all(Object.keys(config.rules).map(async (collection) => {
|
|
1232
|
+
const row = await primary.selectFrom("_dineway_collections").select("id").where("slug", "=", collection).executeTakeFirst();
|
|
1233
|
+
if (!row) throw new Error(`Install the primary schema for ${collection} first.`);
|
|
1234
|
+
const fields = await primary.selectFrom("_dineway_fields").select(["slug", "column_type"]).where("collection_id", "=", row.id).execute();
|
|
1235
|
+
return [collection, contentStoreCollectionSchema.parse({ fields: Object.fromEntries(fields.map((field) => [field.slug, field.column_type.toLowerCase()])) })];
|
|
1236
|
+
})));
|
|
1237
|
+
for (const [name, store] of Object.entries(config.stores)) await installContentVersionStore(databases[name], store.identity, schemas, { upgrade: options.action === "schema" });
|
|
1238
|
+
if (options.action === "install") await installContentStorageConfig(primary, config, { initial: "primary" });
|
|
1239
|
+
return {
|
|
1240
|
+
installed: config.version,
|
|
1241
|
+
stores: Object.keys(config.stores),
|
|
1242
|
+
source: "primary"
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
if (options.action === "config") {
|
|
1246
|
+
if (!options.previousConfig) throw new Error("Provide --previous-config with the exact previously installed contentStorage JSON.");
|
|
1247
|
+
await migrateContentStorageConfig(primary, contentStorageConfigSchema.parse(JSON.parse(await readFile(resolve(project.cwd, options.previousConfig), "utf8"))), config);
|
|
1248
|
+
return {
|
|
1249
|
+
installed: config.version,
|
|
1250
|
+
sourceStoresPreserved: true
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
await assertContentStorageConfiguration(primary, config);
|
|
1254
|
+
for (const [store, definition] of Object.entries(config.stores)) await assertContentVersionStore(databases[store], definition.identity);
|
|
1255
|
+
if (options.action === "inventory") {
|
|
1256
|
+
const partitions = (await sql`SELECT p.*,COUNT(l.entry_id) AS entries FROM _dineway_content_partitions p LEFT JOIN _dineway_content_locations l ON l.collection=p.collection AND l.partition=p.partition GROUP BY p.collection,p.partition ORDER BY p.collection,p.partition`.execute(primary)).rows;
|
|
1257
|
+
const unindexed = [];
|
|
1258
|
+
for (const collection of Object.keys(config.rules)) unindexed.push({
|
|
1259
|
+
collection,
|
|
1260
|
+
...(await sql`SELECT COUNT(*) AS count FROM ${sql.table(`ec_${collection}`)} c WHERE NOT EXISTS (SELECT 1 FROM _dineway_content_locations l WHERE l.collection=${collection} AND l.entry_id=c.id)`.execute(primary)).rows[0]
|
|
1261
|
+
});
|
|
1262
|
+
const migrations = (await sql`SELECT * FROM _dineway_content_migrations ORDER BY created_at DESC LIMIT 100`.execute(primary)).rows;
|
|
1263
|
+
const capacity = [];
|
|
1264
|
+
for (const [store, database] of Object.entries(databases)) capacity.push({
|
|
1265
|
+
store,
|
|
1266
|
+
...await readContentDatabaseCapacity(database)
|
|
1267
|
+
});
|
|
1268
|
+
const delivery = (await sql`SELECT COUNT(*) AS pending,MIN(created_at) AS oldest_created_at,MAX(attempts) AS max_attempts FROM _dineway_content_hook_deliveries WHERE delivered_at IS NULL`.execute(primary)).rows[0];
|
|
1269
|
+
return {
|
|
1270
|
+
routingVersion: config.version,
|
|
1271
|
+
capacity,
|
|
1272
|
+
delivery,
|
|
1273
|
+
partitions,
|
|
1274
|
+
unindexed,
|
|
1275
|
+
migrations,
|
|
1276
|
+
retention: "Archives and old immutable content are never deleted by these commands."
|
|
1277
|
+
};
|
|
1278
|
+
}
|
|
1279
|
+
const collection = options.collection;
|
|
1280
|
+
if (!collection || !Object.hasOwn(config.rules, collection)) throw new Error("Select a configured Content type with --collection.");
|
|
1281
|
+
const limit = Math.min(100, Math.max(1, Math.trunc(options.limit ?? 20)));
|
|
1282
|
+
if (!Number.isFinite(limit)) throw new Error("The page limit must be finite.");
|
|
1283
|
+
if (options.action === "bootstrap") return await bootstrapContentDirectoryPage(primary, collection, {
|
|
1284
|
+
afterId: options.after,
|
|
1285
|
+
limit
|
|
1286
|
+
});
|
|
1287
|
+
const partition = options.partition;
|
|
1288
|
+
if (!partition || !Object.hasOwn(config.rules[collection].stores, partition) || !options.migration) throw new Error("Provide a configured --partition and a stable --migration identifier.");
|
|
1289
|
+
const migration = {
|
|
1290
|
+
collection,
|
|
1291
|
+
partition,
|
|
1292
|
+
id: options.migration
|
|
1293
|
+
};
|
|
1294
|
+
if (options.action === "begin") return await beginContentMigration(primary, config, migration);
|
|
1295
|
+
if (options.action === "freeze") return await freezeContentPartition(primary, migration);
|
|
1296
|
+
if (options.action === "resume") {
|
|
1297
|
+
await completeContentMigration(primary, migration);
|
|
1298
|
+
return {
|
|
1299
|
+
completed: migration,
|
|
1300
|
+
writes: "resumed"
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
if (options.action === "cancel") {
|
|
1304
|
+
await cancelContentMigration(primary, migration);
|
|
1305
|
+
return { cancelled: migration };
|
|
1306
|
+
}
|
|
1307
|
+
if (!options.archive) throw new Error("Provide a private --archive directory. Keep the same archive for the entire migration and at least seven days afterward.");
|
|
1308
|
+
const archive = createFileContentArchive(resolve(project.cwd, options.archive));
|
|
1309
|
+
if (options.action === "verify") return await verifyContentMigration(primary, migration, archive);
|
|
1310
|
+
if (options.action === "rollback") {
|
|
1311
|
+
await rollbackContentMigration(primary, migration, archive);
|
|
1312
|
+
return {
|
|
1313
|
+
restored: migration,
|
|
1314
|
+
writes: "resumed on source"
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
const entries = options.action === "copy" ? (await sql`SELECT c.id FROM ${sql.table(`ec_${collection}`)} c JOIN _dineway_content_locations l ON l.entry_id=c.id AND l.collection=${collection} WHERE l.partition=${partition} AND c.id>${options.after ?? ""} ORDER BY c.id LIMIT ${limit}`.execute(primary)).rows : (await sql`SELECT entry_id AS id FROM _dineway_content_migration_entries WHERE migration_id=${migration.id} AND state='prepared' AND entry_id>${options.after ?? ""} ORDER BY entry_id LIMIT ${limit}`.execute(primary)).rows;
|
|
1318
|
+
for (const entry of entries) if (options.action === "copy") await stageContentMigrationEntry(primary, migration, entry.id, archive);
|
|
1319
|
+
else await activateContentMigrationEntry(primary, migration, entry.id, archive);
|
|
1320
|
+
return {
|
|
1321
|
+
action: options.action,
|
|
1322
|
+
count: entries.length,
|
|
1323
|
+
nextCursor: entries.length === limit ? entries.at(-1)?.id : void 0
|
|
1324
|
+
};
|
|
1325
|
+
} finally {
|
|
1326
|
+
await project.close();
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
const contentStorageCommand = defineCommand({
|
|
1330
|
+
meta: {
|
|
1331
|
+
name: "content-storage",
|
|
1332
|
+
description: "Explicit Content type storage installation and resumable migration"
|
|
1333
|
+
},
|
|
1334
|
+
args: {
|
|
1335
|
+
action: {
|
|
1336
|
+
type: "positional",
|
|
1337
|
+
required: true,
|
|
1338
|
+
description: actions.join(", ")
|
|
1339
|
+
},
|
|
1340
|
+
cwd: {
|
|
1341
|
+
type: "string",
|
|
1342
|
+
default: process.cwd()
|
|
1343
|
+
},
|
|
1344
|
+
local: {
|
|
1345
|
+
type: "boolean",
|
|
1346
|
+
default: false
|
|
1347
|
+
},
|
|
1348
|
+
remote: {
|
|
1349
|
+
type: "boolean",
|
|
1350
|
+
default: false
|
|
1351
|
+
},
|
|
1352
|
+
"dry-run": {
|
|
1353
|
+
type: "boolean",
|
|
1354
|
+
default: false
|
|
1355
|
+
},
|
|
1356
|
+
config: { type: "string" },
|
|
1357
|
+
env: { type: "string" },
|
|
1358
|
+
collection: { type: "string" },
|
|
1359
|
+
partition: { type: "string" },
|
|
1360
|
+
migration: { type: "string" },
|
|
1361
|
+
archive: { type: "string" },
|
|
1362
|
+
"previous-config": { type: "string" },
|
|
1363
|
+
after: { type: "string" },
|
|
1364
|
+
limit: {
|
|
1365
|
+
type: "string",
|
|
1366
|
+
default: "20"
|
|
1367
|
+
}
|
|
1368
|
+
},
|
|
1369
|
+
async run({ args }) {
|
|
1370
|
+
const action = actions.find((value) => value === args.action);
|
|
1371
|
+
if (!action) throw new Error(`Choose a content storage action: ${actions.join(", ")}.`);
|
|
1372
|
+
consola.log(JSON.stringify(await runContentStorageCommand({
|
|
1373
|
+
action,
|
|
1374
|
+
cwd: args.cwd,
|
|
1375
|
+
local: args.local,
|
|
1376
|
+
remote: args.remote,
|
|
1377
|
+
dryRun: args["dry-run"],
|
|
1378
|
+
config: args.config,
|
|
1379
|
+
environment: args.env,
|
|
1380
|
+
collection: args.collection,
|
|
1381
|
+
partition: args.partition,
|
|
1382
|
+
migration: args.migration,
|
|
1383
|
+
archive: args.archive,
|
|
1384
|
+
previousConfig: args["previous-config"],
|
|
1385
|
+
after: args.after,
|
|
1386
|
+
limit: Number(args.limit)
|
|
1387
|
+
}), null, 2));
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
|
|
997
1391
|
//#endregion
|
|
998
1392
|
//#region src/cli/commands/database.ts
|
|
999
1393
|
async function migrateProjectD1(options) {
|
|
@@ -1120,7 +1514,10 @@ const databaseCommand = defineCommand({
|
|
|
1120
1514
|
name: "database",
|
|
1121
1515
|
description: "Explicit database maintenance"
|
|
1122
1516
|
},
|
|
1123
|
-
subCommands: {
|
|
1517
|
+
subCommands: {
|
|
1518
|
+
migrate: migrateCommand,
|
|
1519
|
+
"content-storage": contentStorageCommand
|
|
1520
|
+
}
|
|
1124
1521
|
});
|
|
1125
1522
|
|
|
1126
1523
|
//#endregion
|
|
@@ -3978,7 +4375,7 @@ const devCommand = defineCommand({
|
|
|
3978
4375
|
const remoteUrl = pkg.dineway?.url || process.env.DINEWAY_URL;
|
|
3979
4376
|
if (!remoteUrl) consola.warn("No remote URL configured. Set DINEWAY_URL or dineway.url in package.json");
|
|
3980
4377
|
else try {
|
|
3981
|
-
const { createClientFromArgs } = await import("../client-factory-
|
|
4378
|
+
const { createClientFromArgs } = await import("../client-factory-BLbm250o.mjs").then((n) => n.t);
|
|
3982
4379
|
const client = createClientFromArgs({ url: remoteUrl });
|
|
3983
4380
|
const schema = await client.schemaExport();
|
|
3984
4381
|
const types = await client.schemaTypes();
|
|
@@ -4209,6 +4606,24 @@ const exportSeedCommand = defineCommand({
|
|
|
4209
4606
|
description: "Include content (all or comma-separated collection names)",
|
|
4210
4607
|
required: false
|
|
4211
4608
|
},
|
|
4609
|
+
local: {
|
|
4610
|
+
type: "boolean",
|
|
4611
|
+
description: "Export from the local D1 content storage project",
|
|
4612
|
+
default: false
|
|
4613
|
+
},
|
|
4614
|
+
remote: {
|
|
4615
|
+
type: "boolean",
|
|
4616
|
+
description: "Export from the remote D1 content storage project",
|
|
4617
|
+
default: false
|
|
4618
|
+
},
|
|
4619
|
+
config: {
|
|
4620
|
+
type: "string",
|
|
4621
|
+
description: "Primary Wrangler configuration"
|
|
4622
|
+
},
|
|
4623
|
+
environment: {
|
|
4624
|
+
type: "string",
|
|
4625
|
+
description: "Wrangler environment"
|
|
4626
|
+
},
|
|
4212
4627
|
pretty: {
|
|
4213
4628
|
type: "boolean",
|
|
4214
4629
|
description: "Pretty print JSON output",
|
|
@@ -4216,7 +4631,26 @@ const exportSeedCommand = defineCommand({
|
|
|
4216
4631
|
}
|
|
4217
4632
|
},
|
|
4218
4633
|
async run({ args }) {
|
|
4219
|
-
const
|
|
4634
|
+
const cwd = resolve(args.cwd);
|
|
4635
|
+
if (args.local || args.remote) {
|
|
4636
|
+
const project = await openContentStorageProject({
|
|
4637
|
+
cwd,
|
|
4638
|
+
local: args.local,
|
|
4639
|
+
remote: args.remote,
|
|
4640
|
+
config: args.config,
|
|
4641
|
+
environment: args.environment
|
|
4642
|
+
});
|
|
4643
|
+
try {
|
|
4644
|
+
await assertContentStorageConfiguration(project.primary, project.config);
|
|
4645
|
+
for (const [store, definition] of Object.entries(project.config.stores)) await assertContentVersionStore(project.databases[store], definition.identity);
|
|
4646
|
+
const seed = await exportSeed(project.primary, args["with-content"]);
|
|
4647
|
+
console.log(JSON.stringify(seed, null, args.pretty ? " " : void 0));
|
|
4648
|
+
} finally {
|
|
4649
|
+
await project.close();
|
|
4650
|
+
}
|
|
4651
|
+
return;
|
|
4652
|
+
}
|
|
4653
|
+
const database = resolveCliDatabaseTarget(cwd, args.database);
|
|
4220
4654
|
consola.info(`Database: ${database.display}`);
|
|
4221
4655
|
const db = createDatabase({ url: database.url });
|
|
4222
4656
|
try {
|
|
@@ -4587,8 +5021,12 @@ async function exportContent(db, collections, includeCollections, bylineIdToSeed
|
|
|
4587
5021
|
cursor = result.nextCursor;
|
|
4588
5022
|
} while (cursor);
|
|
4589
5023
|
} catch {}
|
|
5024
|
+
const configured = await db.introspection.getTables().then((tables) => tables.some((table) => table.name === "_dineway_content_partitions"));
|
|
4590
5025
|
for (const collection of collections) {
|
|
4591
5026
|
if (includeCollections && !includeCollections.includes(collection.slug)) continue;
|
|
5027
|
+
if (configured) {
|
|
5028
|
+
if ((await sql`SELECT 1 FROM _dineway_content_partitions WHERE collection=${collection.slug} LIMIT 1`.execute(db)).rows.length > 0) await assertContentStorageConfiguration(db, getContentStorage(db, collection.slug)?.runtime.config);
|
|
5029
|
+
}
|
|
4592
5030
|
const entries = [];
|
|
4593
5031
|
let cursor;
|
|
4594
5032
|
const translationGroupToSeedId = /* @__PURE__ */ new Map();
|
|
@@ -5991,7 +6429,7 @@ const publishCommand = defineCommand({
|
|
|
5991
6429
|
const pluginDir = resolve(args.dir);
|
|
5992
6430
|
try {
|
|
5993
6431
|
const { runCommand } = await import("citty");
|
|
5994
|
-
const { bundleCommand } = await import("../bundle-
|
|
6432
|
+
const { bundleCommand } = await import("../bundle-DWn5eFKz.mjs").then((n) => n.n);
|
|
5995
6433
|
await runCommand(bundleCommand, { rawArgs: ["--dir", pluginDir] });
|
|
5996
6434
|
} catch {
|
|
5997
6435
|
consola.error("Build failed");
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import "../types-
|
|
3
|
-
import "../runner-
|
|
4
|
-
import "../index-
|
|
5
|
-
import "../types-
|
|
6
|
-
import "../
|
|
7
|
-
import "../
|
|
8
|
-
import "../
|
|
9
|
-
import "../
|
|
10
|
-
import "../
|
|
11
|
-
import "../
|
|
1
|
+
import "../types-C3jUu4Bc.mjs";
|
|
2
|
+
import "../types-Dpv_MvwZ.mjs";
|
|
3
|
+
import "../runner-DXQkyPeX.mjs";
|
|
4
|
+
import "../index-CLj17kW9.mjs";
|
|
5
|
+
import "../types-qOEot0UQ.mjs";
|
|
6
|
+
import "../types-DheoByey.mjs";
|
|
7
|
+
import "../adapters-lDnJjNDz.mjs";
|
|
8
|
+
import "../runtime-Bs2JMbb2.mjs";
|
|
9
|
+
import "../hook-events-BQw73jc7.mjs";
|
|
10
|
+
import "../scheduled-publish-eCNGpvNm.mjs";
|
|
11
|
+
import "../public-url-CEC1vj02.mjs";
|
|
12
|
+
import "../validate-DUscf6VG.mjs";
|
|
13
|
+
import "../byline-fields-Bne2v0ti.mjs";
|
|
14
|
+
import "../types-BJztoTbF.mjs";
|
|
12
15
|
import { DinewayClient, PluginRequestOptions } from "../client/index.mjs";
|
|
13
16
|
import { SubCommandsDef } from "citty";
|
|
14
17
|
|
package/dist/cli/plugin-kit.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as output, t as configureOutputMode } from "../output-
|
|
2
|
-
import { n as connectionArgs, r as createClientFromArgs } from "../client-factory-
|
|
1
|
+
import { n as output, t as configureOutputMode } from "../output-ljHaxIHX.mjs";
|
|
2
|
+
import { n as connectionArgs, r as createClientFromArgs } from "../client-factory-BLbm250o.mjs";
|
|
3
3
|
|
|
4
4
|
export { configureOutputMode, connectionArgs, createClientFromArgs, output };
|