dineway 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/activity-BDMlkpYY.mjs +79 -0
- package/dist/{activity-events-y6eT8UW6.mjs → activity-events-DEYmJhWd.mjs} +1 -77
- package/dist/{actor-CrObAPV0.mjs → actor-DA7yL9Yp.mjs} +1 -1
- package/dist/{allowed-origins-_oeyP6x-.mjs → allowed-origins-VLgv2PL1.mjs} +1 -1
- package/dist/api/route-utils.d.mts +9 -10
- package/dist/api/route-utils.mjs +14 -14
- package/dist/api/schemas/index.d.mts +2 -2
- package/dist/api/schemas/index.mjs +5 -5
- package/dist/{api-ByrU2q-Z.mjs → api-DsO87Qak.mjs} +51 -23
- package/dist/{api-tokens-CjVMQT-X.mjs → api-tokens-C4K9eocv.mjs} +1 -1
- package/dist/{apply-bZswmZPm.mjs → apply-DHT0l398.mjs} +19 -19
- package/dist/astro/index.d.mts +10 -11
- package/dist/astro/index.mjs +18 -5
- package/dist/astro/middleware/auth.d.mts +9 -19
- package/dist/astro/middleware/auth.mjs +6 -6
- package/dist/astro/middleware/redirect.mjs +5 -5
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/seed.d.mts +1 -1
- package/dist/astro/middleware/seed.mjs +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +142 -98
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +6 -6
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +6 -6
- package/dist/astro/routes/api/admin/api-tokens/_id_.mjs +4 -4
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +6 -6
- package/dist/astro/routes/api/admin/briefing.mjs +18 -18
- package/dist/astro/routes/api/admin/byline-fields/_slug_/usage.mjs +4 -4
- package/dist/astro/routes/api/admin/byline-fields/_slug_.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/index.mjs +9 -9
- package/dist/astro/routes/api/admin/byline-fields/reorder.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/_id_/translations.mjs +16 -16
- package/dist/astro/routes/api/admin/bylines/index.mjs +16 -16
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +12 -12
- package/dist/astro/routes/api/admin/comments/_id_.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/bulk.mjs +10 -10
- package/dist/astro/routes/api/admin/comments/counts.mjs +5 -5
- package/dist/astro/routes/api/admin/comments/index.mjs +10 -10
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +25 -24
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +25 -24
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +30 -29
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +30 -29
- package/dist/astro/routes/api/admin/context/diff.mjs +29 -28
- package/dist/astro/routes/api/admin/context/index.mjs +30 -29
- package/dist/astro/routes/api/admin/context/stale.mjs +29 -28
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +25 -24
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +29 -28
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +29 -28
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +26 -25
- package/dist/astro/routes/api/admin/hooks/exclusive/index.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +6 -6
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +6 -6
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +55 -51
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +55 -51
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +54 -50
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +54 -50
- package/dist/astro/routes/api/admin/plugins/index.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +54 -50
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +47 -44
- package/dist/astro/routes/api/admin/plugins/updates.mjs +47 -44
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +5 -5
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +30 -65
- package/dist/astro/routes/api/admin/review-requests/index.d.mts +2 -1
- package/dist/astro/routes/api/admin/review-requests/index.mjs +58 -11
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +47 -44
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +47 -44
- package/dist/astro/routes/api/admin/users/_id_/disable.mjs +2 -2
- package/dist/astro/routes/api/admin/users/_id_/enable.mjs +1 -1
- package/dist/astro/routes/api/admin/users/_id_/index.mjs +7 -7
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +6 -6
- 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 +10 -10
- package/dist/astro/routes/api/auth/invite/index.mjs +7 -7
- package/dist/astro/routes/api/auth/invite/register-options.mjs +9 -9
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +9 -9
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +8 -8
- package/dist/astro/routes/api/auth/mode.mjs +1 -1
- package/dist/astro/routes/api/auth/oauth/_provider_/callback.mjs +2 -2
- package/dist/astro/routes/api/auth/oauth/_provider_.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/_id_.mjs +6 -6
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +11 -11
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/verify.mjs +10 -10
- package/dist/astro/routes/api/auth/setup-token/index.mjs +5 -5
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/signup/complete.mjs +10 -10
- package/dist/astro/routes/api/auth/signup/request.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +13 -13
- package/dist/astro/routes/api/comments/_collection_/_contentId_/reactions.mjs +12 -12
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +49 -21
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +67 -33
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +14 -14
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +6 -5
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/authors.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/index.mjs +11 -10
- package/dist/astro/routes/api/content/_collection_/trash.mjs +7 -7
- package/dist/astro/routes/api/dashboard.mjs +8 -8
- 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 +19 -19
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/execute.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress/execute.mjs +35 -34
- package/dist/astro/routes/api/import/wordpress/media.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress/media.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +34 -33
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.d.mts +9 -10
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +31 -30
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +22 -22
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +8 -9
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +40 -39
- package/dist/astro/routes/api/integrations/_provider_.d.mts +8 -0
- package/dist/astro/routes/api/integrations/_provider_.mjs +51 -0
- package/dist/astro/routes/api/integrations/index.d.mts +7 -0
- package/dist/astro/routes/api/integrations/index.mjs +24 -0
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +474 -167
- package/dist/astro/routes/api/media/_id_/confirm.mjs +10 -10
- package/dist/astro/routes/api/media/_id_.mjs +8 -8
- 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 +11 -11
- package/dist/astro/routes/api/media.mjs +14 -14
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/items.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_/translations.mjs +30 -29
- package/dist/astro/routes/api/menus/_name_.mjs +30 -29
- package/dist/astro/routes/api/menus/index.mjs +30 -29
- package/dist/astro/routes/api/oauth/authorize.mjs +7 -7
- package/dist/astro/routes/api/oauth/device/authorize.mjs +6 -6
- 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 +6 -6
- package/dist/astro/routes/api/oauth/token/revoke.mjs +6 -6
- package/dist/astro/routes/api/oauth/token.mjs +6 -6
- package/dist/astro/routes/api/openapi.json.mjs +4 -4
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +20 -5
- package/dist/astro/routes/api/redirects/404s/index.mjs +10 -10
- package/dist/astro/routes/api/redirects/404s/summary.mjs +10 -10
- package/dist/astro/routes/api/redirects/_id_.mjs +31 -30
- package/dist/astro/routes/api/redirects/index.mjs +31 -30
- 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 +49 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +49 -45
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +49 -45
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +49 -45
- package/dist/astro/routes/api/schema/collections/index.mjs +49 -45
- package/dist/astro/routes/api/schema/index.mjs +8 -8
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +47 -44
- package/dist/astro/routes/api/schema/orphans/index.mjs +47 -44
- package/dist/astro/routes/api/search/enable.mjs +11 -11
- package/dist/astro/routes/api/search/index.mjs +10 -10
- package/dist/astro/routes/api/search/rebuild.mjs +11 -11
- package/dist/astro/routes/api/search/stats.mjs +6 -6
- package/dist/astro/routes/api/search/suggest.mjs +10 -10
- package/dist/astro/routes/api/sections/_slug_.mjs +30 -29
- package/dist/astro/routes/api/sections/index.mjs +30 -29
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +30 -29
- package/dist/astro/routes/api/setup/admin-verify.mjs +12 -12
- package/dist/astro/routes/api/setup/admin.mjs +10 -10
- package/dist/astro/routes/api/setup/dev-bypass.mjs +25 -25
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +27 -27
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +6 -6
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +33 -32
- package/dist/astro/routes/api/taxonomies/index.mjs +33 -32
- package/dist/astro/routes/api/themes/preview.mjs +4 -4
- package/dist/astro/routes/api/typegen.mjs +4 -4
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- 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 +29 -28
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +30 -29
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +30 -29
- package/dist/astro/routes/api/widget-areas/_name_.mjs +27 -26
- package/dist/astro/routes/api/widget-areas/index.mjs +30 -29
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +6 -6
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +9 -9
- package/dist/astro/routes/sitemap.xml.mjs +7 -7
- package/dist/astro/session-driver.d.mts +1 -1
- package/dist/astro/session-driver.mjs +2 -2
- package/dist/astro/types.d.mts +13 -12
- package/dist/{audit-ByVKIwWF.mjs → audit-BzhwRVym.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-CqeUmQsv.mjs → auth-control-guard-B_Dx-epW.mjs} +1 -1
- package/dist/{authorize-CcBxcHtz.mjs → authorize-D6MkRtPw.mjs} +1 -1
- package/dist/{briefing-BJaJI8dm.mjs → briefing-Cl70iEH5.mjs} +1 -1
- package/dist/{briefing-CawZ59CY.mjs → briefing-GFhLTLJo.mjs} +7 -7
- package/dist/{bundle-7C_DpkEq.mjs → bundle-CIrUlrkQ.mjs} +2 -2
- package/dist/{byline-e51-fWRs.mjs → byline-BJa1MyKB.mjs} +6 -6
- package/dist/{byline-fields-D-N5qVIG.mjs → byline-fields-BKzA0fJU.mjs} +1 -1
- package/dist/{byline-fields-CUvbslGc.d.mts → byline-fields-DxMpdtsZ.d.mts} +57 -47
- package/dist/{byline-fields-DOJO16Gm.mjs → byline-fields-yT4herdN.mjs} +10 -4
- package/dist/{byline-registry-87nNnYl4.mjs → byline-registry-Ba54M74c.mjs} +2 -2
- package/dist/{bylines-CMQNCNFh.mjs → bylines-B53Saxdb.mjs} +3 -3
- package/dist/{bylines-y4LO-dTj.mjs → bylines-kixFoaRV.mjs} +5 -5
- package/dist/{cache-C-FNTFYK.mjs → cache-fpisdt5Q.mjs} +2 -2
- package/dist/{chunks-CxBt-GxR.mjs → chunks-DX_b8_4Z.mjs} +1 -1
- package/dist/cli/index.d.mts +29 -1
- package/dist/cli/index.mjs +1527 -1222
- package/dist/cli/plugin-kit.d.mts +75 -0
- package/dist/cli/plugin-kit.mjs +4 -0
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +27 -52
- package/dist/client/index.mjs +34 -7
- package/dist/client-factory-DEtHApCc.mjs +323 -0
- package/dist/{comment-DlA4iChg.mjs → comment-B88XcvU1.mjs} +1 -1
- package/dist/{comment-reaction-DfFao1ST.mjs → comment-reaction-Ckn6vCmB.mjs} +1 -1
- package/dist/{comments-DApFGMsP.mjs → comments-BDXsbL7z.mjs} +1 -1
- package/dist/{content-Bh4BDjv8.mjs → content-Cbl8HbIR.mjs} +2 -2
- package/dist/{content-refresh-CgutSUfO.mjs → content-refresh-BmkilU5M.mjs} +5 -5
- package/dist/{context-CK4ym2Sf.mjs → context-AJNd0tcG.mjs} +2 -2
- package/dist/{context-C5W3G18y.mjs → context-DT0tIsfw.mjs} +24 -13
- package/dist/{context-route-helpers-MASyGgWf.mjs → context-route-helpers-DhP--tTq.mjs} +2 -2
- package/dist/{dashboard-DQkVT7Ei.mjs → dashboard-YvDEYbS3.mjs} +4 -4
- 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-BnqRH-T9.mjs → device-flow-BKKeobcV.mjs} +5 -5
- package/dist/{enrich-DIFIFA8O.mjs → enrich-Ck9tfMqe.mjs} +1 -1
- package/dist/{error-CytFlgcd.mjs → error-BW9f_ynq.mjs} +16 -2
- package/dist/{experimental-workflows-BMsUnIAw.mjs → experimental-workflows-CgO73K4e.mjs} +1 -1
- package/dist/{field-defs-cache-DRNdhBJv.mjs → field-defs-cache-CiXP3eO3.mjs} +4 -4
- package/dist/{fts-manager-Crzypjqu.mjs → fts-manager-Zo9uhGel.mjs} +1 -1
- package/dist/{hitl-requests-B4Vbcmaq.mjs → hitl-requests-Bee8Cjj8.mjs} +2 -2
- package/dist/{hitl-route-helpers-hEVzvP8l.mjs → hitl-route-helpers-DtHaKGgm.mjs} +5 -5
- package/dist/{import-Bh9biJfx.mjs → import-C-zxnT89.mjs} +7 -7
- package/dist/{index-D4y6NGiy.d.mts → index-DybFmYtZ.d.mts} +79 -3
- package/dist/index.d.mts +15 -17
- package/dist/index.mjs +83 -78
- package/dist/integration-credentials-D3ZneN0L.mjs +49 -0
- package/dist/{jsonld-Dq0gsnOH.d.mts → jsonld-CoTa8I1a.d.mts} +2 -2
- package/dist/{load-DmYeniXl.mjs → load-Cuiyh8LT.mjs} +1 -1
- package/dist/{loader-CjWqjweO.mjs → loader-WHf22FwU.mjs} +2 -2
- package/dist/{manifest-schema-BxVPYMJR.mjs → manifest-schema-DKa3ZaJL.mjs} +6 -2
- package/dist/{mcp-reviewed-executor-TwVbMzG6.mjs → mcp-reviewed-executor-DnlF7mIL.mjs} +6 -3
- 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 +10 -11
- package/dist/media/local-runtime.mjs +2 -2
- package/dist/{media-DMj0grzC.mjs → media-B4m-cnmj.mjs} +1 -1
- package/dist/{media-allowlist-BlVCSzHx.mjs → media-allowlist-BQyIBPzd.mjs} +1 -1
- package/dist/{menus-TaW1gKnk.mjs → menus-LYALU2Mf.mjs} +2 -2
- package/dist/{menus-xvsnVZXw.mjs → menus-oYfViqfE.mjs} +6 -6
- package/dist/{oauth-authorization-DiaGvRVz.mjs → oauth-authorization-CX7aa8Ph.mjs} +5 -5
- package/dist/{oauth-clients-Dl9E8dEM.mjs → oauth-clients-D9Gg0WjF.mjs} +2 -2
- package/dist/object-cache/memory.d.mts +1 -1
- package/dist/output-13u4dvu-.mjs +68 -0
- package/dist/page/index.d.mts +9 -3
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-CbymENaR.mjs → parse-B-Y84oJl.mjs} +1 -1
- package/dist/plugin-utils.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.d.mts +8 -9
- package/dist/plugins/adapt-sandbox-entry.mjs +3 -1
- package/dist/{plugins-BolVa-tl.mjs → plugins-B7-4Okii.mjs} +95 -10
- package/dist/portable-text-Ehqj3I_y.d.mts +45 -0
- package/dist/{preview-vSVg6fwG.mjs → preview-BMIReQGc.mjs} +2 -2
- package/dist/{provider-loader-MD8zAbnH.d.mts → provider-loader-BIbIiz0P.d.mts} +1 -1
- package/dist/{public-url-gsp3oUbu.d.mts → public-url-DYISdY_R.d.mts} +1 -1
- package/dist/publication-authorization-BVQ5rCAF.mjs +985 -0
- package/dist/{query-CfRCdaL3.mjs → query-C_m8sn-S.mjs} +13 -13
- package/dist/{query-jaAmw8E1.mjs → query-DNczixZr.mjs} +3 -3
- package/dist/{rate-limit-ZLdyWoZF.mjs → rate-limit-oUGexQO1.mjs} +2 -2
- package/dist/{redirect-BAjt4Z6b.mjs → redirect-DoDgOWIA.mjs} +2 -2
- package/dist/{redirects-BTdwpQtE.mjs → redirects-CrP6U4hZ.mjs} +4 -4
- package/dist/{redirects-CA-xylPG.mjs → redirects-E_B6hvuz.mjs} +18 -10
- package/dist/{registry-CtyVedcN.mjs → registry-SEJqFliS.mjs} +24 -10
- package/dist/{request-meta-CUypToDJ.mjs → request-meta-DHFIzWcf.mjs} +1 -1
- package/dist/review-payload-BysRWpxS.mjs +111 -0
- package/dist/{review-requests-DUyEmtmG.mjs → review-requests-CObSuTYU.mjs} +1 -1
- package/dist/review-requests-Cu9051_B.mjs +142 -0
- package/dist/review-route-helpers-Dp_7PH8r.mjs +41 -0
- package/dist/{runner-1tC2tIRV.d.mts → runner-Bcy5w0vj.d.mts} +1 -1
- package/dist/{runner-DB7CRfOF.mjs → runner-BfWbi9YY.mjs} +1166 -447
- package/dist/runtime.d.mts +9 -10
- package/dist/runtime.mjs +3 -3
- package/dist/schema-Dk_N31V4.mjs +8 -0
- package/dist/{search-DSaLgEFI.mjs → search-BXEQepxL.mjs} +3 -3
- package/dist/{secrets-CDZo2k8L.mjs → secrets-CpGpyGcO.mjs} +1 -1
- package/dist/{sections-PVVXHGfp.mjs → sections-DxvEF6Bj.mjs} +2 -2
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +19 -19
- package/dist/seo/index.d.mts +1 -1
- package/dist/seo/index.mjs +1 -1
- package/dist/{seo-CQG3GCHQ.mjs → seo-D1RiaooQ.mjs} +1 -1
- package/dist/service-CY0aH6eI.mjs +347 -0
- package/dist/{service-DiN4ZuPp.mjs → service-QdG0YHws.mjs} +2 -2
- package/dist/{settings-i4VPP8bT.mjs → settings-Dje-PHXo.mjs} +2 -2
- package/dist/{settings-BbqgHWpU.mjs → settings-SVDAB7_W.mjs} +5 -5
- package/dist/{site-activity-Dy3FROs0.mjs → site-activity-BVK40wCy.mjs} +1 -1
- package/dist/{site-context-DQiL8Fl5.mjs → site-context-CzaEGizi.mjs} +565 -129
- package/dist/stable-hash-DshcXvRE.mjs +19 -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 +1 -1
- package/dist/store-CCfMD6nw.mjs +262 -0
- package/dist/{taxonomies-9s-v03H-.mjs → taxonomies-DuhGjBa8.mjs} +3 -3
- package/dist/{taxonomies-DRiixp_E.mjs → taxonomies-WVnFki0o.mjs} +6 -6
- package/dist/{taxonomy-Dvsw6BOs.mjs → taxonomy-CCo2plmV.mjs} +2 -2
- package/dist/{types-DU0bU2Wu.d.mts → types-BFeoAIHl.d.mts} +596 -2
- package/dist/{types-Dq1qT19x.mjs → types-Bshd_6wQ.mjs} +1 -1
- package/dist/{runtime-BOeiQsCv.d.mts → types-CJezJeNE.d.mts} +3561 -1355
- package/dist/{types-4garmdWa.mjs → types-CK0r-Xq4.mjs} +5 -2
- package/dist/{types-C_ly5eTp.d.mts → types-GtwhHAg8.d.mts} +1 -1
- package/dist/{types-DW_-sFyz.d.mts → types-ywmuDETA.d.mts} +2 -0
- package/dist/ui/server-runtime.d.mts +12 -14
- package/dist/ui/server-runtime.mjs +21 -21
- package/dist/{user-BIZPzCb9.mjs → user-Bcvr5ihC.mjs} +2 -2
- package/dist/{utils-CMDhr5Xd.mjs → utils-B7gemXz5.mjs} +1 -1
- package/dist/{validate-CZvb-BKB.d.mts → validate-YiX3rly5.d.mts} +59 -5
- package/dist/{validate-DNs0pTSc.mjs → validate-qKzI3BCv.mjs} +2 -2
- package/dist/version-DEAV9k58.mjs +6 -0
- package/dist/{widgets-f0ibZUIq.mjs → widgets-DyGcotPM.mjs} +3 -3
- package/dist/{wordpress-slugs-BhHJX8XE.mjs → wordpress-slugs-D_LfQCan.mjs} +1 -1
- package/dist/{zod-generator-B7TMjyFJ.mjs → zod-generator-Cr3SiHsc.mjs} +2 -2
- package/package.json +16 -6
- package/dist/hitl-Hw1RmWOq.mjs +0 -677
- package/dist/review-requests-C9Ff11Vq.mjs +0 -79
- package/dist/schema-DXdYj4R3.mjs +0 -8
- package/dist/types-C46EvNdc.d.mts +0 -56
- package/dist/types-C8XW6L19.d.mts +0 -1468
- package/dist/version-BTvfRGc6.mjs +0 -6
- /package/dist/{adapters-NVSs4UH7.d.mts → adapters-DnMDRQ4e.d.mts} +0 -0
- /package/dist/{api-tokens-2r7OWi_I.mjs → api-tokens-D4tcY8R6.mjs} +0 -0
- /package/dist/{challenge-store-Bjlepa2E.mjs → challenge-store-BMkL2kmt.mjs} +0 -0
- /package/dist/{components-Bclf98Be.mjs → components-D0w9MzQe.mjs} +0 -0
- /package/dist/{context-types-DqTo6C79.mjs → context-types-eBuMDAg-.mjs} +0 -0
- /package/dist/{cron-cKcNTix_.mjs → cron-D_c3WUPN.mjs} +0 -0
- /package/dist/{default--K40jqm0.mjs → default-BxoI3SoK.mjs} +0 -0
- /package/dist/{email-console-ChgKFO8-.mjs → email-console-BEMwuxhV.mjs} +0 -0
- /package/dist/{escape-Bd4P_xKg.mjs → escape-smSUOb7u.mjs} +0 -0
- /package/dist/{hash-BPmX6P8I.mjs → hash-mxxx2oPW.mjs} +0 -0
- /package/dist/{media-url-lEKSrpr9.mjs → media-url-B6d-yVI6.mjs} +0 -0
- /package/dist/{mime-CA7Lgovc.mjs → mime-C0vOHFm7.mjs} +0 -0
- /package/dist/{mode-C4CIyjtR.mjs → mode-DPC7segX.mjs} +0 -0
- /package/dist/{normalize-5ek_z7de.mjs → normalize-Cyt7JdF7.mjs} +0 -0
- /package/dist/{oauth-state-store-CNoXafF7.mjs → oauth-state-store-DPVzeoyY.mjs} +0 -0
- /package/dist/{oauth-user-lookup-Ygw4bNyt.mjs → oauth-user-lookup-3E5jlXrr.mjs} +0 -0
- /package/dist/{parser-C1nYd-81.mjs → parser-DX_c5iG3.mjs} +0 -0
- /package/dist/{passkey-config-BUwu8BA3.mjs → passkey-config-DE_0EGEP.mjs} +0 -0
- /package/dist/{patterns-BhAvqO0S.mjs → patterns-CoqlXUvk.mjs} +0 -0
- /package/dist/{placeholder-uvNRZBX9.d.mts → placeholder-C6ZjZcmJ.d.mts} +0 -0
- /package/dist/{portable-text-dA_UlJwW.mjs → portable-text-BASHceim.mjs} +0 -0
- /package/dist/{process-cache-7xgAO9JY.mjs → process-cache-CCDgti7j.mjs} +0 -0
- /package/dist/{provider-loader-D0w9dqjm.mjs → provider-loader-BeQcnPN1.mjs} +0 -0
- /package/dist/{public-url-BEz_sM9n.mjs → public-url-BA-7LKvQ.mjs} +0 -0
- /package/dist/{redirect-wphRBv4y.mjs → redirect-CZFAqHLr.mjs} +0 -0
- /package/dist/{request-cache-D9GQBxMP.mjs → request-cache-CBFjCwSt.mjs} +0 -0
- /package/dist/{resolve-Cb6Dbz-C.mjs → resolve-B6BpqwAR.mjs} +0 -0
- /package/dist/{seo-qa7Dn0jK.mjs → seo-BLszyJxd.mjs} +0 -0
- /package/dist/{seo-contributions-C1EnikHB.mjs → seo-contributions-Ci8_12_r.mjs} +0 -0
- /package/dist/{session-user-CAKImna3.mjs → session-user-BwliEFp0.mjs} +0 -0
- /package/dist/{setup-complete-B8fl-mjV.mjs → setup-complete-PvF8I7Oh.mjs} +0 -0
- /package/dist/{setup-nonce-CoyjILvW.mjs → setup-nonce-DkpYROqg.mjs} +0 -0
- /package/dist/{sidecar-client-C3mqXg4C.mjs → sidecar-client-dt5fv23q.mjs} +0 -0
- /package/dist/{site-url-BML3GQYm.mjs → site-url-DfYDZyWl.mjs} +0 -0
- /package/dist/{ssrf-DWe8jwAp.mjs → ssrf-BZHvtFEv.mjs} +0 -0
- /package/dist/{status-DANd8ERo.mjs → status-BN40hMpr.mjs} +0 -0
- /package/dist/{tokens-1RK1n6ED.mjs → tokens-DIzhPT80.mjs} +0 -0
- /package/dist/{transaction-C2EOMTJA.mjs → transaction-0LEAAy8R.mjs} +0 -0
- /package/dist/{transport-CcJu3Co8.d.mts → transport-BZ3aqdu7.d.mts} +0 -0
- /package/dist/{transport-BNmCqLu7.mjs → transport-C46KHLMP.mjs} +0 -0
- /package/dist/{trusted-proxy-DTXQ2IMv.mjs → trusted-proxy-czZuby6G.mjs} +0 -0
- /package/dist/{types-B3t5cxhU.mjs → types-B7TDDFMG.mjs} +0 -0
- /package/dist/{types-CDpH6MA4.d.mts → types-BsTXSvKG.d.mts} +0 -0
- /package/dist/{types-DF7ZuGGk.d.mts → types-CDcuRd4z.d.mts} +0 -0
- /package/dist/{types-Rc3gQqqw.d.mts → types-S9VIopdY.d.mts} +0 -0
- /package/dist/{types-POH8PQZh.d.mts → types-YxFz4lDr.d.mts} +0 -0
- /package/dist/{types-C5CVgwsV.mjs → types-gvNBqijt.mjs} +0 -0
- /package/dist/{url-CpyFDFpO.mjs → url-D282S1Zw.mjs} +0 -0
- /package/dist/{url-Cac7a9QZ.mjs → url-guoXQQcV.mjs} +0 -0
package/dist/runtime.d.mts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./types-
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./byline-fields-
|
|
8
|
-
import "./types-
|
|
9
|
-
import "./
|
|
10
|
-
import { t as getMediaProvider } from "./provider-loader-MD8zAbnH.mjs";
|
|
1
|
+
import { as as EntryFilter, cs as dinewayLoader, is as EntryData, ls as getDb, rs as CollectionFilter } from "./types-CJezJeNE.mjs";
|
|
2
|
+
import "./types-BFeoAIHl.mjs";
|
|
3
|
+
import "./runner-Bcy5w0vj.mjs";
|
|
4
|
+
import "./index-DybFmYtZ.mjs";
|
|
5
|
+
import "./types-S9VIopdY.mjs";
|
|
6
|
+
import "./validate-YiX3rly5.mjs";
|
|
7
|
+
import "./byline-fields-DxMpdtsZ.mjs";
|
|
8
|
+
import "./types-BsTXSvKG.mjs";
|
|
9
|
+
import { t as getMediaProvider } from "./provider-loader-BIbIiz0P.mjs";
|
|
11
10
|
export { type CollectionFilter, type EntryData, type EntryFilter, dinewayLoader, getDb, getMediaProvider };
|
package/dist/runtime.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./dialect-helpers-fk43GbDb.mjs";
|
|
2
2
|
import "./base64-F8-DUraK.mjs";
|
|
3
|
-
import "./types-
|
|
4
|
-
import { n as dinewayLoader, r as getDb } from "./loader-
|
|
5
|
-
import { t as getMediaProvider } from "./provider-loader-
|
|
3
|
+
import "./types-Bshd_6wQ.mjs";
|
|
4
|
+
import { n as dinewayLoader, r as getDb } from "./loader-WHf22FwU.mjs";
|
|
5
|
+
import { t as getMediaProvider } from "./provider-loader-BeQcnPN1.mjs";
|
|
6
6
|
|
|
7
7
|
export { dinewayLoader, getDb, getMediaProvider };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as __exportAll } from "./runner-BfWbi9YY.mjs";
|
|
2
|
+
import { n as SchemaRegistry } from "./registry-SEJqFliS.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/schema/index.ts
|
|
5
|
+
var schema_exports = /* @__PURE__ */ __exportAll({ SchemaRegistry: () => SchemaRegistry });
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
export { schema_exports as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
1
|
+
import { a as __exportAll } from "./runner-BfWbi9YY.mjs";
|
|
2
2
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
3
|
-
import { r as getDb } from "./loader-
|
|
4
|
-
import { t as FTSManager } from "./fts-manager-
|
|
3
|
+
import { r as getDb } from "./loader-WHf22FwU.mjs";
|
|
4
|
+
import { t as FTSManager } from "./fts-manager-Zo9uhGel.mjs";
|
|
5
5
|
import { sql } from "kysely";
|
|
6
6
|
import { toPlainText } from "@portabletext/toolkit";
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as encodeBase64url, n as decodeBase64url } from "./base64-F8-DUraK.mjs";
|
|
2
2
|
import { t as after } from "./after-BfniwgIf.mjs";
|
|
3
3
|
import { t as OptionsRepository } from "./options-DQPTH5n0.mjs";
|
|
4
|
-
import { r as processCachedAsync, t as createProcessCache } from "./process-cache-
|
|
4
|
+
import { r as processCachedAsync, t as createProcessCache } from "./process-cache-CCDgti7j.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/config/secrets.ts
|
|
7
7
|
const ENCRYPTION_KEY_PREFIX = "dineway_enc_v1_";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as encodeCursor, r as decodeCursor } from "./types-
|
|
2
|
-
import { r as getDb } from "./loader-
|
|
1
|
+
import { i as encodeCursor, r as decodeCursor } from "./types-Bshd_6wQ.mjs";
|
|
2
|
+
import { r as getDb } from "./loader-WHf22FwU.mjs";
|
|
3
3
|
import { ulid } from "ulidx";
|
|
4
4
|
|
|
5
5
|
//#region src/sections/index.ts
|
package/dist/seed/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, h as SeedSection, i as defaultSeed, l as SeedContentEntry, m as SeedRedirect, n as loadSeed, o as SeedApplyOptions, p as SeedMenuItem, r as loadUserSeed, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "../validate-
|
|
1
|
+
import "../types-BFeoAIHl.mjs";
|
|
2
|
+
import { _ as SeedTaxonomyTerm, a as applySeed, b as ValidationResult, c as SeedCollection, d as SeedFile, f as SeedMenu, g as SeedTaxonomy, h as SeedSection, i as defaultSeed, l as SeedContentEntry, m as SeedRedirect, n as loadSeed, o as SeedApplyOptions, p as SeedMenuItem, r as loadUserSeed, s as SeedApplyResult, t as validateSeed, u as SeedField, v as SeedWidget, y as SeedWidgetArea } from "../validate-YiX3rly5.mjs";
|
|
3
3
|
export { type SeedApplyOptions, type SeedApplyResult, type SeedCollection, type SeedContentEntry, type SeedField, type SeedFile, type SeedMenu, type SeedMenuItem, type SeedRedirect, type SeedSection, type SeedTaxonomy, type SeedTaxonomyTerm, type SeedWidget, type SeedWidgetArea, type ValidationResult, applySeed, defaultSeed, loadSeed, loadUserSeed, validateSeed };
|
package/dist/seed/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "../dialect-helpers-fk43GbDb.mjs";
|
|
2
2
|
import "../base64-F8-DUraK.mjs";
|
|
3
|
-
import "../types-
|
|
4
|
-
import "../loader-
|
|
3
|
+
import "../types-Bshd_6wQ.mjs";
|
|
4
|
+
import "../loader-WHf22FwU.mjs";
|
|
5
5
|
import "../object-cache-D51qOseS.mjs";
|
|
6
|
-
import "../content-
|
|
7
|
-
import "../media-
|
|
8
|
-
import "../taxonomy-
|
|
6
|
+
import "../content-Cbl8HbIR.mjs";
|
|
7
|
+
import "../media-B4m-cnmj.mjs";
|
|
8
|
+
import "../taxonomy-CCo2plmV.mjs";
|
|
9
9
|
import "../options-DQPTH5n0.mjs";
|
|
10
|
-
import "../redirect-
|
|
11
|
-
import "../request-cache-
|
|
12
|
-
import "../byline-registry-
|
|
13
|
-
import "../field-defs-cache-
|
|
14
|
-
import "../byline-
|
|
15
|
-
import "../content-refresh-
|
|
16
|
-
import "../fts-manager-
|
|
17
|
-
import "../registry-
|
|
18
|
-
import "../settings-
|
|
19
|
-
import "../ssrf-
|
|
20
|
-
import { t as validateSeed } from "../validate-
|
|
21
|
-
import { t as applySeed } from "../apply-
|
|
22
|
-
import { t as defaultSeed } from "../default
|
|
23
|
-
import { n as loadUserSeed, t as loadSeed } from "../load-
|
|
10
|
+
import "../redirect-DoDgOWIA.mjs";
|
|
11
|
+
import "../request-cache-CBFjCwSt.mjs";
|
|
12
|
+
import "../byline-registry-Ba54M74c.mjs";
|
|
13
|
+
import "../field-defs-cache-CiXP3eO3.mjs";
|
|
14
|
+
import "../byline-BJa1MyKB.mjs";
|
|
15
|
+
import "../content-refresh-BmkilU5M.mjs";
|
|
16
|
+
import "../fts-manager-Zo9uhGel.mjs";
|
|
17
|
+
import "../registry-SEJqFliS.mjs";
|
|
18
|
+
import "../settings-SVDAB7_W.mjs";
|
|
19
|
+
import "../ssrf-BZHvtFEv.mjs";
|
|
20
|
+
import { t as validateSeed } from "../validate-qKzI3BCv.mjs";
|
|
21
|
+
import { t as applySeed } from "../apply-DHT0l398.mjs";
|
|
22
|
+
import { t as defaultSeed } from "../default-BxoI3SoK.mjs";
|
|
23
|
+
import { n as loadUserSeed, t as loadSeed } from "../load-Cuiyh8LT.mjs";
|
|
24
24
|
|
|
25
25
|
export { applySeed, defaultSeed, loadSeed, loadUserSeed, validateSeed };
|
package/dist/seo/index.d.mts
CHANGED
package/dist/seo/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as invalidateCollectionCache } from "./object-cache-D51qOseS.mjs";
|
|
2
|
-
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-
|
|
2
|
+
import { n as chunks, t as SQL_BATCH_SIZE } from "./chunks-DX_b8_4Z.mjs";
|
|
3
3
|
import { sql } from "kysely";
|
|
4
4
|
|
|
5
5
|
//#region src/database/repositories/seo.ts
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { ForgewayClient } from "@forgeway/sdk";
|
|
3
|
+
import { chmod, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
|
|
6
|
+
//#region src/cli/commands/deploy/utils/forgeway-secrets.ts
|
|
7
|
+
const DINEWAY_USER_CONFIG_DIR_NAME = "dineway";
|
|
8
|
+
const TRAILING_SLASH_PATTERN$1 = /\/$/;
|
|
9
|
+
function getDinewayUserConfigDir() {
|
|
10
|
+
return join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), DINEWAY_USER_CONFIG_DIR_NAME);
|
|
11
|
+
}
|
|
12
|
+
function getForgewayAccountSecretPath() {
|
|
13
|
+
return join(getDinewayUserConfigDir(), "forgeway.json");
|
|
14
|
+
}
|
|
15
|
+
function normalizePlatformApiUrl(platformApiUrl) {
|
|
16
|
+
return platformApiUrl.replace(TRAILING_SLASH_PATTERN$1, "");
|
|
17
|
+
}
|
|
18
|
+
function normalizeEmail(email) {
|
|
19
|
+
return email.trim().toLowerCase();
|
|
20
|
+
}
|
|
21
|
+
function accountKey(platformApiUrl, email) {
|
|
22
|
+
return `${normalizePlatformApiUrl(platformApiUrl)}#${normalizeEmail(email)}`;
|
|
23
|
+
}
|
|
24
|
+
function normalizeLookup(lookup) {
|
|
25
|
+
if (typeof lookup === "string") return { cwd: lookup };
|
|
26
|
+
return lookup ?? {};
|
|
27
|
+
}
|
|
28
|
+
async function readAccountStore() {
|
|
29
|
+
try {
|
|
30
|
+
const raw = await readFile(getForgewayAccountSecretPath(), "utf-8");
|
|
31
|
+
return JSON.parse(raw);
|
|
32
|
+
} catch {
|
|
33
|
+
return { version: 1 };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
async function writeAccountStore(store) {
|
|
37
|
+
await mkdir(getDinewayUserConfigDir(), {
|
|
38
|
+
recursive: true,
|
|
39
|
+
mode: 448
|
|
40
|
+
});
|
|
41
|
+
const file = getForgewayAccountSecretPath();
|
|
42
|
+
await writeFile(file, JSON.stringify({
|
|
43
|
+
...store,
|
|
44
|
+
version: 1
|
|
45
|
+
}, null, " ") + "\n", {
|
|
46
|
+
encoding: "utf-8",
|
|
47
|
+
mode: 384
|
|
48
|
+
});
|
|
49
|
+
await chmod(file, 384);
|
|
50
|
+
}
|
|
51
|
+
function accountMatches(credentials, lookup) {
|
|
52
|
+
if (lookup.platformApiUrl && normalizePlatformApiUrl(credentials.platformApiUrl) !== normalizePlatformApiUrl(lookup.platformApiUrl)) return false;
|
|
53
|
+
if (lookup.email && normalizeEmail(credentials.user?.email ?? "") !== normalizeEmail(lookup.email)) return false;
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
async function readForgewayCredentials(lookup) {
|
|
57
|
+
const normalizedLookup = normalizeLookup(lookup);
|
|
58
|
+
const store = await readAccountStore();
|
|
59
|
+
const accounts = Object.values(store.accounts ?? {}).filter((credentials) => accountMatches(credentials, normalizedLookup));
|
|
60
|
+
if (normalizedLookup.platformApiUrl && normalizedLookup.email) return store.accounts?.[accountKey(normalizedLookup.platformApiUrl, normalizedLookup.email)] ?? null;
|
|
61
|
+
if (accounts.length === 1) return accounts[0] ?? null;
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
async function writeForgewayCredentials(credentials, lookup) {
|
|
65
|
+
const normalizedLookup = normalizeLookup(lookup);
|
|
66
|
+
const platformApiUrl = normalizePlatformApiUrl(normalizedLookup.platformApiUrl ?? credentials.platformApiUrl);
|
|
67
|
+
const email = normalizeEmail(normalizedLookup.email ?? credentials.user?.email ?? "");
|
|
68
|
+
if (!email) throw new Error("Forgeway credentials require a user email before they can be stored.");
|
|
69
|
+
const key = accountKey(platformApiUrl, email);
|
|
70
|
+
const store = await readAccountStore();
|
|
71
|
+
store.accounts = {
|
|
72
|
+
...store.accounts,
|
|
73
|
+
[key]: {
|
|
74
|
+
...credentials,
|
|
75
|
+
platformApiUrl
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
store.lastAccountKey = key;
|
|
79
|
+
await writeAccountStore(store);
|
|
80
|
+
}
|
|
81
|
+
async function removeForgewayCredentials(lookup) {
|
|
82
|
+
const key = accountKey(lookup.platformApiUrl, lookup.email);
|
|
83
|
+
const store = await readAccountStore();
|
|
84
|
+
if (!store.accounts || !(key in store.accounts)) return false;
|
|
85
|
+
const accounts = { ...store.accounts };
|
|
86
|
+
delete accounts[key];
|
|
87
|
+
store.accounts = accounts;
|
|
88
|
+
if (store.lastAccountKey === key) {
|
|
89
|
+
const nextAccountKey = Object.keys(accounts).toSorted()[0];
|
|
90
|
+
if (nextAccountKey) store.lastAccountKey = nextAccountKey;
|
|
91
|
+
else delete store.lastAccountKey;
|
|
92
|
+
}
|
|
93
|
+
await writeAccountStore(store);
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
async function listForgewayCredentials(platformApiUrl) {
|
|
97
|
+
const lookup = platformApiUrl ? { platformApiUrl } : {};
|
|
98
|
+
const store = await readAccountStore();
|
|
99
|
+
return Object.values(store.accounts ?? {}).filter((credentials) => accountMatches(credentials, lookup));
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/cli/forgeway-account.ts
|
|
104
|
+
const TRAILING_SLASH_PATTERN = /\/$/;
|
|
105
|
+
const SHADOW_EMAIL_PATTERN = /^shadow_[a-f0-9]{16}@dineway\.ai$/i;
|
|
106
|
+
const INVALID_REFRESH_ERROR_CODES = new Set(["AUTH_UNAUTHORIZED", "INVALID_GRANT"]);
|
|
107
|
+
const DEFAULT_FORGEWAY_API_BASE_URL = "https://api.dineway.ai";
|
|
108
|
+
const DEFAULT_DINEWAY_WEB_URL = "https://dineway.ai";
|
|
109
|
+
var InvalidForgewayAccountCredentialsError = class extends Error {
|
|
110
|
+
constructor(message, options) {
|
|
111
|
+
super(message, options);
|
|
112
|
+
this.name = "InvalidForgewayAccountCredentialsError";
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
function normalizeForgewayApiUrl(value) {
|
|
116
|
+
return (value || DEFAULT_FORGEWAY_API_BASE_URL).replace(TRAILING_SLASH_PATTERN, "");
|
|
117
|
+
}
|
|
118
|
+
function normalizeDinewayWebUrl(value) {
|
|
119
|
+
return (value || DEFAULT_DINEWAY_WEB_URL).replace(TRAILING_SLASH_PATTERN, "");
|
|
120
|
+
}
|
|
121
|
+
function normalizeForgewayEmail(value) {
|
|
122
|
+
return value?.trim().toLowerCase() ?? "";
|
|
123
|
+
}
|
|
124
|
+
function isShadowForgewayEmail(email) {
|
|
125
|
+
return Boolean(email && SHADOW_EMAIL_PATTERN.test(email));
|
|
126
|
+
}
|
|
127
|
+
function isInvalidRefreshCredentialError(error) {
|
|
128
|
+
if (!error || typeof error !== "object") return false;
|
|
129
|
+
const statusCode = "statusCode" in error ? error.statusCode : void 0;
|
|
130
|
+
const errorCode = "error" in error ? error.error : void 0;
|
|
131
|
+
return statusCode === 401 || typeof errorCode === "string" && INVALID_REFRESH_ERROR_CODES.has(errorCode.toUpperCase());
|
|
132
|
+
}
|
|
133
|
+
function createForgewayAccountClient(platformApiUrl, accessToken) {
|
|
134
|
+
return new ForgewayClient({
|
|
135
|
+
baseUrl: normalizeForgewayApiUrl(platformApiUrl),
|
|
136
|
+
accessToken,
|
|
137
|
+
isServerMode: true,
|
|
138
|
+
auth: { detectOAuthCallback: false }
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
function normalizeForgewayUser(user) {
|
|
142
|
+
if (!user?.id || !user.email) throw new Error("Forgeway session response did not include a user email.");
|
|
143
|
+
return {
|
|
144
|
+
id: user.id,
|
|
145
|
+
name: user.profile?.name ?? user.name ?? user.email,
|
|
146
|
+
email: user.email,
|
|
147
|
+
avatarUrl: user.profile?.avatar_url ?? user.avatarUrl ?? user.avatar_url ?? null,
|
|
148
|
+
emailVerified: user.emailVerified ?? user.email_verified ?? false
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function assertFormalForgewayUser(user) {
|
|
152
|
+
if (!user || user.emailVerified !== true || isShadowForgewayEmail(user.email)) throw new Error("Dineway account commands require a verified Forgeway account.");
|
|
153
|
+
return user;
|
|
154
|
+
}
|
|
155
|
+
async function readStoredForgewayAccount(lookup = {}) {
|
|
156
|
+
const platformApiUrl = normalizeForgewayApiUrl(lookup.platformApiUrl);
|
|
157
|
+
const email = normalizeForgewayEmail(lookup.email);
|
|
158
|
+
if (email) return readForgewayCredentials({
|
|
159
|
+
platformApiUrl,
|
|
160
|
+
email
|
|
161
|
+
});
|
|
162
|
+
const stored = await readForgewayCredentials({ platformApiUrl });
|
|
163
|
+
if (stored) return stored;
|
|
164
|
+
const accounts = (await listForgewayCredentials(platformApiUrl)).filter((credentials) => {
|
|
165
|
+
try {
|
|
166
|
+
assertFormalForgewayUser(credentials.user);
|
|
167
|
+
return true;
|
|
168
|
+
} catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
return accounts.length === 1 ? accounts[0] ?? null : null;
|
|
173
|
+
}
|
|
174
|
+
async function removeStoredForgewayAccount(input) {
|
|
175
|
+
return removeForgewayCredentials(input);
|
|
176
|
+
}
|
|
177
|
+
async function refreshForgewayAccountCredentials(credentials) {
|
|
178
|
+
const user = assertFormalForgewayUser(credentials.user);
|
|
179
|
+
if (!credentials.refreshToken) throw new InvalidForgewayAccountCredentialsError("Stored Forgeway account is missing a refresh token. Run `dineway account login`.");
|
|
180
|
+
const { data, error } = await createForgewayAccountClient(credentials.platformApiUrl).auth.refreshSession({ refreshToken: credentials.refreshToken });
|
|
181
|
+
if (error || !data?.accessToken) {
|
|
182
|
+
if (isInvalidRefreshCredentialError(error)) throw new InvalidForgewayAccountCredentialsError(error?.message || "Stored Forgeway account credentials are invalid or expired.", { cause: error });
|
|
183
|
+
throw new Error(error?.message || "Failed to refresh Forgeway account. Run `dineway account login`.", { cause: error });
|
|
184
|
+
}
|
|
185
|
+
const refreshedUser = normalizeForgewayUser(data.user);
|
|
186
|
+
if (normalizeForgewayEmail(refreshedUser.email) !== normalizeForgewayEmail(user.email)) throw new Error("Forgeway refresh returned credentials for a different account.");
|
|
187
|
+
const updated = {
|
|
188
|
+
...credentials,
|
|
189
|
+
platformApiUrl: normalizeForgewayApiUrl(credentials.platformApiUrl),
|
|
190
|
+
accessToken: data.accessToken,
|
|
191
|
+
refreshToken: data.refreshToken ?? credentials.refreshToken,
|
|
192
|
+
user: {
|
|
193
|
+
...refreshedUser,
|
|
194
|
+
emailVerified: true
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
await writeForgewayCredentials(updated, {
|
|
198
|
+
platformApiUrl: updated.platformApiUrl,
|
|
199
|
+
email: updated.user?.email
|
|
200
|
+
});
|
|
201
|
+
return updated;
|
|
202
|
+
}
|
|
203
|
+
async function sendForgewayAccountLoginLink(input) {
|
|
204
|
+
const platformApiUrl = normalizeForgewayApiUrl(input.platformApiUrl);
|
|
205
|
+
const webUrl = normalizeDinewayWebUrl(input.webUrl);
|
|
206
|
+
const redirectTo = new URL("/cli-auth", webUrl).toString();
|
|
207
|
+
const { error } = await createForgewayAccountClient(platformApiUrl).auth.sendPasswordlessSignInEmail({
|
|
208
|
+
email: input.email,
|
|
209
|
+
redirectTo
|
|
210
|
+
});
|
|
211
|
+
if (error) throw new Error(error.message || "Failed to send Forgeway account sign-in link.");
|
|
212
|
+
}
|
|
213
|
+
async function completeForgewayAccountLogin(input) {
|
|
214
|
+
const platformApiUrl = normalizeForgewayApiUrl(input.platformApiUrl);
|
|
215
|
+
const { data, error } = await createForgewayAccountClient(platformApiUrl).auth.signInWithPasswordlessToken({ token: input.token });
|
|
216
|
+
if (error || !data?.accessToken || !data.refreshToken) throw new Error(error?.message || "Forgeway sign-in token is invalid or expired.");
|
|
217
|
+
const user = normalizeForgewayUser(data.user);
|
|
218
|
+
if (input.email && normalizeForgewayEmail(user.email) !== normalizeForgewayEmail(input.email)) throw new Error("Forgeway sign-in returned credentials for a different email.");
|
|
219
|
+
const credentials = {
|
|
220
|
+
platformApiUrl,
|
|
221
|
+
accessToken: data.accessToken,
|
|
222
|
+
refreshToken: data.refreshToken,
|
|
223
|
+
user: {
|
|
224
|
+
...user,
|
|
225
|
+
emailVerified: true
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
await writeForgewayCredentials(credentials, {
|
|
229
|
+
platformApiUrl,
|
|
230
|
+
email: credentials.user?.email
|
|
231
|
+
});
|
|
232
|
+
return credentials;
|
|
233
|
+
}
|
|
234
|
+
async function getForgewayDinewayAccount(credentials) {
|
|
235
|
+
const refreshed = await refreshForgewayAccountCredentials(credentials);
|
|
236
|
+
const { data, error } = await createForgewayAccountClient(refreshed.platformApiUrl, refreshed.accessToken).dineway.getAccount();
|
|
237
|
+
if (error || !data) throw new Error(error?.message || "Failed to fetch Dineway account status from Forgeway.");
|
|
238
|
+
return {
|
|
239
|
+
credentials: refreshed,
|
|
240
|
+
account: data
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region src/dineway-tools/service.ts
|
|
246
|
+
const TERMINAL_RUN_STATUSES = new Set([
|
|
247
|
+
"COMPLETED",
|
|
248
|
+
"FAILED",
|
|
249
|
+
"STOPPED",
|
|
250
|
+
"TIME_OUT"
|
|
251
|
+
]);
|
|
252
|
+
const DEFAULT_WAIT_TIMEOUT_MS = 3e5;
|
|
253
|
+
const DEFAULT_POLL_INTERVAL_MS = 1e3;
|
|
254
|
+
var DinewayToolsError = class extends Error {
|
|
255
|
+
name = "DinewayToolsError";
|
|
256
|
+
constructor(message, code, statusCode) {
|
|
257
|
+
super(message);
|
|
258
|
+
this.code = code;
|
|
259
|
+
this.statusCode = statusCode;
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
var DinewayToolsService = class {
|
|
263
|
+
now;
|
|
264
|
+
sleep;
|
|
265
|
+
constructor(client, dependencies = {}) {
|
|
266
|
+
this.client = client;
|
|
267
|
+
this.now = dependencies.now ?? Date.now;
|
|
268
|
+
this.sleep = dependencies.sleep ?? abortableSleep;
|
|
269
|
+
}
|
|
270
|
+
async discover(request) {
|
|
271
|
+
return unwrapIntegrationResponse(await this.client.discover(request), "TOOLS_DISCOVER_FAILED", "Failed to discover Integration endpoints.");
|
|
272
|
+
}
|
|
273
|
+
async inspect(request) {
|
|
274
|
+
return unwrapIntegrationResponse(await this.client.inspect(request), "TOOLS_INSPECT_FAILED", "Failed to inspect the Integration endpoint.");
|
|
275
|
+
}
|
|
276
|
+
async run(request, options = {}) {
|
|
277
|
+
return unwrapIntegrationResponse(await this.client.run(request, options), "TOOLS_RUN_FAILED", "Failed to run the Integration endpoint.", credentialValues(request.credential));
|
|
278
|
+
}
|
|
279
|
+
async listRuns(options = {}) {
|
|
280
|
+
return unwrapIntegrationResponse(await this.client.listRuns({
|
|
281
|
+
...options,
|
|
282
|
+
limit: options.limit ?? 20
|
|
283
|
+
}), "TOOLS_RUNS_LIST_FAILED", "Failed to list Integration runs.");
|
|
284
|
+
}
|
|
285
|
+
async getRun(runId, signal) {
|
|
286
|
+
return unwrapIntegrationResponse(await this.client.getRun(runId, { signal }), "TOOLS_RUN_GET_FAILED", "Failed to get the Integration run.");
|
|
287
|
+
}
|
|
288
|
+
async stopRun(runId, request = {}, signal) {
|
|
289
|
+
return unwrapIntegrationResponse(await this.client.stopRun(runId, request, { signal }), "TOOLS_RUN_STOP_FAILED", "Failed to stop the Integration run.", credentialValues(request.credential));
|
|
290
|
+
}
|
|
291
|
+
async waitForRun(runId, options = {}) {
|
|
292
|
+
const timeoutMs = options.timeoutMs ?? DEFAULT_WAIT_TIMEOUT_MS;
|
|
293
|
+
const pollIntervalMs = options.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS;
|
|
294
|
+
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) throw new DinewayToolsError("Run wait timeout must be a positive number of milliseconds.", "INVALID_WAIT_TIMEOUT");
|
|
295
|
+
if (!Number.isFinite(pollIntervalMs) || pollIntervalMs < 0) throw new DinewayToolsError("Run poll interval must be a non-negative number of milliseconds.", "INVALID_POLL_INTERVAL");
|
|
296
|
+
const startedAt = this.now();
|
|
297
|
+
while (true) {
|
|
298
|
+
throwIfAborted(options.signal);
|
|
299
|
+
const run = await this.getRun(runId, options.signal);
|
|
300
|
+
if (isTerminalIntegrationRun(run)) return run;
|
|
301
|
+
if (this.now() - startedAt >= timeoutMs) throw new DinewayToolsError(`Timed out waiting for Integration run ${runId}. The run may still be active.`, "RUN_WAIT_TIMEOUT");
|
|
302
|
+
await this.sleep(pollIntervalMs, options.signal);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
function isTerminalIntegrationRun(run) {
|
|
307
|
+
return TERMINAL_RUN_STATUSES.has(run.status);
|
|
308
|
+
}
|
|
309
|
+
function unwrapIntegrationResponse(response, fallbackCode, fallbackMessage, sensitiveValues = []) {
|
|
310
|
+
if (response.data !== null && response.data !== void 0) return response.data;
|
|
311
|
+
const error = response.error;
|
|
312
|
+
const message = typeof error?.message === "string" && error.message.trim().length > 0 ? error.message : fallbackMessage;
|
|
313
|
+
const code = typeof error?.code === "string" ? error.code : typeof error?.error === "string" ? error.error : fallbackCode;
|
|
314
|
+
const statusCode = typeof error?.statusCode === "number" ? error.statusCode : void 0;
|
|
315
|
+
throw new DinewayToolsError(redactValues(message, sensitiveValues), code, statusCode);
|
|
316
|
+
}
|
|
317
|
+
function credentialValues(credential) {
|
|
318
|
+
if (!credential) return [];
|
|
319
|
+
return credential.type === "token" ? [credential.value] : [credential.username, credential.password];
|
|
320
|
+
}
|
|
321
|
+
function redactValues(message, sensitiveValues) {
|
|
322
|
+
let redacted = message;
|
|
323
|
+
for (const value of sensitiveValues) if (value.length > 0) redacted = redacted.replaceAll(value, "[REDACTED]");
|
|
324
|
+
return redacted;
|
|
325
|
+
}
|
|
326
|
+
function throwIfAborted(signal) {
|
|
327
|
+
if (signal?.aborted) throw signal.reason instanceof Error ? signal.reason : /* @__PURE__ */ new Error("Operation aborted");
|
|
328
|
+
}
|
|
329
|
+
async function abortableSleep(durationMs, signal) {
|
|
330
|
+
throwIfAborted(signal);
|
|
331
|
+
await new Promise((resolve, reject) => {
|
|
332
|
+
const finish = () => {
|
|
333
|
+
if (signal) signal.removeEventListener("abort", onAbort);
|
|
334
|
+
resolve();
|
|
335
|
+
};
|
|
336
|
+
const timer = setTimeout(finish, durationMs);
|
|
337
|
+
if (!signal) return;
|
|
338
|
+
const onAbort = () => {
|
|
339
|
+
clearTimeout(timer);
|
|
340
|
+
reject(signal.reason instanceof Error ? signal.reason : /* @__PURE__ */ new Error("Operation aborted"));
|
|
341
|
+
};
|
|
342
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
//#endregion
|
|
347
|
+
export { readForgewayCredentials as _, InvalidForgewayAccountCredentialsError as a, getForgewayDinewayAccount as c, normalizeForgewayEmail as d, readStoredForgewayAccount as f, listForgewayCredentials as g, sendForgewayAccountLoginLink as h, DEFAULT_FORGEWAY_API_BASE_URL as i, normalizeDinewayWebUrl as l, removeStoredForgewayAccount as m, DinewayToolsService as n, completeForgewayAccountLogin as o, refreshForgewayAccountCredentials as p, DEFAULT_DINEWAY_WEB_URL as r, createForgewayAccountClient as s, DinewayToolsError as t, normalizeForgewayApiUrl as u, writeForgewayCredentials as v };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
2
|
-
import { t as CommentRepository } from "./comment-
|
|
3
|
-
import { t as escapeHtml } from "./escape-
|
|
2
|
+
import { t as CommentRepository } from "./comment-B88XcvU1.mjs";
|
|
3
|
+
import { t as escapeHtml } from "./escape-smSUOb7u.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/comments/notifications.ts
|
|
6
6
|
const NOTIFICATION_SOURCE = "dineway-comments";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as __exportAll } from "./runner-
|
|
2
|
-
import { a as getSiteSettingsWithDb, s as setSiteSettings } from "./settings-
|
|
1
|
+
import { a as __exportAll } from "./runner-BfWbi9YY.mjs";
|
|
2
|
+
import { a as getSiteSettingsWithDb, s as setSiteSettings } from "./settings-SVDAB7_W.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/settings.ts
|
|
5
5
|
var settings_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getRequestContext } from "./request-context.mjs";
|
|
2
|
-
import { r as getDb } from "./loader-
|
|
2
|
+
import { r as getDb } from "./loader-WHf22FwU.mjs";
|
|
3
3
|
import { t as after } from "./after-BfniwgIf.mjs";
|
|
4
4
|
import { l as invalidateObjectCache, n as cachedQuery, t as CacheNamespace } from "./object-cache-D51qOseS.mjs";
|
|
5
|
-
import { t as MediaRepository } from "./media-
|
|
5
|
+
import { t as MediaRepository } from "./media-B4m-cnmj.mjs";
|
|
6
6
|
import { t as OptionsRepository } from "./options-DQPTH5n0.mjs";
|
|
7
|
-
import { n as peekRequestCache, r as requestCached } from "./request-cache-
|
|
8
|
-
import { n as invalidateProcessCache, r as processCachedAsync, t as createProcessCache } from "./process-cache-
|
|
9
|
-
import { i as resolvePublicMediaUrl } from "./url-
|
|
7
|
+
import { n as peekRequestCache, r as requestCached } from "./request-cache-CBFjCwSt.mjs";
|
|
8
|
+
import { n as invalidateProcessCache, r as processCachedAsync, t as createProcessCache } from "./process-cache-CCDgti7j.mjs";
|
|
9
|
+
import { i as resolvePublicMediaUrl } from "./url-guoXQQcV.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/settings/index.ts
|
|
12
12
|
/** Prefix for site settings in the options table */
|