dineway 0.1.25 → 0.1.27
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 +5 -4
- package/dist/{activity-events-CjOgr0Uv.mjs → activity-events-CpcTzKpF.mjs} +1 -1
- package/dist/{allowed-origins-3nAx5Xeo.mjs → allowed-origins-3RuuoFjC.mjs} +1 -1
- package/dist/api/route-utils.d.mts +10 -10
- package/dist/api/route-utils.mjs +8 -8
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/api/schemas/index.mjs +3 -3
- package/dist/{api-BRxIrKsY.mjs → api-DHgai7zP.mjs} +14 -14
- package/dist/{api-tokens-DAMwe5Kj.mjs → api-tokens-BFg7tiOQ.mjs} +1 -1
- package/dist/api-tokens-L0o9Bd7v.mjs +3 -0
- package/dist/{apply-D7vu4aFn.mjs → apply-TIoQ00aH.mjs} +14 -14
- package/dist/astro/index.d.mts +11 -11
- package/dist/astro/index.mjs +15 -3
- package/dist/astro/middleware/auth.d.mts +10 -10
- package/dist/astro/middleware/auth.mjs +7 -5
- package/dist/astro/middleware/redirect.mjs +3 -3
- package/dist/astro/middleware/request-context.mjs +2 -2
- package/dist/astro/middleware/seed.d.mts +29 -0
- package/dist/astro/middleware/seed.mjs +134 -0
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +63 -62
- package/dist/astro/routes/api/admin/allowed-domains/_domain_.mjs +5 -5
- package/dist/astro/routes/api/admin/allowed-domains/index.mjs +5 -5
- 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 +14 -14
- package/dist/astro/routes/api/admin/bylines/_id_/index.mjs +9 -9
- package/dist/astro/routes/api/admin/bylines/index.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/_id_/status.mjs +9 -9
- package/dist/astro/routes/api/admin/comments/_id_.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/bulk.mjs +7 -7
- package/dist/astro/routes/api/admin/comments/counts.mjs +3 -3
- package/dist/astro/routes/api/admin/comments/index.mjs +7 -7
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +20 -20
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +24 -24
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +24 -24
- package/dist/astro/routes/api/admin/context/diff.mjs +23 -23
- package/dist/astro/routes/api/admin/context/index.mjs +24 -24
- package/dist/astro/routes/api/admin/context/stale.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +20 -20
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +23 -23
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +23 -23
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +21 -21
- 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 +39 -39
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +39 -39
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +32 -32
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +38 -38
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +38 -38
- package/dist/astro/routes/api/admin/plugins/index.mjs +32 -32
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/icon.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +32 -32
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +38 -38
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +32 -32
- package/dist/astro/routes/api/admin/plugins/updates.mjs +32 -32
- package/dist/astro/routes/api/admin/review-requests/_id_/index.mjs +4 -4
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +23 -23
- package/dist/astro/routes/api/admin/review-requests/index.mjs +8 -8
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +32 -32
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/thumbnail.mjs +2 -2
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +32 -32
- 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 +6 -6
- package/dist/astro/routes/api/admin/users/_id_/send-recovery.mjs +2 -2
- package/dist/astro/routes/api/admin/users/index.mjs +5 -5
- package/dist/astro/routes/api/auth/dev-bypass.mjs +3 -3
- package/dist/astro/routes/api/auth/invite/accept.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/invite/index.mjs +6 -6
- package/dist/astro/routes/api/auth/invite/register-options.mjs +8 -8
- package/dist/astro/routes/api/auth/logout.mjs +2 -2
- package/dist/astro/routes/api/auth/magic-link/send.mjs +8 -8
- package/dist/astro/routes/api/auth/magic-link/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/me.mjs +10 -6
- 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 +5 -5
- package/dist/astro/routes/api/auth/passkey/index.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +10 -10
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +8 -8
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/passkey/verify.mjs +9 -9
- package/dist/astro/routes/api/auth/setup-token/index.d.mts +7 -0
- package/dist/astro/routes/api/auth/setup-token/index.mjs +62 -0
- package/dist/astro/routes/api/auth/setup-token/verify.d.mts +8 -0
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +112 -0
- package/dist/astro/routes/api/auth/signup/complete.mjs +9 -9
- package/dist/astro/routes/api/auth/signup/request.mjs +8 -8
- package/dist/astro/routes/api/auth/signup/verify.mjs +1 -1
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/compare.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/discard-draft.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/duplicate.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/permanent.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +9 -9
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +22 -22
- package/dist/astro/routes/api/content/_collection_/_id_/restore.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_/revisions.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/schedule.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/_id_/terms/_taxonomy_.mjs +10 -10
- package/dist/astro/routes/api/content/_collection_/_id_/translations.mjs +2 -2
- package/dist/astro/routes/api/content/_collection_/_id_/unpublish.mjs +4 -4
- package/dist/astro/routes/api/content/_collection_/_id_.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/index.mjs +8 -8
- package/dist/astro/routes/api/content/_collection_/trash.mjs +6 -6
- package/dist/astro/routes/api/dashboard.mjs +4 -4
- 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 +10 -10
- package/dist/astro/routes/api/import/wordpress/analyze.mjs +6 -6
- package/dist/astro/routes/api/import/wordpress/execute.mjs +25 -25
- package/dist/astro/routes/api/import/wordpress/media.mjs +8 -8
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +28 -28
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +25 -25
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/analyze.mjs +12 -12
- package/dist/astro/routes/api/import/wordpress-plugin/execute.d.mts +1 -1
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +27 -27
- package/dist/astro/routes/api/manifest.mjs +4 -4
- package/dist/astro/routes/api/mcp.mjs +45 -45
- package/dist/astro/routes/api/media/_id_/confirm.mjs +6 -6
- package/dist/astro/routes/api/media/_id_.mjs +6 -6
- 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 +8 -8
- package/dist/astro/routes/api/media.mjs +10 -10
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +24 -24
- package/dist/astro/routes/api/menus/_name_/items.mjs +24 -24
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +24 -24
- package/dist/astro/routes/api/menus/_name_/translations.mjs +24 -24
- package/dist/astro/routes/api/menus/_name_.mjs +24 -24
- package/dist/astro/routes/api/menus/index.mjs +24 -24
- 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 +3 -3
- package/dist/astro/routes/api/plugins/_pluginId_/_...path_.mjs +3 -3
- package/dist/astro/routes/api/redirects/404s/index.mjs +8 -8
- package/dist/astro/routes/api/redirects/404s/summary.mjs +8 -8
- package/dist/astro/routes/api/redirects/_id_.mjs +25 -25
- package/dist/astro/routes/api/redirects/index.mjs +25 -25
- 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 +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +33 -33
- package/dist/astro/routes/api/schema/collections/index.mjs +33 -33
- package/dist/astro/routes/api/schema/index.mjs +6 -6
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +32 -32
- package/dist/astro/routes/api/schema/orphans/index.mjs +32 -32
- package/dist/astro/routes/api/search/enable.mjs +9 -9
- package/dist/astro/routes/api/search/index.mjs +8 -8
- package/dist/astro/routes/api/search/rebuild.mjs +9 -9
- package/dist/astro/routes/api/search/stats.mjs +5 -5
- package/dist/astro/routes/api/search/suggest.mjs +8 -8
- package/dist/astro/routes/api/sections/_slug_.mjs +24 -24
- package/dist/astro/routes/api/sections/index.mjs +24 -24
- package/dist/astro/routes/api/settings/email.mjs +3 -3
- package/dist/astro/routes/api/settings.mjs +24 -24
- package/dist/astro/routes/api/setup/admin-verify.mjs +11 -11
- package/dist/astro/routes/api/setup/admin.mjs +9 -9
- package/dist/astro/routes/api/setup/dev-bypass.mjs +18 -18
- package/dist/astro/routes/api/setup/dev-reset.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +19 -19
- package/dist/astro/routes/api/setup/status.mjs +3 -3
- package/dist/astro/routes/api/snapshot.mjs +5 -5
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +26 -26
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +26 -26
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +26 -26
- package/dist/astro/routes/api/taxonomies/index.mjs +26 -26
- 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 +23 -23
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +24 -24
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +24 -24
- package/dist/astro/routes/api/widget-areas/_name_.mjs +22 -22
- package/dist/astro/routes/api/widget-areas/index.mjs +24 -24
- package/dist/astro/routes/api/widget-components.mjs +2 -2
- package/dist/astro/routes/robots.txt.mjs +4 -4
- package/dist/astro/routes/sitemap-_collection_.xml.mjs +4 -4
- package/dist/astro/routes/sitemap.xml.mjs +5 -5
- package/dist/astro/types.d.mts +13 -13
- package/dist/audit-NgiRzqP9.mjs +126 -0
- package/dist/auth/providers/github.d.mts +1 -1
- package/dist/auth/providers/google.d.mts +1 -1
- package/dist/{auth-control-guard-_5V1x8U8.mjs → auth-control-guard-1FHtkDP6.mjs} +1 -1
- package/dist/{authorize-BgIG3yfN.mjs → authorize-BbIhZi3a.mjs} +1 -1
- package/dist/{briefing-PFT3T6KW.mjs → briefing-DD82WaEy.mjs} +1 -1
- package/dist/{briefing-Dk4I4VC8.mjs → briefing-Jsxs587i.mjs} +6 -6
- package/dist/{byline-9WeA8b0a.mjs → byline-DpNNSjET.mjs} +2 -2
- package/dist/{bylines-CaPwztlL.mjs → bylines-75_STR73.mjs} +3 -3
- package/dist/{bylines-DXqaE0d1.d.mts → bylines-Cb7nzI9t.d.mts} +21 -21
- package/dist/{cache-BhJYDPP8.mjs → cache-DQyZ-QaB.mjs} +1 -1
- package/dist/cli/index.mjs +160 -213
- package/dist/client/external-auth-headers.d.mts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/{context-CnrsB3lh.mjs → context-DgqEfcWz.mjs} +2 -2
- package/dist/{context-DRq-f4sM.mjs → context-Ufrm1lOv.mjs} +4 -4
- package/dist/{context-route-helpers-CdFWd8GK.mjs → context-route-helpers-Dq5U_AXp.mjs} +1 -1
- package/dist/{dashboard-DdqRifyu.mjs → dashboard-BC9bgPOH.mjs} +1 -1
- package/dist/db/index.d.mts +3 -3
- 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-AsTA1k4t.mjs → device-flow-CTS91g4A.mjs} +5 -5
- package/dist/{hitl-requests-DcTPiuog.mjs → hitl-requests-DaRuZ7tb.mjs} +2 -2
- package/dist/{hitl-route-helpers-CNqNbune.mjs → hitl-route-helpers-DcPySbZ3.mjs} +4 -4
- package/dist/{import-BO_gy5vZ.mjs → import-DQ4Rfh5h.mjs} +2 -2
- package/dist/{import-CzZYGhnG.mjs → import-DSXK3aQF.mjs} +3 -3
- package/dist/{index-CxVXYBXq.d.mts → index-2tBfB_8X.d.mts} +3 -3
- package/dist/{index-DUurmpun.d.mts → index-CpbixmRL.d.mts} +2 -2
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +56 -55
- package/dist/{jsonld-C3uKF39u.d.mts → jsonld-BhdZoeR1.d.mts} +2 -2
- package/dist/media/index.d.mts +2 -2
- package/dist/media/index.mjs +2 -2
- package/dist/media/local-runtime.d.mts +12 -12
- package/dist/{media-allowlist-D85gK3We.mjs → media-allowlist-D8gsm8_t.mjs} +1 -1
- package/dist/{menus-DXaFTRyU.mjs → menus-DOaL6NaF.mjs} +1 -1
- package/dist/{menus-DtoRO2gt.mjs → menus-DzG3-9tQ.mjs} +4 -4
- package/dist/{oauth-authorization-CRwAJzzA.mjs → oauth-authorization-DyOFXQWq.mjs} +5 -5
- package/dist/{oauth-clients-BlHrNh_u.mjs → oauth-clients-BMs_bmoz.mjs} +2 -2
- package/dist/page/index.d.mts +2 -2
- package/dist/page/index.mjs +1 -1
- package/dist/{parse-BBfZRZYb.mjs → parse-D7Tu6ku4.mjs} +1 -1
- package/dist/{placeholder-2N6m2_O6.d.mts → placeholder-BZpCpid_.d.mts} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +10 -10
- package/dist/plugins/adapt-sandbox-entry.mjs +1 -1
- package/dist/{plugins-CxUx-b5a.mjs → plugins-DCDVDF4B.mjs} +3 -4
- package/dist/{preview-B-MTC5mp.mjs → preview-5HuX6fjF.mjs} +2 -2
- package/dist/{provider-loader-DJ5sLxNP.d.mts → provider-loader-BaZhx7E3.d.mts} +1 -1
- package/dist/{query-CH1GaJmt.mjs → query-BnRpB09I.mjs} +3 -3
- package/dist/{query-D5CIGQv4.mjs → query-DHvNhBhi.mjs} +8 -8
- package/dist/{rate-limit-5ZeKz7oo.mjs → rate-limit-BWP_kKiZ.mjs} +2 -2
- package/dist/{redirect-hKO66LS_.mjs → redirect-BaVvo2te.mjs} +1 -1
- package/dist/{redirects-Dk7N_YeP.mjs → redirects-Ba-lJA5j.mjs} +3 -3
- package/dist/{redirects-BO0fI750.mjs → redirects-CoYlqu8e.mjs} +1 -1
- package/dist/{registry-CYO6XQ-4.mjs → registry-i__XP2WV.mjs} +4 -4
- package/dist/{request-meta-BVx9KkL-.mjs → request-meta-DUGfAeXy.mjs} +1 -1
- package/dist/{review-requests-CO-vO0O0.mjs → review-requests-DuIxM4YM.mjs} +1 -1
- package/dist/{runner-BJm_NJr2.d.mts → runner-pAnQS6iI.d.mts} +1 -1
- package/dist/{runtime-fyApolZR.d.mts → runtime-Cg87dCSm.d.mts} +11 -11
- package/dist/runtime.d.mts +11 -11
- package/dist/runtime.mjs +2 -2
- package/dist/{schema-mjeMcn_6.mjs → schema-U-SeFWwn.mjs} +1 -1
- package/dist/{search-DjaP_Dw-.mjs → search-Cl9preJT.mjs} +2 -2
- package/dist/{sections-DA3GMhNG.mjs → sections-Zx-2q9IH.mjs} +1 -1
- package/dist/seed/index.d.mts +2 -2
- package/dist/seed/index.mjs +13 -13
- package/dist/seo/index.d.mts +1 -1
- package/dist/{seo-DASNc4gD.mjs → seo-BPb_reaG.mjs} +1 -1
- package/dist/{service-Dada1k5R.mjs → service-wPGgmbUa.mjs} +1 -1
- package/dist/{settings-D2k1JraC.mjs → settings-DORe02PC.mjs} +2 -2
- package/dist/{settings-BJW_lmrM.mjs → settings-nr15a8uv.mjs} +1 -1
- package/dist/{site-context-Dr_5pFHr.mjs → site-context-DuBQk6Mp.mjs} +12 -12
- 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/{taxonomies-DVXCWoUF.mjs → taxonomies-BVBKoXRf.mjs} +5 -5
- package/dist/{taxonomies-CZJazF0N.mjs → taxonomies-DGaw_-aU.mjs} +2 -2
- package/dist/{taxonomy-DpXdVSSR.mjs → taxonomy-BvXRL85P.mjs} +1 -1
- package/dist/{types-DzBAohLy.d.mts → types-BIM7jwxr.d.mts} +1 -1
- package/dist/ui/server-runtime.d.mts +7 -7
- package/dist/ui/server-runtime.mjs +13 -13
- package/dist/{validate-BikB29gc.d.mts → validate-BzUCAU2a.d.mts} +3 -3
- package/dist/{validate-BGpmNtMe.mjs → validate-JE-WfUQ5.mjs} +1 -1
- package/dist/version-D-jCq-i4.mjs +6 -0
- package/dist/{widgets-BFh1UZN5.mjs → widgets-Cj6ULpED.mjs} +2 -2
- package/dist/{wordpress-slugs-BzMv9U-N.mjs → wordpress-slugs-hqItqJrQ.mjs} +1 -1
- package/dist/{zod-generator-vOxhed6n.mjs → zod-generator-C4BgFBZV.mjs} +1 -1
- package/package.json +7 -3
- package/dist/api-tokens-BZ9aAeCo.mjs +0 -3
- package/dist/version-pVYv71Mu.mjs +0 -6
- /package/dist/{adapters-C0EARyCK.d.mts → adapters-kZjS7plb.d.mts} +0 -0
- /package/dist/{challenge-store-B9odzfeh.mjs → challenge-store-cJam-E5R.mjs} +0 -0
- /package/dist/{chunks-BjOMG4LF.mjs → chunks-D8KL0nCY.mjs} +0 -0
- /package/dist/{comments-85tbgZQN.mjs → comments-yTbeIYc2.mjs} +0 -0
- /package/dist/{components-DAy-UvX7.mjs → components-BJfa-F6n.mjs} +0 -0
- /package/dist/{context-types-BWspNMDr.mjs → context-types-BrSQNye5.mjs} +0 -0
- /package/dist/{cron-fV9baRVc.mjs → cron-D7FDsRu-.mjs} +0 -0
- /package/dist/{db-errors-BnUbfGsK.mjs → db-errors-DHJCB_gY.mjs} +0 -0
- /package/dist/{default-CiZ8bvSC.mjs → default-5A3XVR7L.mjs} +0 -0
- /package/dist/{email-console-_pTim1bU.mjs → email-console-Bs1qKx59.mjs} +0 -0
- /package/dist/{entity-aliases-PJV8IxDq.mjs → entity-aliases-uOrKvlPg.mjs} +0 -0
- /package/dist/{error-Dyf9fGZE.mjs → error-DLkgOP5m.mjs} +0 -0
- /package/dist/{escape-DA8zlB7z.mjs → escape-r8_GbEU2.mjs} +0 -0
- /package/dist/{experimental-workflows-C7o_9V7S.mjs → experimental-workflows-BbZbIEZp.mjs} +0 -0
- /package/dist/{fts-manager-DYRy6HVi.mjs → fts-manager-DnfOsF4s.mjs} +0 -0
- /package/dist/{hash-DHSsP6_G.mjs → hash-DFFrkivP.mjs} +0 -0
- /package/dist/{load-5R4qZ4zn.mjs → load-BCCcmoW9.mjs} +0 -0
- /package/dist/{loader-dt5DoyI1.mjs → loader-p2imNN98.mjs} +0 -0
- /package/dist/{manifest-schema-CU0XL_ZK.mjs → manifest-schema-C6fzQoWn.mjs} +0 -0
- /package/dist/{mime-DltzYYAL.mjs → mime-DYP4V5Ks.mjs} +0 -0
- /package/dist/{mode-BI1kRvlT.mjs → mode-Bd55iLcP.mjs} +0 -0
- /package/dist/{normalize-ba36HTxZ.mjs → normalize-BY_EJnd9.mjs} +0 -0
- /package/dist/{oauth-state-store-DZs1UZwT.mjs → oauth-state-store-BRSUEkmx.mjs} +0 -0
- /package/dist/{oauth-user-lookup-B7-6YI3R.mjs → oauth-user-lookup-DdcI8ZVL.mjs} +0 -0
- /package/dist/{parser-wEX7xttr.mjs → parser-egIGEco-.mjs} +0 -0
- /package/dist/{passkey-config-CDew7KVU.mjs → passkey-config-AX4sjpQ4.mjs} +0 -0
- /package/dist/{patterns-BKmjvM7K.mjs → patterns-CiyXeDgr.mjs} +0 -0
- /package/dist/{placeholder-BAy3k441.mjs → placeholder-b0Ufu0La.mjs} +0 -0
- /package/dist/{provider-loader-CCPAVrIg.mjs → provider-loader-BdRV01gr.mjs} +0 -0
- /package/dist/{public-url-DuRGs0uF.mjs → public-url-BL2r8dmQ.mjs} +0 -0
- /package/dist/{redirect-CbEyClKc.mjs → redirect-Ce_6Yb6z.mjs} +0 -0
- /package/dist/{request-cache-BzuhyUXj.mjs → request-cache-BpwuE2ix.mjs} +0 -0
- /package/dist/{review-requests-BYuoyse0.mjs → review-requests-CTUU_RJm.mjs} +0 -0
- /package/dist/{secrets-BIrqds5c.mjs → secrets-DfeNNoLa.mjs} +0 -0
- /package/dist/{seo-Dl4QE4El.mjs → seo-CJBiMDkj.mjs} +0 -0
- /package/dist/{seo-contributions-D_CLIsxJ.mjs → seo-contributions-C0LXoWw3.mjs} +0 -0
- /package/dist/{setup-complete-BvSeN5Wh.mjs → setup-complete-C2ztsNhJ.mjs} +0 -0
- /package/dist/{setup-nonce-ChVabyO2.mjs → setup-nonce-BTKq7uBi.mjs} +0 -0
- /package/dist/{sidecar-client-Dta0AELf.mjs → sidecar-client-lrf7ErYJ.mjs} +0 -0
- /package/dist/{site-activity-lsCX_cqp.mjs → site-activity-KFZprBZM.mjs} +0 -0
- /package/dist/{site-url-BketXXft.mjs → site-url-C18yBhtv.mjs} +0 -0
- /package/dist/{ssrf-z3oH8wjK.mjs → ssrf-KAIQS48_.mjs} +0 -0
- /package/dist/{tokens-BMTKHT6X.mjs → tokens-CsP8Se8S.mjs} +0 -0
- /package/dist/{transaction-qfqpPVpu.mjs → transaction-D0FOsb3X.mjs} +0 -0
- /package/dist/{transport-Dt7A12-i.mjs → transport-B7kO-4ee.mjs} +0 -0
- /package/dist/{transport-BZCHo8n0.d.mts → transport-qeWznEPc.d.mts} +0 -0
- /package/dist/{trusted-proxy-8N8sX1D1.mjs → trusted-proxy-Bbm6PLR6.mjs} +0 -0
- /package/dist/{types-DwIXYH8s.d.mts → types-B1NksXAb.d.mts} +0 -0
- /package/dist/{types-DbtpYtHx.d.mts → types-BBETcziA.d.mts} +0 -0
- /package/dist/{types-B7Uld4FZ.d.mts → types-BYjPylrZ.d.mts} +0 -0
- /package/dist/{types-BSP1HbdT.d.mts → types-BgE6gMFI.d.mts} +0 -0
- /package/dist/{types-zfg8SDVI.mjs → types-C3Em8xpG.mjs} +0 -0
- /package/dist/{types-iNqHe2-V.mjs → types-CNNQ8l0v.mjs} +0 -0
- /package/dist/{types-Brp7Hv9S.d.mts → types-DvwHUku7.d.mts} +0 -0
- /package/dist/{types-D0UvtzG1.d.mts → types-cn-fvYQ1.d.mts} +0 -0
- /package/dist/{types-CsX_6h1v.d.mts → types-t7_nCCA9.d.mts} +0 -0
- /package/dist/{url-DOS4RGym.mjs → url-BzhfYtRn.mjs} +0 -0
- /package/dist/{utils-BftjFpR0.mjs → utils-FEbQMgB5.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -9,21 +9,21 @@ import { t as ContentRepository } from "../content-DvpMad_N.mjs";
|
|
|
9
9
|
import { i as encodeBase64url } from "../base64-C1Q9yr0B.mjs";
|
|
10
10
|
import "../types-D1DjBFA9.mjs";
|
|
11
11
|
import { t as MediaRepository } from "../media-Cg4zc9fq.mjs";
|
|
12
|
-
import { t as TaxonomyRepository } from "../taxonomy-
|
|
12
|
+
import { t as TaxonomyRepository } from "../taxonomy-BvXRL85P.mjs";
|
|
13
13
|
import { t as OptionsRepository } from "../options-BF11H_FD.mjs";
|
|
14
|
-
import "../redirect-
|
|
15
|
-
import "../byline-
|
|
16
|
-
import "../request-cache-
|
|
17
|
-
import "../fts-manager-
|
|
18
|
-
import { n as SchemaRegistry } from "../registry-
|
|
19
|
-
import "../loader-
|
|
20
|
-
import "../settings-
|
|
21
|
-
import { i as pluginManifestSchema } from "../manifest-schema-
|
|
22
|
-
import "../ssrf-
|
|
23
|
-
import { t as validateSeed } from "../validate-
|
|
24
|
-
import { t as applySeed } from "../apply-
|
|
25
|
-
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-
|
|
26
|
-
import { o as convertDataForRead } from "../transport-
|
|
14
|
+
import "../redirect-BaVvo2te.mjs";
|
|
15
|
+
import "../byline-DpNNSjET.mjs";
|
|
16
|
+
import "../request-cache-BpwuE2ix.mjs";
|
|
17
|
+
import "../fts-manager-DnfOsF4s.mjs";
|
|
18
|
+
import { n as SchemaRegistry } from "../registry-i__XP2WV.mjs";
|
|
19
|
+
import "../loader-p2imNN98.mjs";
|
|
20
|
+
import "../settings-DORe02PC.mjs";
|
|
21
|
+
import { i as pluginManifestSchema } from "../manifest-schema-C6fzQoWn.mjs";
|
|
22
|
+
import "../ssrf-KAIQS48_.mjs";
|
|
23
|
+
import { t as validateSeed } from "../validate-JE-WfUQ5.mjs";
|
|
24
|
+
import { t as applySeed } from "../apply-TIoQ00aH.mjs";
|
|
25
|
+
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-DfeNNoLa.mjs";
|
|
26
|
+
import { o as convertDataForRead } from "../transport-B7kO-4ee.mjs";
|
|
27
27
|
import { createHeaderAwareFetch, customHeadersInterceptor, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
28
28
|
import { DinewayClient } from "../client/index.mjs";
|
|
29
29
|
import { LocalStorage } from "../storage/local.mjs";
|
|
@@ -1541,17 +1541,6 @@ async function writeForgewayCredentials(credentials, cwd) {
|
|
|
1541
1541
|
store.credentials = credentials;
|
|
1542
1542
|
await writeStore(store, cwd);
|
|
1543
1543
|
}
|
|
1544
|
-
async function readForgewayProjectSecret(projectId, cwd) {
|
|
1545
|
-
return (await readStore(cwd)).projects?.[projectId] ?? null;
|
|
1546
|
-
}
|
|
1547
|
-
async function writeForgewayProjectSecret(projectId, secret, cwd) {
|
|
1548
|
-
const store = await readStore(cwd);
|
|
1549
|
-
store.projects = {
|
|
1550
|
-
...store.projects,
|
|
1551
|
-
[projectId]: secret
|
|
1552
|
-
};
|
|
1553
|
-
await writeStore(store, cwd);
|
|
1554
|
-
}
|
|
1555
1544
|
function shadowGrantKey(platformApiUrl, placeId) {
|
|
1556
1545
|
return `${platformApiUrl.replace(TRAILING_SLASH_PATTERN$1, "")}#${placeId}`;
|
|
1557
1546
|
}
|
|
@@ -1577,7 +1566,6 @@ async function writeForgewayShadowGrant(grant, cwd) {
|
|
|
1577
1566
|
//#endregion
|
|
1578
1567
|
//#region src/cli/commands/deploy/targets/forgeway.ts
|
|
1579
1568
|
const DEFAULT_PLATFORM_API_URL = "https://api.dineway.ai";
|
|
1580
|
-
const DEFAULT_SITE_BASE_DOMAIN = "dineway.site";
|
|
1581
1569
|
const DATABASE_ENV_VAR_NAMES = ["DINEWAY_DATABASE_URL", "DINEWAY_DATABASE_AUTH_TOKEN"];
|
|
1582
1570
|
const POLL_INTERVAL_MS$1 = 5e3;
|
|
1583
1571
|
const POLL_TIMEOUT_MS$1 = 3e5;
|
|
@@ -1594,6 +1582,7 @@ const BACKSLASH_PATTERN = /\\/g;
|
|
|
1594
1582
|
const DIACRITICS_PATTERN = /[\u0300-\u036f]/g;
|
|
1595
1583
|
const NON_COMPARE_PATTERN = /[^\p{Letter}\p{Number}]+/gu;
|
|
1596
1584
|
const LOCATION_PARTS_PATTERN = /[,;|/]+|\s+-\s+/u;
|
|
1585
|
+
const SHADOW_EMAIL_PATTERN = /^shadow_[a-f0-9]{16}@dineway\.ai$/i;
|
|
1597
1586
|
const EXCLUDE_PATTERNS = [
|
|
1598
1587
|
"node_modules",
|
|
1599
1588
|
".git",
|
|
@@ -1634,7 +1623,7 @@ function normalizeForgewayUser(user) {
|
|
|
1634
1623
|
name: user.profile?.name ?? user.name ?? user.email,
|
|
1635
1624
|
email: user.email,
|
|
1636
1625
|
avatarUrl: user.profile?.avatar_url ?? user.avatarUrl ?? user.avatar_url ?? null,
|
|
1637
|
-
emailVerified: user.emailVerified ?? user.email_verified ??
|
|
1626
|
+
emailVerified: user.emailVerified ?? user.email_verified ?? false
|
|
1638
1627
|
};
|
|
1639
1628
|
}
|
|
1640
1629
|
function getFetch(deps) {
|
|
@@ -1676,79 +1665,35 @@ async function parseErrorResponse(response) {
|
|
|
1676
1665
|
}
|
|
1677
1666
|
return `Forgeway request failed: ${response.status}`;
|
|
1678
1667
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
const password = getEnv("FORGEWAY_PASSWORD");
|
|
1682
|
-
if (!email || !password) throw new Error("FORGEWAY_EMAIL and FORGEWAY_PASSWORD are required for admin login.");
|
|
1683
|
-
const response = await forgewayRequest(`${platformApiUrl}/api/auth/admin/sessions`, {
|
|
1684
|
-
method: "POST",
|
|
1685
|
-
headers: { "Content-Type": "application/json" },
|
|
1686
|
-
body: JSON.stringify({
|
|
1687
|
-
email,
|
|
1688
|
-
password
|
|
1689
|
-
})
|
|
1690
|
-
}, deps);
|
|
1691
|
-
if (!response.ok) throw new Error(await parseErrorResponse(response));
|
|
1692
|
-
const payload = await response.json();
|
|
1693
|
-
if (!payload.accessToken || !payload.user) throw new Error("Forgeway login response was missing accessToken or user.");
|
|
1694
|
-
return {
|
|
1695
|
-
platformApiUrl,
|
|
1696
|
-
accessToken: payload.accessToken,
|
|
1697
|
-
refreshToken: payload.refreshToken,
|
|
1698
|
-
user: normalizeForgewayUser(payload.user)
|
|
1699
|
-
};
|
|
1668
|
+
function normalizeEmail(email) {
|
|
1669
|
+
return email.trim().toLowerCase();
|
|
1700
1670
|
}
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
if (envToken) return {
|
|
1704
|
-
platformApiUrl,
|
|
1705
|
-
accessToken: envToken
|
|
1706
|
-
};
|
|
1707
|
-
const stored = await (deps.readCredentials ?? readForgewayCredentials)(cwd);
|
|
1708
|
-
if (stored?.accessToken) return {
|
|
1709
|
-
...stored,
|
|
1710
|
-
platformApiUrl
|
|
1711
|
-
};
|
|
1712
|
-
if (!getEnv("FORGEWAY_EMAIL") || !getEnv("FORGEWAY_PASSWORD")) return null;
|
|
1713
|
-
const credentials = await loginWithEmail(platformApiUrl, deps);
|
|
1714
|
-
await (deps.writeCredentials ?? writeForgewayCredentials)(credentials, cwd);
|
|
1715
|
-
return credentials;
|
|
1671
|
+
function isShadowEmail(email) {
|
|
1672
|
+
return Boolean(email && SHADOW_EMAIL_PATTERN.test(email));
|
|
1716
1673
|
}
|
|
1717
|
-
async function
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
headers: {
|
|
1721
|
-
"Content-Type": "application/json",
|
|
1722
|
-
Authorization: `Bearer ${accessToken}`,
|
|
1723
|
-
...options.headers
|
|
1724
|
-
}
|
|
1725
|
-
}, deps);
|
|
1726
|
-
let response = await request(context.credentials.accessToken);
|
|
1727
|
-
if (response.status === 401 && context.credentials.refreshToken) {
|
|
1728
|
-
const refreshed = await refreshAccessToken(context.projectDir, context.platformApiUrl, context.credentials, deps);
|
|
1729
|
-
context.credentials.accessToken = refreshed;
|
|
1730
|
-
response = await request(refreshed);
|
|
1731
|
-
}
|
|
1732
|
-
if (!response.ok) throw new ForgewayApiError(await parseErrorResponse(response), response.status);
|
|
1733
|
-
return await response.json();
|
|
1734
|
-
}
|
|
1735
|
-
async function refreshAccessToken(cwd, platformApiUrl, credentials, deps) {
|
|
1736
|
-
if (!credentials.refreshToken) throw new Error("Forgeway refresh token is missing. Log in again.");
|
|
1737
|
-
const response = await forgewayRequest(`${platformApiUrl}/api/auth/refresh?client_type=server`, {
|
|
1674
|
+
async function refreshFormalAccessToken(context, deps) {
|
|
1675
|
+
if (!context.refreshToken) throw new Error("Forgeway formal account refresh token is missing. Run dineway deploy again.");
|
|
1676
|
+
const response = await forgewayRequest(`${context.platformApiUrl}/api/auth/refresh?client_type=server`, {
|
|
1738
1677
|
method: "POST",
|
|
1739
1678
|
headers: { "Content-Type": "application/json" },
|
|
1740
|
-
body: JSON.stringify({ refreshToken:
|
|
1679
|
+
body: JSON.stringify({ refreshToken: context.refreshToken })
|
|
1741
1680
|
}, deps);
|
|
1742
|
-
if (!response.ok) throw new Error("Failed to refresh Forgeway
|
|
1681
|
+
if (!response.ok) throw new Error("Failed to refresh Forgeway formal account credentials. Run dineway deploy again.");
|
|
1743
1682
|
const payload = await response.json();
|
|
1744
1683
|
if (!payload.accessToken) throw new Error("Forgeway refresh response was missing accessToken.");
|
|
1684
|
+
const user = assertVerifiedFormalAccountUser(payload.user ? normalizeForgewayUser(payload.user) : context.user, context.user?.email);
|
|
1745
1685
|
const updated = {
|
|
1746
|
-
|
|
1747
|
-
platformApiUrl,
|
|
1686
|
+
platformApiUrl: context.platformApiUrl,
|
|
1748
1687
|
accessToken: payload.accessToken,
|
|
1749
|
-
refreshToken: payload.refreshToken ??
|
|
1688
|
+
refreshToken: payload.refreshToken ?? context.refreshToken,
|
|
1689
|
+
...user ? { user } : {},
|
|
1690
|
+
source: "shadow-email-upgrade",
|
|
1691
|
+
...context.placeId ? { placeId: context.placeId } : {}
|
|
1750
1692
|
};
|
|
1751
|
-
|
|
1693
|
+
context.accessToken = updated.accessToken;
|
|
1694
|
+
context.refreshToken = updated.refreshToken;
|
|
1695
|
+
context.user = updated.user;
|
|
1696
|
+
await (deps.writeCredentials ?? writeForgewayCredentials)(updated, context.projectDir);
|
|
1752
1697
|
return payload.accessToken;
|
|
1753
1698
|
}
|
|
1754
1699
|
async function refreshShadowAccessToken(context, deps) {
|
|
@@ -1794,90 +1739,85 @@ async function promptRequired(question, initialValue, deps, errorMessage) {
|
|
|
1794
1739
|
if (!answer) throw new Error(errorMessage);
|
|
1795
1740
|
return answer;
|
|
1796
1741
|
}
|
|
1797
|
-
async function chooseSingleOrPrompt(label, items, deps) {
|
|
1798
|
-
if (items.length === 0) throw new Error(`No Forgeway ${label}s found.`);
|
|
1799
|
-
if (items.length === 1) return items[0];
|
|
1800
|
-
if (!process.stdin.isTTY && !deps.promptText) throw new Error(`Multiple Forgeway ${label}s found. Set FORGEWAY_${label.toUpperCase()}_ID.`);
|
|
1801
|
-
consola.info(`Available Forgeway ${label}s:`);
|
|
1802
|
-
items.forEach((item, index) => consola.info(` ${index + 1}. ${item.name} (${item.id})`));
|
|
1803
|
-
const answer = await promptRequired(`Choose ${label}: `, "1", deps, `${label} is required.`);
|
|
1804
|
-
const index = Number(answer);
|
|
1805
|
-
if (!Number.isInteger(index) || index < 1 || index > items.length) throw new Error(`Invalid Forgeway ${label} selection: ${answer}`);
|
|
1806
|
-
return items[index - 1];
|
|
1807
|
-
}
|
|
1808
1742
|
function getSavedForgewayMetadata(pkg) {
|
|
1809
1743
|
return pkg.dineway?.deploy?.forgeway ?? {};
|
|
1810
1744
|
}
|
|
1811
|
-
async function
|
|
1812
|
-
const
|
|
1813
|
-
const
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
});
|
|
1867
|
-
}
|
|
1745
|
+
async function resolveForgewayAccountEmail(options, grant, cwd, deps) {
|
|
1746
|
+
const stored = await (deps.readCredentials ?? readForgewayCredentials)(cwd);
|
|
1747
|
+
const storedEmail = stored?.source === "shadow-email-upgrade" && stored.placeId === grant.placeId && stored.user?.emailVerified === true && !isShadowEmail(stored.user?.email) ? stored.user?.email : void 0;
|
|
1748
|
+
const email = normalizeEmail(options.email ?? getEnv("FORGEWAY_EMAIL") ?? storedEmail ?? await promptRequired("Forgeway account email: ", void 0, deps, "Forgeway account email is required. Pass --email or set FORGEWAY_EMAIL."));
|
|
1749
|
+
if (!email || isShadowEmail(email)) throw new Error("Forgeway account email must be a real owner email, not a shadow user email.");
|
|
1750
|
+
return email;
|
|
1751
|
+
}
|
|
1752
|
+
function isStoredFormalCredentialForGrant(stored, grant, email) {
|
|
1753
|
+
if (!stored?.accessToken || stored.source !== "shadow-email-upgrade" || stored.placeId !== grant.placeId || !stored.user) return false;
|
|
1754
|
+
if (normalizeEmail(stored.user.email) !== email) return false;
|
|
1755
|
+
if (stored.user.emailVerified !== true) return false;
|
|
1756
|
+
if (isShadowEmail(stored.user.email)) return false;
|
|
1757
|
+
if (grant.user?.id && stored.user.id !== grant.user.id) return false;
|
|
1758
|
+
return true;
|
|
1759
|
+
}
|
|
1760
|
+
function assertVerifiedFormalAccountUser(user, expectedEmail) {
|
|
1761
|
+
if (!user || user.emailVerified !== true || isShadowEmail(user.email)) throw new Error("Forgeway formal account credentials require a verified formal account.");
|
|
1762
|
+
if (expectedEmail && normalizeEmail(user.email) !== normalizeEmail(expectedEmail)) throw new Error("Forgeway refresh returned credentials for a different email.");
|
|
1763
|
+
return user;
|
|
1764
|
+
}
|
|
1765
|
+
async function shadowUpgradeFetch(context, path, deps, options) {
|
|
1766
|
+
const request = async (accessToken) => await forgewayRequest(`${context.platformApiUrl}${path}`, {
|
|
1767
|
+
...options,
|
|
1768
|
+
headers: {
|
|
1769
|
+
"Content-Type": "application/json",
|
|
1770
|
+
Authorization: `Bearer ${accessToken}`,
|
|
1771
|
+
...options.headers
|
|
1772
|
+
}
|
|
1773
|
+
}, deps);
|
|
1774
|
+
if (!context.accessToken) throw new Error("Dineway shadow deploy grant is missing its access token.");
|
|
1775
|
+
let response = await request(context.accessToken);
|
|
1776
|
+
if (response.status === 401) response = await request(await refreshShadowAccessToken(context, deps));
|
|
1777
|
+
if (!response.ok) throw new ForgewayApiError(await parseErrorResponse(response), response.status);
|
|
1778
|
+
return await response.json();
|
|
1779
|
+
}
|
|
1780
|
+
async function startShadowEmailUpgrade(context, email, deps) {
|
|
1781
|
+
const payload = await shadowUpgradeFetch(context, "/api/auth/users/shadow/upgrade/email/start", deps, {
|
|
1782
|
+
method: "POST",
|
|
1783
|
+
body: JSON.stringify({ email })
|
|
1784
|
+
});
|
|
1785
|
+
if (payload.email && normalizeEmail(payload.email) !== email) throw new Error("Forgeway email verification response returned a different email.");
|
|
1786
|
+
return payload;
|
|
1787
|
+
}
|
|
1788
|
+
async function verifyShadowEmailUpgrade(context, email, otp, deps) {
|
|
1789
|
+
const payload = await shadowUpgradeFetch(context, "/api/auth/users/shadow/upgrade/email/verify", deps, {
|
|
1790
|
+
method: "POST",
|
|
1791
|
+
body: JSON.stringify({
|
|
1792
|
+
email,
|
|
1793
|
+
otp
|
|
1794
|
+
})
|
|
1795
|
+
});
|
|
1796
|
+
if (!payload.accessToken || !payload.refreshToken || !payload.user) throw new Error("Forgeway email upgrade response was missing credentials.");
|
|
1797
|
+
const user = normalizeForgewayUser(payload.user);
|
|
1798
|
+
if (normalizeEmail(user.email) !== email) throw new Error("Forgeway email upgrade returned credentials for a different email.");
|
|
1799
|
+
if (user.emailVerified !== true || isShadowEmail(user.email)) throw new Error("Forgeway email upgrade did not return a verified formal account.");
|
|
1868
1800
|
return {
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
appkey: project.appkey,
|
|
1876
|
-
region: project.region,
|
|
1877
|
-
apiKey,
|
|
1878
|
-
ossHost
|
|
1801
|
+
platformApiUrl: context.platformApiUrl,
|
|
1802
|
+
accessToken: payload.accessToken,
|
|
1803
|
+
refreshToken: payload.refreshToken,
|
|
1804
|
+
user,
|
|
1805
|
+
source: "shadow-email-upgrade",
|
|
1806
|
+
...context.placeId ? { placeId: context.placeId } : {}
|
|
1879
1807
|
};
|
|
1880
1808
|
}
|
|
1809
|
+
async function resolveFormalAccountCredentials(context, grant, email, deps) {
|
|
1810
|
+
const stored = await (deps.readCredentials ?? readForgewayCredentials)(context.projectDir);
|
|
1811
|
+
if (isStoredFormalCredentialForGrant(stored, grant, email)) return {
|
|
1812
|
+
...stored,
|
|
1813
|
+
platformApiUrl: context.platformApiUrl
|
|
1814
|
+
};
|
|
1815
|
+
await startShadowEmailUpgrade(context, email, deps);
|
|
1816
|
+
consola.info(`Sent Forgeway email verification code to ${email}`);
|
|
1817
|
+
const credentials = await verifyShadowEmailUpgrade(context, email, await promptRequired("Email verification code: ", void 0, deps, "Email verification code is required."), deps);
|
|
1818
|
+
await (deps.writeCredentials ?? writeForgewayCredentials)(credentials, context.projectDir);
|
|
1819
|
+
return credentials;
|
|
1820
|
+
}
|
|
1881
1821
|
async function resolveShadowProjectContext(cwd, options, deps) {
|
|
1882
1822
|
const pkg = await readDeployPackageJson(cwd).catch(() => null);
|
|
1883
1823
|
const saved = pkg ? getSavedForgewayMetadata(pkg) : {};
|
|
@@ -1901,37 +1841,35 @@ async function resolveShadowProjectContext(cwd, options, deps) {
|
|
|
1901
1841
|
name: options.restaurantName ?? grant.restaurantName,
|
|
1902
1842
|
city: options.city ?? grant.city
|
|
1903
1843
|
};
|
|
1844
|
+
const shadowContext = {
|
|
1845
|
+
projectDir: cwd,
|
|
1846
|
+
platformApiUrl,
|
|
1847
|
+
authKind: "shadow-grant",
|
|
1848
|
+
accessToken: grant.accessToken,
|
|
1849
|
+
refreshToken: grant.refreshToken,
|
|
1850
|
+
user: grant.user,
|
|
1851
|
+
ossHost: platformApiUrl,
|
|
1852
|
+
placeId: grant.placeId,
|
|
1853
|
+
restaurantName: restaurant.name,
|
|
1854
|
+
city: restaurant.city
|
|
1855
|
+
};
|
|
1856
|
+
const accountEmail = await resolveForgewayAccountEmail(options, grant, cwd, deps);
|
|
1857
|
+
const credentials = await resolveFormalAccountCredentials(shadowContext, grant, accountEmail, deps);
|
|
1904
1858
|
return {
|
|
1905
1859
|
context: {
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
ossHost: platformApiUrl
|
|
1912
|
-
placeId: grant.placeId,
|
|
1913
|
-
restaurantName: restaurant.name,
|
|
1914
|
-
city: restaurant.city
|
|
1860
|
+
...shadowContext,
|
|
1861
|
+
authKind: "formal-account",
|
|
1862
|
+
accessToken: credentials.accessToken,
|
|
1863
|
+
refreshToken: credentials.refreshToken,
|
|
1864
|
+
user: credentials.user,
|
|
1865
|
+
ossHost: platformApiUrl
|
|
1915
1866
|
},
|
|
1916
1867
|
restaurant
|
|
1917
1868
|
};
|
|
1918
1869
|
}
|
|
1919
1870
|
async function resolveProjectContext(cwd, options, deps) {
|
|
1920
|
-
const adminContext = await resolveAdminProjectContext(cwd, options, deps);
|
|
1921
|
-
if (adminContext) return { context: adminContext };
|
|
1922
1871
|
return await resolveShadowProjectContext(cwd, options, deps);
|
|
1923
1872
|
}
|
|
1924
|
-
function unwrapProjectPayload(payload) {
|
|
1925
|
-
if (isRecord(payload) && "project" in payload) {
|
|
1926
|
-
if (isForgewayProject(payload.project)) return payload.project;
|
|
1927
|
-
throw new Error("Forgeway project response did not include a project");
|
|
1928
|
-
}
|
|
1929
|
-
if (isForgewayProject(payload)) return payload;
|
|
1930
|
-
throw new Error("Forgeway project response did not include a project");
|
|
1931
|
-
}
|
|
1932
|
-
function isForgewayProject(value) {
|
|
1933
|
-
return isRecord(value) && typeof value.id === "string" && typeof value.name === "string" && typeof value.appkey === "string" && typeof value.region === "string";
|
|
1934
|
-
}
|
|
1935
1873
|
function isRecord(value) {
|
|
1936
1874
|
return typeof value === "object" && value !== null;
|
|
1937
1875
|
}
|
|
@@ -2038,20 +1976,6 @@ async function createShadowGrant(options) {
|
|
|
2038
1976
|
await (options.deps.writeShadowGrant ?? writeForgewayShadowGrant)(grant, options.cwd);
|
|
2039
1977
|
return grant;
|
|
2040
1978
|
}
|
|
2041
|
-
async function listOrganizations(context, deps) {
|
|
2042
|
-
const payload = await platformFetch("/organizations/v1", context, deps);
|
|
2043
|
-
return Array.isArray(payload) ? payload : payload.organizations ?? [];
|
|
2044
|
-
}
|
|
2045
|
-
async function listProjects(orgId, context, deps) {
|
|
2046
|
-
const payload = await platformFetch(`/organizations/v1/${encodeURIComponent(orgId)}/projects`, context, deps);
|
|
2047
|
-
return Array.isArray(payload) ? payload : payload.projects ?? [];
|
|
2048
|
-
}
|
|
2049
|
-
async function fetchProjectApiKey(projectId, context, deps) {
|
|
2050
|
-
const payload = await platformFetch(`/projects/v1/${encodeURIComponent(projectId)}/access-api-key`, context, deps);
|
|
2051
|
-
const apiKey = payload.access_api_key ?? payload.apiKey;
|
|
2052
|
-
if (!apiKey) throw new Error("Forgeway project API key response was empty.");
|
|
2053
|
-
return apiKey;
|
|
2054
|
-
}
|
|
2055
1979
|
async function ossFetch(context, path, deps, options = {}) {
|
|
2056
1980
|
const request = async (token) => await forgewayRequest(`${context.ossHost.replace(TRAILING_SLASH_PATTERN, "")}${path}`, {
|
|
2057
1981
|
...options,
|
|
@@ -2061,10 +1985,10 @@ async function ossFetch(context, path, deps, options = {}) {
|
|
|
2061
1985
|
...options.headers
|
|
2062
1986
|
}
|
|
2063
1987
|
}, deps);
|
|
2064
|
-
const token = context.
|
|
1988
|
+
const token = context.accessToken;
|
|
2065
1989
|
if (!token) throw new Error("Forgeway deploy context is missing an authorization token.");
|
|
2066
1990
|
let response = await request(token);
|
|
2067
|
-
if (response.status === 401
|
|
1991
|
+
if (response.status === 401) response = await request(context.authKind === "formal-account" ? await refreshFormalAccessToken(context, deps) : await refreshShadowAccessToken(context, deps));
|
|
2068
1992
|
if (!response.ok) throw new ForgewayApiError(await parseErrorResponse(response), response.status);
|
|
2069
1993
|
return await response.json();
|
|
2070
1994
|
}
|
|
@@ -2357,11 +2281,14 @@ async function deploySiteProject(options) {
|
|
|
2357
2281
|
if (localFiles.length === 0) throw new Error("No deployable files found in the source directory.");
|
|
2358
2282
|
const createResult = await ossFetch(options.context, `/api/deployments/sites/${encodeURIComponent(options.siteId)}/deploy`, options.deps, {
|
|
2359
2283
|
method: "POST",
|
|
2360
|
-
body: JSON.stringify({
|
|
2361
|
-
|
|
2362
|
-
sha,
|
|
2363
|
-
|
|
2364
|
-
|
|
2284
|
+
body: JSON.stringify({
|
|
2285
|
+
dinewayAdminBootstrap: true,
|
|
2286
|
+
files: localFiles.map(({ path: relativePath, sha, size }) => ({
|
|
2287
|
+
path: relativePath,
|
|
2288
|
+
sha,
|
|
2289
|
+
size
|
|
2290
|
+
}))
|
|
2291
|
+
})
|
|
2365
2292
|
});
|
|
2366
2293
|
const localFileByPath = new Map(localFiles.map((file) => [file.path, file]));
|
|
2367
2294
|
await runWithConcurrency(createResult.files.filter((file) => !file.uploadedAt), DIRECT_UPLOAD_CONCURRENCY, async (manifestFile) => {
|
|
@@ -2375,9 +2302,21 @@ async function deploySiteProject(options) {
|
|
|
2375
2302
|
return {
|
|
2376
2303
|
deploymentId: createResult.id,
|
|
2377
2304
|
...result,
|
|
2378
|
-
site: createResult.site
|
|
2305
|
+
site: createResult.site,
|
|
2306
|
+
dinewayAdminBootstrap: createResult.dinewayAdminBootstrap
|
|
2379
2307
|
};
|
|
2380
2308
|
}
|
|
2309
|
+
function formatDinewayAdminBootstrapMessage(bootstrap, siteUrl) {
|
|
2310
|
+
if (!bootstrap) return "";
|
|
2311
|
+
if (bootstrap.status === "already_issued") return `Dineway admin bootstrap: ${bootstrap.message}`;
|
|
2312
|
+
return [
|
|
2313
|
+
"Dineway admin bootstrap credentials were issued. Forgeway will not print these again.",
|
|
2314
|
+
`Admin email: ${bootstrap.adminEmail}`,
|
|
2315
|
+
`Setup link (expires ${bootstrap.setupTokenExpiresAt}): ${bootstrap.setupUrl}`,
|
|
2316
|
+
`Admin API token: ${bootstrap.apiToken}`,
|
|
2317
|
+
`CLI example: DINEWAY_TOKEN=${bootstrap.apiToken} dineway whoami --url ${siteUrl}`
|
|
2318
|
+
].join("\n");
|
|
2319
|
+
}
|
|
2381
2320
|
async function deployForgeway(cwd, options, deps = {}) {
|
|
2382
2321
|
if (options.dryRun) return { message: "[dry-run] Would resolve Forgeway project, create/reuse site, bind database, initialize Dineway, upload files, and start deployment." };
|
|
2383
2322
|
const sourceDir = resolve(cwd);
|
|
@@ -2414,9 +2353,11 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
2414
2353
|
deps
|
|
2415
2354
|
});
|
|
2416
2355
|
const url = deployment.liveUrl ?? `https://${site.domain}`;
|
|
2356
|
+
const bootstrapMessage = formatDinewayAdminBootstrapMessage(deployment.dinewayAdminBootstrap, url);
|
|
2357
|
+
const statusMessage = deployment.isReady ? `Deploy complete: ${url}` : `Deploy started for ${site.domain}. Check Forgeway for build status.`;
|
|
2417
2358
|
return {
|
|
2418
2359
|
url,
|
|
2419
|
-
message:
|
|
2360
|
+
message: bootstrapMessage ? `${statusMessage}\n\n${bootstrapMessage}` : statusMessage
|
|
2420
2361
|
};
|
|
2421
2362
|
}
|
|
2422
2363
|
const forgewayTarget = {
|
|
@@ -2948,6 +2889,11 @@ const deployCommand = defineCommand({
|
|
|
2948
2889
|
description: "Forgeway deployment site ID or slug",
|
|
2949
2890
|
required: false
|
|
2950
2891
|
},
|
|
2892
|
+
email: {
|
|
2893
|
+
type: "string",
|
|
2894
|
+
description: "Forgeway account email for shadow-user upgrade",
|
|
2895
|
+
required: false
|
|
2896
|
+
},
|
|
2951
2897
|
"restaurant-name": {
|
|
2952
2898
|
type: "string",
|
|
2953
2899
|
description: "Restaurant name for first Forgeway site creation",
|
|
@@ -2978,6 +2924,7 @@ const deployCommand = defineCommand({
|
|
|
2978
2924
|
yes: args.yes,
|
|
2979
2925
|
dryRun: args["dry-run"],
|
|
2980
2926
|
site: args.site,
|
|
2927
|
+
email: args.email,
|
|
2981
2928
|
restaurantName: args["restaurant-name"],
|
|
2982
2929
|
city: args.city,
|
|
2983
2930
|
database: args.database,
|
package/dist/client/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-
|
|
1
|
+
import { a as tokenInterceptor, i as devBypassInterceptor, n as createTransport, r as csrfInterceptor, t as Interceptor } from "../transport-qeWznEPc.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/client/portable-text.d.ts
|
|
4
4
|
/**
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as tokenInterceptor, c as markdownToPortableText, i as refreshInterceptor, l as portableTextToMarkdown, n as csrfInterceptor, o as convertDataForRead, r as devBypassInterceptor, s as convertDataForWrite, t as createTransport } from "../transport-
|
|
1
|
+
import { a as tokenInterceptor, c as markdownToPortableText, i as refreshInterceptor, l as portableTextToMarkdown, n as csrfInterceptor, o as convertDataForRead, r as devBypassInterceptor, s as convertDataForWrite, t as createTransport } from "../transport-B7kO-4ee.mjs";
|
|
2
2
|
import mime from "mime/lite";
|
|
3
3
|
|
|
4
4
|
//#region src/client/index.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-
|
|
2
|
-
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-
|
|
1
|
+
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-Jsxs587i.mjs";
|
|
2
|
+
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-DuBQk6Mp.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/context.ts
|
|
5
5
|
async function handleContextEntryList(db, input = {}) {
|
|
@@ -5,10 +5,10 @@ import { n as decodeCursor, r as encodeCursor } from "./types-D1DjBFA9.mjs";
|
|
|
5
5
|
import { t as MediaRepository } from "./media-Cg4zc9fq.mjs";
|
|
6
6
|
import { t as UserRepository } from "./user-2aI21yV1.mjs";
|
|
7
7
|
import { t as OptionsRepository } from "./options-BF11H_FD.mjs";
|
|
8
|
-
import { t as withTransaction } from "./transaction-
|
|
9
|
-
import { t as SeoRepository } from "./seo-
|
|
10
|
-
import { a as validateExternalUrl, i as stripCredentialHeaders, t as SsrfError } from "./ssrf-
|
|
11
|
-
import { t as CronAccessImpl } from "./cron-
|
|
8
|
+
import { t as withTransaction } from "./transaction-D0FOsb3X.mjs";
|
|
9
|
+
import { t as SeoRepository } from "./seo-BPb_reaG.mjs";
|
|
10
|
+
import { a as validateExternalUrl, i as stripCredentialHeaders, t as SsrfError } from "./ssrf-KAIQS48_.mjs";
|
|
11
|
+
import { t as CronAccessImpl } from "./cron-D7FDsRu-.mjs";
|
|
12
12
|
import { sql } from "kysely";
|
|
13
13
|
import { ulid } from "ulidx";
|
|
14
14
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-
|
|
1
|
+
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-CpcTzKpF.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/api/context-route-helpers.ts
|
|
4
4
|
function resolveContextRouteActor(locals) {
|
|
@@ -2,7 +2,7 @@ import { t as validateIdentifier } from "./validate-VPnKoIzW.mjs";
|
|
|
2
2
|
import { t as ContentRepository } from "./content-DvpMad_N.mjs";
|
|
3
3
|
import { t as MediaRepository } from "./media-Cg4zc9fq.mjs";
|
|
4
4
|
import { t as UserRepository } from "./user-2aI21yV1.mjs";
|
|
5
|
-
import { t as ReviewRequestRepository } from "./review-requests-
|
|
5
|
+
import { t as ReviewRequestRepository } from "./review-requests-CTUU_RJm.mjs";
|
|
6
6
|
import { sql } from "kysely";
|
|
7
7
|
|
|
8
8
|
//#region src/api/handlers/dashboard.ts
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import { a as SqliteConfig, c as sqlite, i as PostgresConfig, n as DatabaseDialectType, o as libsql, r as LibsqlConfig, s as postgres, t as DatabaseDescriptor } from "../adapters-
|
|
3
|
-
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-
|
|
1
|
+
import "../types-B1NksXAb.mjs";
|
|
2
|
+
import { a as SqliteConfig, c as sqlite, i as PostgresConfig, n as DatabaseDialectType, o as libsql, r as LibsqlConfig, s as postgres, t as DatabaseDescriptor } from "../adapters-kZjS7plb.mjs";
|
|
3
|
+
import { i as runMigrations, n as getMigrationStatus, r as rollbackMigration, t as MigrationStatus } from "../runner-pAnQS6iI.mjs";
|
|
4
4
|
export { type DatabaseDescriptor, type DatabaseDialectType, type LibsqlConfig, type MigrationStatus, type PostgresConfig, type SqliteConfig, getMigrationStatus, libsql, postgres, rollbackMigration, runMigrations, sqlite };
|
package/dist/db/libsql.d.mts
CHANGED
package/dist/db/postgres.d.mts
CHANGED
package/dist/db/sqlite.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as withTransaction } from "./transaction-
|
|
2
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
3
|
-
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-
|
|
4
|
-
import { o as lookupOAuthClient } from "./oauth-clients-
|
|
5
|
-
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-
|
|
1
|
+
import { t as withTransaction } from "./transaction-D0FOsb3X.mjs";
|
|
2
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-BbZbIEZp.mjs";
|
|
3
|
+
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-L0o9Bd7v.mjs";
|
|
4
|
+
import { o as lookupOAuthClient } from "./oauth-clients-BMs_bmoz.mjs";
|
|
5
|
+
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-DdcI8ZVL.mjs";
|
|
6
6
|
import { clampScopes } from "@dineway-ai/auth";
|
|
7
7
|
import { generateCodeVerifier } from "arctic";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-
|
|
2
|
-
import { n as HitlRequestService } from "./site-context-
|
|
1
|
+
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-BbZbIEZp.mjs";
|
|
2
|
+
import { n as HitlRequestService } from "./site-context-DuBQk6Mp.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/hitl-requests.ts
|
|
5
5
|
const HITL_NOT_FOUND_RE = /not found/i;
|