@cosmicdrift/kumiko-bundled-features 0.369.0 → 0.370.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-security/constants.d.ts +4 -0
- package/dist/account-security/constants.js +5 -0
- package/dist/account-security/feature.d.ts +14 -0
- package/dist/account-security/feature.js +62 -0
- package/dist/account-security/i18n.d.ts +6 -0
- package/dist/account-security/i18n.js +6 -0
- package/dist/account-security/index.d.ts +3 -0
- package/dist/account-security/index.js +3 -0
- package/dist/admin-shell/feature.d.ts +1 -1
- package/dist/admin-shell/index.d.ts +4 -4
- package/dist/admin-shell/overview-panels.d.ts +1 -1
- package/dist/admin-shell/web/index.d.ts +1 -1
- package/dist/agent-tools/agent-manifest.d.ts +1 -1
- package/dist/agent-tools/index.d.ts +8 -8
- package/dist/agent-tools/manifest-deny-qns.d.ts +1 -1
- package/dist/agent-tools/tool-catalog.d.ts +1 -1
- package/dist/agent-tools/tool-dispatch.d.ts +1 -1
- package/dist/audit/handlers/resolve-audit-tenant.d.ts +1 -1
- package/dist/audit/index.d.ts +3 -3
- package/dist/audit/web/index.d.ts +1 -1
- package/dist/auth-email-password/bootstrap.d.ts +1 -1
- package/dist/auth-email-password/feature.d.ts +7 -6
- package/dist/auth-email-password/feature.js +3 -1
- package/dist/auth-email-password/handlers/confirm-token-flow.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-accept-with-login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/invite-create.write.d.ts +2 -2
- package/dist/auth-email-password/handlers/invite-signup-complete.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/login.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-account-unlock.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-email-verification.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/request-password-reset.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-confirm.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/signup-request.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/switch-tenant-mfa-gate.write.d.ts +1 -1
- package/dist/auth-email-password/handlers/token-request-handler.d.ts +2 -2
- package/dist/auth-email-password/index.d.ts +13 -13
- package/dist/auth-email-password/lockout-store.d.ts +1 -1
- package/dist/auth-email-password/magic-link-mail.d.ts +1 -1
- package/dist/auth-email-password/seeding.d.ts +3 -3
- package/dist/auth-email-password/signed-token.d.ts +1 -1
- package/dist/auth-email-password/signup-token-store.d.ts +1 -1
- package/dist/auth-email-password/testing.d.ts +1 -1
- package/dist/auth-email-password/web/auth-gate.d.ts +1 -1
- package/dist/auth-email-password/web/client-plugin.d.ts +2 -2
- package/dist/auth-email-password/web/index.d.ts +42 -42
- package/dist/auth-email-password/web/session-bootstrap-error.d.ts +1 -1
- package/dist/auth-email-password/web/session.d.ts +1 -1
- package/dist/auth-email-password/web/signup-complete-screen.d.ts +1 -1
- package/dist/auth-foundation/feature.d.ts +2 -6
- package/dist/auth-foundation/feature.js +0 -2
- package/dist/auth-foundation/index.d.ts +3 -3
- package/dist/auth-foundation/index.js +1 -1
- package/dist/auth-foundation/resolve-anonymous-access.d.ts +1 -1
- package/dist/auth-mfa/env.d.ts +13 -0
- package/dist/auth-mfa/env.js +24 -0
- package/dist/auth-mfa/errors.d.ts +1 -1
- package/dist/auth-mfa/feature-exports.d.ts +12 -0
- package/dist/auth-mfa/feature-exports.js +72 -0
- package/dist/auth-mfa/feature.d.ts +6 -12
- package/dist/auth-mfa/feature.js +53 -70
- package/dist/auth-mfa/handlers/reencrypt.job.d.ts +1 -1
- package/dist/auth-mfa/index.d.ts +12 -9
- package/dist/auth-mfa/index.js +4 -2
- package/dist/auth-mfa/mfa-challenge-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-preauth-setup-token.d.ts +1 -1
- package/dist/auth-mfa/mfa-status-checker.d.ts +1 -1
- package/dist/auth-mfa/mfa-verify-attempts.d.ts +1 -1
- package/dist/auth-mfa/testing.d.ts +1 -1
- package/dist/auth-mfa/token-secrets.d.ts +7 -0
- package/dist/auth-mfa/token-secrets.js +13 -0
- package/dist/auth-mfa/verify-factor.d.ts +1 -1
- package/dist/auth-mfa/web/index.d.ts +15 -15
- package/dist/auth-mfa/web/mfa-client.d.ts +1 -1
- package/dist/auth-mfa-user-data/index.d.ts +0 -4
- package/dist/auth-mfa-user-data/index.js +0 -2
- package/dist/billing-foundation/checkout-core.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/confirmation-mail.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/consent-gate.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/consent-text.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/issue-confirmation.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-consent.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/register-termination.d.ts +1 -1
- package/dist/billing-foundation/consumer-protection/termination-mail.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-notify.d.ts +5 -5
- package/dist/billing-foundation/consumer-protection/termination-pages.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-record.d.ts +3 -3
- package/dist/billing-foundation/consumer-protection/termination-request.d.ts +2 -2
- package/dist/billing-foundation/consumer-protection/termination-texts.d.ts +2 -2
- package/dist/billing-foundation/feature.d.ts +1 -3
- package/dist/billing-foundation/feature.js +0 -2
- package/dist/billing-foundation/handlers/billing-plans.query.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-checkout-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/create-portal-session.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/start-plan-checkout.write.d.ts +1 -1
- package/dist/billing-foundation/handlers/switch-plan.write.d.ts +1 -1
- package/dist/billing-foundation/index.d.ts +16 -16
- package/dist/billing-foundation/index.js +1 -1
- package/dist/billing-foundation/plan-catalog.d.ts +1 -1
- package/dist/billing-foundation/subscription-tier-sync.d.ts +3 -1
- package/dist/billing-foundation/subscription-tier-sync.js +3 -2
- package/dist/billing-foundation/types.d.ts +3 -3
- package/dist/billing-foundation/validate-options.d.ts +1 -1
- package/dist/billing-foundation/web/checkout-consent-dialog.d.ts +1 -1
- package/dist/billing-foundation/web/index.d.ts +6 -6
- package/dist/cap-counter/calendar-cap-usage-reservation.d.ts +4 -4
- package/dist/cap-counter/cap-reservation.d.ts +1 -1
- package/dist/cap-counter/enforce-cap.d.ts +1 -1
- package/dist/cap-counter/feature.d.ts +0 -4
- package/dist/cap-counter/feature.js +0 -2
- package/dist/cap-counter/index.d.ts +13 -13
- package/dist/cap-counter/index.js +1 -1
- package/dist/cap-counter/value-cap-guard.d.ts +1 -1
- package/dist/cap-counter/with-cap-enforcement.d.ts +1 -1
- package/dist/cap-overview/feature.d.ts +1 -1
- package/dist/cap-overview/handlers/caps-usage.query.d.ts +1 -1
- package/dist/cap-overview/handlers/tenant-caps-list.query.d.ts +1 -1
- package/dist/cap-overview/index.d.ts +6 -6
- package/dist/cap-overview/screens.d.ts +1 -1
- package/dist/cap-overview/types.d.ts +1 -1
- package/dist/cap-overview/usage-math.d.ts +1 -1
- package/dist/cap-overview/web/cap-usage-bar.d.ts +1 -1
- package/dist/cap-overview/web/index.d.ts +4 -4
- package/dist/channel-discord/discord-channel.d.ts +1 -1
- package/dist/channel-discord/feature.d.ts +1 -1
- package/dist/channel-discord/index.d.ts +2 -2
- package/dist/channel-email/email-channel.d.ts +2 -2
- package/dist/channel-email/env.d.ts +14 -0
- package/dist/channel-email/env.js +27 -0
- package/dist/channel-email/feature.d.ts +14 -3
- package/dist/channel-email/feature.js +5 -1
- package/dist/channel-email/index.d.ts +6 -5
- package/dist/channel-email/index.js +1 -0
- package/dist/channel-email/pii-guard.d.ts +1 -1
- package/dist/channel-email/smtp-transport.d.ts +1 -1
- package/dist/channel-email/types.d.ts +1 -1
- package/dist/channel-in-app/in-app-channel.d.ts +1 -1
- package/dist/channel-in-app/index.d.ts +4 -4
- package/dist/channel-push/feature.d.ts +1 -1
- package/dist/channel-push/index.d.ts +3 -3
- package/dist/channel-push/push-channel.d.ts +2 -2
- package/dist/channel-slack/feature.d.ts +1 -1
- package/dist/channel-slack/index.d.ts +2 -2
- package/dist/channel-slack/slack-channel.d.ts +1 -1
- package/dist/channel-teams/feature.d.ts +1 -1
- package/dist/channel-teams/index.d.ts +2 -2
- package/dist/channel-teams/teams-channel.d.ts +1 -1
- package/dist/channel-telegram/feature.d.ts +1 -1
- package/dist/channel-telegram/index.d.ts +2 -2
- package/dist/channel-telegram/telegram-channel.d.ts +1 -1
- package/dist/compliance-profiles/feature.d.ts +1 -1
- package/dist/compliance-profiles/index.d.ts +3 -3
- package/dist/compliance-profiles/web/index.d.ts +2 -2
- package/dist/compliance-profiles-ops/index.d.ts +0 -8
- package/dist/compliance-profiles-ops/index.js +0 -2
- package/dist/config/feature.d.ts +1 -1
- package/dist/config/handlers/reencrypt.job.d.ts +1 -1
- package/dist/config/index.d.ts +8 -8
- package/dist/config/web/client-plugin.d.ts +1 -1
- package/dist/config/web/index.d.ts +2 -2
- package/dist/crypto-shredding/env/index.d.ts +21 -0
- package/dist/crypto-shredding/env/index.js +78 -0
- package/dist/crypto-shredding/feature.d.ts +17 -2
- package/dist/crypto-shredding/feature.js +5 -1
- package/dist/crypto-shredding/index.d.ts +4 -3
- package/dist/crypto-shredding/index.js +1 -0
- package/dist/custom-fields/feature.d.ts +0 -17
- package/dist/custom-fields/feature.js +0 -2
- package/dist/custom-fields/index.d.ts +10 -10
- package/dist/custom-fields/index.js +1 -1
- package/dist/custom-fields/lib/define-or-resurrect.d.ts +2 -2
- package/dist/custom-fields/lib/field-access.d.ts +1 -1
- package/dist/custom-fields/lib/field-definition-row.d.ts +1 -1
- package/dist/custom-fields/lib/quota.d.ts +1 -1
- package/dist/custom-fields/web/index.d.ts +3 -3
- package/dist/data-retention/_internal/parse-override.d.ts +1 -1
- package/dist/data-retention/feature.d.ts +7 -7
- package/dist/data-retention/handlers/policy-for.query.d.ts +1 -1
- package/dist/data-retention/index.d.ts +3 -3
- package/dist/data-retention/resolve-for-tenant.d.ts +2 -2
- package/dist/data-retention/resolve-tenant-preset.d.ts +1 -1
- package/dist/data-retention/resolver.d.ts +1 -1
- package/dist/data-retention/run-retention-cleanup.d.ts +2 -2
- package/dist/delivery/attachment-ref.d.ts +1 -1
- package/dist/delivery/attempt-log.d.ts +1 -1
- package/dist/delivery/channel-context.d.ts +2 -2
- package/dist/delivery/chat-webhook-channel.d.ts +2 -2
- package/dist/delivery/constants.d.ts +1 -1
- package/dist/delivery/delivery-service.d.ts +2 -2
- package/dist/delivery/feature.js +2 -0
- package/dist/delivery/handlers/log.query.d.ts +1 -1
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.d.ts +5 -0
- package/dist/delivery/handlers/unsubscribe-page-chrome.query.js +44 -0
- package/dist/delivery/index.d.ts +20 -20
- package/dist/delivery/notify-factory.d.ts +1 -1
- package/dist/delivery/public-names.d.ts +1 -0
- package/dist/delivery/public-names.js +1 -0
- package/dist/delivery/testing.d.ts +3 -3
- package/dist/delivery/types.d.ts +3 -3
- package/dist/delivery/unsubscribe-link.d.ts +1 -1
- package/dist/delivery/unsubscribe-page-strings.d.ts +4 -0
- package/dist/delivery/unsubscribe-page-strings.js +4 -0
- package/dist/delivery/unsubscribe-page.d.ts +27 -0
- package/dist/delivery/unsubscribe-page.js +192 -0
- package/dist/delivery/unsubscribe.d.ts +11 -3
- package/dist/delivery/unsubscribe.js +146 -64
- package/dist/delivery/web/index.d.ts +2 -2
- package/dist/derivatives-sharp/feature.d.ts +0 -4
- package/dist/derivatives-sharp/feature.js +0 -2
- package/dist/derivatives-sharp/index.d.ts +2 -2
- package/dist/derivatives-sharp/index.js +1 -1
- package/dist/document-ingest-foundation/feature.d.ts +0 -7
- package/dist/document-ingest-foundation/feature.js +0 -2
- package/dist/document-ingest-foundation/index.d.ts +7 -7
- package/dist/document-ingest-foundation/index.js +1 -1
- package/dist/document-ingest-foundation/pages.d.ts +1 -1
- package/dist/document-ingest-foundation/providers.d.ts +1 -1
- package/dist/document-ingest-foundation/write-document-extract.d.ts +1 -1
- package/dist/feature-toggles/compose-tier-resolver.d.ts +1 -1
- package/dist/feature-toggles/feature.d.ts +5 -5
- package/dist/feature-toggles/handlers/set.write.d.ts +1 -1
- package/dist/feature-toggles/index.d.ts +3 -3
- package/dist/feature-toggles/toggle-sync-signal.d.ts +1 -1
- package/dist/feature-toggles/web/index.d.ts +1 -1
- package/dist/file-derivatives/feature.d.ts +0 -2
- package/dist/file-derivatives/feature.js +0 -2
- package/dist/file-derivatives/index.d.ts +4 -4
- package/dist/file-derivatives/index.js +1 -1
- package/dist/file-foundation/feature.d.ts +0 -6
- package/dist/file-foundation/feature.js +0 -2
- package/dist/file-foundation/index.d.ts +2 -2
- package/dist/file-foundation/index.js +1 -1
- package/dist/file-provider-inmemory/feature.d.ts +0 -4
- package/dist/file-provider-inmemory/feature.js +0 -2
- package/dist/file-provider-inmemory/index.d.ts +1 -1
- package/dist/file-provider-inmemory/index.js +1 -1
- package/dist/file-provider-s3/env-feature.d.ts +12 -2
- package/dist/file-provider-s3/env-feature.js +9 -6
- package/dist/file-provider-s3/env-schema.d.ts +38 -0
- package/dist/file-provider-s3/env-schema.js +51 -0
- package/dist/file-provider-s3/feature.d.ts +1 -14
- package/dist/file-provider-s3/feature.js +0 -2
- package/dist/file-provider-s3/index.d.ts +2 -1
- package/dist/file-provider-s3/index.js +2 -1
- package/dist/file-provider-s3/lib/env-helper.d.ts +1 -1
- package/dist/file-provider-s3/lib/index.d.ts +3 -3
- package/dist/files/index.d.ts +1 -1
- package/dist/files-tenant-data/index.d.ts +2 -2
- package/dist/folders/feature.d.ts +0 -4
- package/dist/folders/feature.js +0 -2
- package/dist/folders/index.d.ts +7 -7
- package/dist/folders/index.js +1 -1
- package/dist/folders/web/folder-manager.d.ts +1 -1
- package/dist/folders/web/index.d.ts +5 -5
- package/dist/folders-user-data/index.d.ts +0 -4
- package/dist/folders-user-data/index.js +0 -2
- package/dist/form-draft/db/queries/cleanup.d.ts +1 -1
- package/dist/form-draft/feature.d.ts +0 -4
- package/dist/form-draft/feature.js +0 -2
- package/dist/form-draft/handlers/cleanup.job.d.ts +1 -1
- package/dist/form-draft/handlers/get.query.d.ts +1 -1
- package/dist/form-draft/index.d.ts +10 -10
- package/dist/form-draft/index.js +1 -1
- package/dist/form-draft/lookup.d.ts +1 -1
- package/dist/form-draft/release-file-refs.d.ts +1 -1
- package/dist/form-draft-user-data/index.d.ts +0 -4
- package/dist/form-draft-user-data/index.js +0 -2
- package/dist/foundation-shared/build-info-env.d.ts +7 -0
- package/dist/foundation-shared/build-info-env.js +15 -0
- package/dist/foundation-shared/demo-admin-env.d.ts +12 -0
- package/dist/foundation-shared/demo-admin-env.js +21 -0
- package/dist/foundation-shared/index.d.ts +5 -3
- package/dist/foundation-shared/index.js +2 -0
- package/dist/host-routing/constants.d.ts +8 -0
- package/dist/host-routing/constants.js +19 -0
- package/dist/host-routing/dispatch.d.ts +24 -0
- package/dist/host-routing/dispatch.js +102 -0
- package/dist/host-routing/feature.d.ts +3 -0
- package/dist/host-routing/feature.js +102 -0
- package/dist/host-routing/host.d.ts +14 -0
- package/dist/host-routing/host.js +37 -0
- package/dist/host-routing/index.d.ts +5 -0
- package/dist/host-routing/index.js +4 -0
- package/dist/host-routing/options.d.ts +27 -0
- package/dist/host-routing/options.js +1 -0
- package/dist/host-routing/validate-options.d.ts +2 -0
- package/dist/host-routing/validate-options.js +29 -0
- package/dist/inbound-mail-foundation/connect-routes.d.ts +2 -2
- package/dist/inbound-mail-foundation/feature.d.ts +0 -4
- package/dist/inbound-mail-foundation/feature.js +0 -2
- package/dist/inbound-mail-foundation/handlers/account-state.d.ts +1 -1
- package/dist/inbound-mail-foundation/index.d.ts +12 -12
- package/dist/inbound-mail-foundation/index.js +1 -1
- package/dist/inbound-mail-foundation/oauth-access-token.d.ts +1 -1
- package/dist/inbound-mail-foundation/provider-factory.d.ts +1 -1
- package/dist/inbound-mail-foundation/types.d.ts +1 -1
- package/dist/inbound-mail-foundation/watch-supervisor.d.ts +2 -2
- package/dist/inbound-provider-imap/feature.d.ts +1 -5
- package/dist/inbound-provider-imap/feature.js +0 -2
- package/dist/inbound-provider-imap/imap-client.d.ts +1 -1
- package/dist/inbound-provider-imap/index.d.ts +3 -3
- package/dist/inbound-provider-imap/index.js +1 -1
- package/dist/inbound-provider-inmemory/feature.d.ts +0 -4
- package/dist/inbound-provider-inmemory/feature.js +0 -2
- package/dist/inbound-provider-inmemory/index.d.ts +1 -1
- package/dist/inbound-provider-inmemory/index.js +1 -1
- package/dist/jobs/handlers/tenant-runs.query.d.ts +1 -1
- package/dist/jobs/index.d.ts +9 -9
- package/dist/jobs/web/index.d.ts +1 -1
- package/dist/ledger/feature.d.ts +0 -4
- package/dist/ledger/feature.js +0 -2
- package/dist/ledger/index.d.ts +10 -10
- package/dist/ledger/index.js +1 -1
- package/dist/ledger/recurring.d.ts +2 -2
- package/dist/ledger/reports.d.ts +2 -2
- package/dist/ledger/web/index.d.ts +3 -3
- package/dist/legal-pages/constants.d.ts +12 -0
- package/dist/legal-pages/constants.js +16 -0
- package/dist/legal-pages/feature.d.ts +6 -3
- package/dist/legal-pages/feature.js +5 -2
- package/dist/legal-pages/index.d.ts +5 -3
- package/dist/legal-pages/index.js +3 -1
- package/dist/legal-pages/layout.d.ts +10 -0
- package/dist/legal-pages/layout.js +32 -0
- package/dist/legal-pages/lib/boot-check.d.ts +1 -1
- package/dist/legal-pages/lib/validate-routes.d.ts +1 -1
- package/dist/legal-pages/markdown.d.ts +2 -2
- package/dist/legal-pages/seed.d.ts +12 -0
- package/dist/legal-pages/seed.js +38 -0
- package/dist/legal-pages/web/index.d.ts +1 -1
- package/dist/mail-foundation/feature.d.ts +0 -7
- package/dist/mail-foundation/feature.js +0 -2
- package/dist/mail-foundation/index.d.ts +1 -1
- package/dist/mail-foundation/index.js +1 -1
- package/dist/mail-transport-inmemory/feature.d.ts +0 -4
- package/dist/mail-transport-inmemory/feature.js +0 -2
- package/dist/mail-transport-inmemory/index.d.ts +1 -1
- package/dist/mail-transport-inmemory/index.js +1 -1
- package/dist/mail-transport-smtp/feature.d.ts +0 -16
- package/dist/mail-transport-smtp/feature.js +0 -2
- package/dist/mail-transport-smtp/index.d.ts +1 -1
- package/dist/mail-transport-smtp/index.js +1 -1
- package/dist/managed-pages/branding.d.ts +1 -1
- package/dist/managed-pages/feature.d.ts +1 -1
- package/dist/managed-pages/handlers/branding.query.d.ts +1 -1
- package/dist/managed-pages/index.d.ts +5 -5
- package/dist/managed-pages/web/index.d.ts +2 -2
- package/dist/metrics/compute.d.ts +2 -2
- package/dist/metrics/default-metrics.d.ts +9 -9
- package/dist/metrics/feature.d.ts +1 -1
- package/dist/metrics/filters.d.ts +1 -1
- package/dist/metrics/index.d.ts +5 -5
- package/dist/metrics/types.d.ts +1 -1
- package/dist/metrics/validate.d.ts +1 -1
- package/dist/metrics/window.d.ts +2 -2
- package/dist/notes-history/feature.d.ts +0 -4
- package/dist/notes-history/feature.js +0 -2
- package/dist/notes-history/handlers/add-note.write.d.ts +1 -1
- package/dist/notes-history/index.d.ts +6 -6
- package/dist/notes-history/index.js +1 -1
- package/dist/notes-history/web/index.d.ts +3 -3
- package/dist/notes-history-user-data/index.d.ts +1 -5
- package/dist/notes-history-user-data/index.js +0 -2
- package/dist/page-render/index.d.ts +7 -7
- package/dist/page-render/layout.d.ts +1 -1
- package/dist/page-render/web.d.ts +5 -5
- package/dist/personal-access-tokens/feature.d.ts +3 -3
- package/dist/personal-access-tokens/handlers/available-scopes.query.d.ts +1 -1
- package/dist/personal-access-tokens/i18n.d.ts +1 -1
- package/dist/personal-access-tokens/index.d.ts +13 -13
- package/dist/personal-access-tokens/resolver.d.ts +1 -1
- package/dist/personal-access-tokens/screens.d.ts +1 -1
- package/dist/presets/dsgvo-self-service.d.ts +3 -1
- package/dist/presets/dsgvo-self-service.js +2 -0
- package/dist/presets/index.d.ts +2 -2
- package/dist/presets/security-baseline.d.ts +2 -0
- package/dist/presets/security-baseline.js +2 -0
- package/dist/rate-limiting/index.d.ts +2 -2
- package/dist/readiness/feature.d.ts +0 -8
- package/dist/readiness/feature.js +0 -2
- package/dist/readiness/index.d.ts +3 -3
- package/dist/readiness/index.js +1 -1
- package/dist/renderer-foundation/api.d.ts +2 -2
- package/dist/renderer-foundation/constants.d.ts +2 -2
- package/dist/renderer-foundation/feature.d.ts +1 -1
- package/dist/renderer-foundation/index.d.ts +5 -5
- package/dist/renderer-foundation/types.d.ts +24 -2
- package/dist/renderer-pdf/feature.d.ts +1 -1
- package/dist/renderer-pdf/index.d.ts +2 -2
- package/dist/renderer-pdf/render-table-pdf.d.ts +1 -1
- package/dist/secrets/constants.d.ts +7 -0
- package/dist/secrets/constants.js +7 -0
- package/dist/secrets/db/queries/read.d.ts +1 -1
- package/dist/secrets/feature.d.ts +4 -3
- package/dist/secrets/feature.js +4 -2
- package/dist/secrets/handlers/delete.write.js +2 -2
- package/dist/secrets/handlers/rotate.job.d.ts +1 -1
- package/dist/secrets/handlers/set.write.js +2 -2
- package/dist/secrets/index.d.ts +7 -7
- package/dist/secrets/index.js +1 -1
- package/dist/secrets/secrets-context.d.ts +1 -1
- package/dist/seo/feature.d.ts +3 -3
- package/dist/seo/index.d.ts +6 -6
- package/dist/sessions/feature.d.ts +1 -1
- package/dist/sessions/index.d.ts +8 -8
- package/dist/sessions/session-callbacks.d.ts +1 -1
- package/dist/sessions/testing.d.ts +1 -1
- package/dist/shared/index.d.ts +31 -31
- package/dist/step-dispatcher/dispatch-payload.d.ts +2 -2
- package/dist/step-dispatcher/index.d.ts +3 -3
- package/dist/subscription-mollie/feature.d.ts +2 -2
- package/dist/subscription-mollie/index.d.ts +3 -3
- package/dist/subscription-mollie/verify-webhook.d.ts +1 -1
- package/dist/subscription-stripe/feature.d.ts +17 -1
- package/dist/subscription-stripe/feature.js +19 -1
- package/dist/subscription-stripe/index.d.ts +2 -2
- package/dist/subscription-stripe/index.js +1 -1
- package/dist/subscription-stripe/plugin-methods.d.ts +1 -1
- package/dist/subscription-stripe/verify-webhook.d.ts +1 -1
- package/dist/tags/feature.d.ts +0 -4
- package/dist/tags/feature.js +0 -2
- package/dist/tags/handlers/assign-tag.write.d.ts +1 -1
- package/dist/tags/handlers/remove-tag.write.d.ts +1 -1
- package/dist/tags/index.d.ts +11 -11
- package/dist/tags/index.js +1 -1
- package/dist/tags/web/index.d.ts +9 -9
- package/dist/template-resolver/api.d.ts +4 -4
- package/dist/template-resolver/constants.d.ts +1 -1
- package/dist/template-resolver/document-sanitizer.d.ts +1 -1
- package/dist/template-resolver/handlers/bundle-import.d.ts +3 -3
- package/dist/template-resolver/handlers/collection-shared.d.ts +2 -2
- package/dist/template-resolver/handlers/copy-locale.write.d.ts +1 -1
- package/dist/template-resolver/handlers/diff-to-system.query.d.ts +1 -1
- package/dist/template-resolver/handlers/find-by-id.query.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/import-bundle.write.d.ts +1 -1
- package/dist/template-resolver/handlers/layout-source.query.d.ts +3 -3
- package/dist/template-resolver/handlers/override-diff.d.ts +2 -2
- package/dist/template-resolver/handlers/overview.query.d.ts +3 -3
- package/dist/template-resolver/handlers/preview.query.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-link-pdf.write.d.ts +1 -1
- package/dist/template-resolver/handlers/resource-upload.write.d.ts +1 -1
- package/dist/template-resolver/handlers/send-test.write.d.ts +1 -1
- package/dist/template-resolver/handlers/shared.d.ts +1 -1
- package/dist/template-resolver/handlers/template-gates.d.ts +4 -4
- package/dist/template-resolver/handlers/template-write.d.ts +4 -4
- package/dist/template-resolver/handlers/tenant-overrides.query.d.ts +1 -1
- package/dist/template-resolver/handlers/toggle-status.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-system.write.d.ts +1 -1
- package/dist/template-resolver/handlers/upsert-tenant.write.d.ts +1 -1
- package/dist/template-resolver/handlers/usage.query.d.ts +1 -1
- package/dist/template-resolver/handlers/validate.query.d.ts +3 -3
- package/dist/template-resolver/index.d.ts +25 -25
- package/dist/template-resolver/layout-appearance.d.ts +1 -1
- package/dist/template-resolver/layout-regions.d.ts +2 -2
- package/dist/template-resolver/linked-resources.d.ts +1 -1
- package/dist/template-resolver/preview-display-html.d.ts +1 -1
- package/dist/template-resolver/resource-image.d.ts +1 -1
- package/dist/template-resolver/seeding.d.ts +2 -2
- package/dist/template-resolver/store-template-resource.d.ts +1 -1
- package/dist/template-resolver/template-draft.d.ts +2 -2
- package/dist/template-resolver/template-meta.d.ts +2 -2
- package/dist/template-resolver/template-preview.d.ts +7 -6
- package/dist/template-resolver/template-preview.js +19 -12
- package/dist/template-resolver/template-resources.d.ts +1 -1
- package/dist/template-resolver/template-usage.d.ts +3 -1
- package/dist/template-resolver/template-usage.js +1 -0
- package/dist/template-resolver/template-validation.d.ts +1 -1
- package/dist/template-resolver/testing.d.ts +1 -1
- package/dist/template-resolver/user-content-table.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.d.ts +1 -1
- package/dist/template-resolver/web/document-editor-extensions.js +6 -2
- package/dist/template-resolver/web/document-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.d.ts +1 -1
- package/dist/template-resolver/web/document-tiptap-editor.js +13 -10
- package/dist/template-resolver/web/editor-handle.d.ts +1 -1
- package/dist/template-resolver/web/index.d.ts +7 -7
- package/dist/template-resolver/web/placeholder-line-editor-lazy.d.ts +2 -2
- package/dist/template-resolver/web/placeholder-line-editor.d.ts +1 -1
- package/dist/template-resolver-user-data/index.d.ts +0 -4
- package/dist/template-resolver-user-data/index.js +0 -2
- package/dist/tenant/feature.d.ts +1 -1
- package/dist/tenant/index.d.ts +10 -10
- package/dist/tenant/is-tenant-serving-public-content.d.ts +1 -1
- package/dist/tenant/testing.d.ts +1 -1
- package/dist/tenant/web/index.d.ts +3 -3
- package/dist/tenant-handover/feature.d.ts +1 -1
- package/dist/tenant-handover/index.d.ts +3 -3
- package/dist/tenant-handover/signup-handover-provider.d.ts +1 -1
- package/dist/tenant-lifecycle/feature.d.ts +2 -2
- package/dist/tenant-lifecycle/index.d.ts +3 -3
- package/dist/tenant-lifecycle/run-tenant-destroy.d.ts +1 -1
- package/dist/tenant-lifecycle/stages.d.ts +1 -1
- package/dist/tenant-lifecycle/testing.d.ts +1 -1
- package/dist/tenant-settings/feature.d.ts +1 -3
- package/dist/tenant-settings/feature.js +0 -2
- package/dist/tenant-settings/index.d.ts +4 -4
- package/dist/tenant-settings/index.js +1 -1
- package/dist/tier-engine/entity.d.ts +1 -1
- package/dist/tier-engine/feature.d.ts +2 -4
- package/dist/tier-engine/feature.js +0 -2
- package/dist/tier-engine/handlers/get-tenant-tier.query.d.ts +1 -1
- package/dist/tier-engine/i18n.d.ts +0 -2
- package/dist/tier-engine/i18n.js +4 -4
- package/dist/tier-engine/index.d.ts +8 -8
- package/dist/tier-engine/index.js +1 -1
- package/dist/tier-engine/tier-option-gate.d.ts +1 -1
- package/dist/tier-engine/tier-resolver.d.ts +1 -1
- package/dist/tier-engine/web/client-plugin.js +3 -2
- package/dist/tier-engine/web/index.d.ts +1 -1
- package/dist/user/index.d.ts +8 -8
- package/dist/user/invited-global-roles.d.ts +1 -1
- package/dist/user/principal-status.d.ts +1 -1
- package/dist/user/seeding.d.ts +1 -1
- package/dist/user/testing.d.ts +1 -1
- package/dist/user-data-rights/deletion-token.d.ts +1 -1
- package/dist/user-data-rights/feature.d.ts +5 -5
- package/dist/user-data-rights/handlers/request-deletion.write.d.ts +1 -1
- package/dist/user-data-rights/handlers/run-forget-cleanup.write.d.ts +3 -3
- package/dist/user-data-rights/index.d.ts +13 -13
- package/dist/user-data-rights/lib/default-mailers.d.ts +4 -4
- package/dist/user-data-rights/web/client-plugin.d.ts +1 -1
- package/dist/user-data-rights/web/index.d.ts +8 -8
- package/dist/user-data-rights-defaults/index.d.ts +11 -11
- package/dist/user-profile/index.d.ts +2 -2
- package/dist/user-profile/web/index.d.ts +2 -2
- package/dist/waitlist/constants.d.ts +9 -0
- package/dist/waitlist/constants.js +11 -0
- package/dist/waitlist/entity.d.ts +38 -6
- package/dist/waitlist/entity.js +4 -2
- package/dist/waitlist/entries-admin.d.ts +4 -0
- package/dist/waitlist/entries-admin.js +42 -0
- package/dist/waitlist/feature.d.ts +1 -1
- package/dist/waitlist/feature.js +16 -1
- package/dist/waitlist/handlers/export-purge.write.d.ts +12 -0
- package/dist/waitlist/handlers/export-purge.write.js +61 -0
- package/dist/waitlist/handlers/invite.write.d.ts +1 -1
- package/dist/waitlist/handlers/submit.write.d.ts +1 -1
- package/dist/waitlist/i18n.js +4 -0
- package/dist/waitlist/import.d.ts +24 -0
- package/dist/waitlist/import.js +51 -0
- package/dist/waitlist/index.d.ts +7 -5
- package/dist/waitlist/index.js +2 -0
- package/dist/waitlist/legacy-migrate.d.ts +27 -0
- package/dist/waitlist/legacy-migrate.js +173 -0
- package/dist/waitlist/lib.d.ts +2 -2
- package/dist/waitlist/link-on-signup.d.ts +3 -0
- package/dist/waitlist/link-on-signup.js +83 -0
- package/dist/waitlist/options.d.ts +11 -3
- package/dist/waitlist/payloads.d.ts +3 -0
- package/dist/waitlist/payloads.js +1 -0
- package/dist/workflow-runner/feature.d.ts +0 -4
- package/dist/workflow-runner/feature.js +0 -2
- package/dist/workflow-runner/index.d.ts +4 -4
- package/dist/workflow-runner/index.js +1 -1
- package/package.json +43 -27
- package/src/account-security/changes.json +8 -0
- package/src/auth-email-password/changes.json +6 -0
- package/src/auth-foundation/changes.json +8 -0
- package/src/auth-mfa/changes.json +6 -0
- package/src/auth-mfa-user-data/changes.json +10 -1
- package/src/billing-foundation/changes.json +8 -0
- package/src/cap-counter/changes.json +8 -0
- package/src/channel-email/changes.json +6 -0
- package/src/compliance-profiles-ops/changes.json +10 -0
- package/src/crypto-shredding/changes.json +6 -0
- package/src/custom-fields/changes.json +8 -0
- package/src/delivery/changes.json +6 -0
- package/src/derivatives-sharp/changes.json +8 -0
- package/src/document-ingest-foundation/changes.json +8 -0
- package/src/file-derivatives/changes.json +8 -0
- package/src/file-foundation/changes.json +8 -0
- package/src/file-provider-inmemory/changes.json +10 -1
- package/src/file-provider-s3/changes.json +22 -0
- package/src/folders/changes.json +8 -0
- package/src/folders-user-data/changes.json +10 -1
- package/src/form-draft/changes.json +8 -0
- package/src/form-draft-user-data/changes.json +10 -1
- package/src/foundation-shared/changes.json +8 -1
- package/src/host-routing/changes.json +8 -0
- package/src/inbound-mail-foundation/changes.json +8 -0
- package/src/inbound-provider-imap/changes.json +8 -0
- package/src/inbound-provider-inmemory/changes.json +10 -1
- package/src/ledger/changes.json +8 -0
- package/src/legal-pages/changes.json +6 -0
- package/src/mail-foundation/changes.json +10 -1
- package/src/mail-transport-inmemory/changes.json +10 -1
- package/src/mail-transport-smtp/changes.json +8 -0
- package/src/notes-history/changes.json +8 -0
- package/src/notes-history-user-data/changes.json +8 -0
- package/src/presets/changes.json +6 -0
- package/src/readiness/changes.json +10 -1
- package/src/secrets/changes.json +12 -0
- package/src/subscription-stripe/changes.json +6 -0
- package/src/tags/changes.json +8 -0
- package/src/template-resolver/changes.json +6 -0
- package/src/template-resolver-user-data/changes.json +10 -0
- package/src/tenant-settings/changes.json +10 -1
- package/src/tier-engine/changes.json +8 -0
- package/src/waitlist/changes.json +7 -0
- package/src/workflow-runner/changes.json +8 -0
- package/dist/file-provider-s3-env/index.d.ts +0 -8
- package/dist/file-provider-s3-env/index.js +0 -7
- package/dist/files-provider-s3/index.d.ts +0 -5
- package/dist/files-provider-s3/index.js +0 -5
- package/src/file-provider-s3-env/changes.json +0 -1
- package/src/files-provider-s3/changes.json +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ExtraRouteRejection, signatureRoute, } from "@cosmicdrift/kumiko-framework/api";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { resolveMailLocale } from "@cosmicdrift/kumiko-framework/i18n";
|
|
3
|
+
import { createFallbackLogger } from "@cosmicdrift/kumiko-framework/logging";
|
|
4
4
|
import { isPlainObject } from "@cosmicdrift/kumiko-types/type-guards";
|
|
5
5
|
import * as jose from "jose";
|
|
6
6
|
import * as z from "zod";
|
|
7
7
|
import { hashUnsubscribeAddress } from "./address-opt-out.js";
|
|
8
|
-
import { DELIVERY_RESUBSCRIBE_PATH, DELIVERY_UNSUBSCRIBE_PATH, DeliveryErrors, DeliveryHandlers, } from "./constants.js";
|
|
9
|
-
import "./unsubscribe-page
|
|
8
|
+
import { DELIVERY_RESUBSCRIBE_PATH, DELIVERY_UNSUBSCRIBE_PATH, DeliveryErrors, DeliveryHandlers, DeliveryQueries, } from "./constants.js";
|
|
9
|
+
import { renderUnsubscribePage } from "./unsubscribe-page.js";
|
|
10
10
|
// The mail's locale, so the pages behind the link speak the mail's language. Optional: links
|
|
11
11
|
// signed before the claim existed keep verifying and fall back to English.
|
|
12
12
|
const localeClaimSchema = z
|
|
@@ -59,6 +59,32 @@ function localeClaim(locale) {
|
|
|
59
59
|
const UNSUBSCRIBE_TOKEN_INVALID_BODY = {
|
|
60
60
|
error: { code: "unsubscribe_token_invalid", message: "Invalid or expired token" },
|
|
61
61
|
};
|
|
62
|
+
// jose checks the signature and the issuer before the expiry, so the claims of an
|
|
63
|
+
// expired token are authentic: enough to dress the "link expired" page in the
|
|
64
|
+
// tenant's look and language, never enough to write.
|
|
65
|
+
const expiredTokenScopeSchema = z.object({
|
|
66
|
+
iss: z.literal(UNSUBSCRIBE_ISSUER),
|
|
67
|
+
tenantId: z.string().min(1),
|
|
68
|
+
locale: localeClaimSchema,
|
|
69
|
+
});
|
|
70
|
+
class ExpiredUnsubscribeTokenRejection extends ExtraRouteRejection {
|
|
71
|
+
tenantId;
|
|
72
|
+
locale;
|
|
73
|
+
constructor(tenantId, locale) {
|
|
74
|
+
super(400, UNSUBSCRIBE_TOKEN_INVALID_BODY, "unsubscribe token expired");
|
|
75
|
+
this.tenantId = tenantId;
|
|
76
|
+
this.locale = locale;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function expiredTokenRejection(err) {
|
|
80
|
+
if (!(err instanceof jose.errors.JWTExpired))
|
|
81
|
+
return null;
|
|
82
|
+
const scope = expiredTokenScopeSchema.safeParse(err.payload);
|
|
83
|
+
if (!scope.success)
|
|
84
|
+
return null;
|
|
85
|
+
// @cast-boundary engine-bridge — string post-zod → branded TenantId
|
|
86
|
+
return new ExpiredUnsubscribeTokenRejection(scope.data.tenantId, scope.data.locale);
|
|
87
|
+
}
|
|
62
88
|
export async function signUnsubscribeToken(payload, secret) {
|
|
63
89
|
assertUnsubscribeSecret(secret, "signUnsubscribeToken");
|
|
64
90
|
const encodedSecret = new TextEncoder().encode(secret);
|
|
@@ -108,10 +134,6 @@ export async function signAddressUnsubscribeToken(payload, secret) {
|
|
|
108
134
|
// RFC 8058 fixed value — both the List-Unsubscribe-Post header and the body a
|
|
109
135
|
// one-click client POSTs.
|
|
110
136
|
export const DELIVERY_UNSUBSCRIBE_ONE_CLICK_HEADER_VALUE = "List-Unsubscribe=One-Click";
|
|
111
|
-
const CONFIRMATION_PAGE_HEADERS = {
|
|
112
|
-
"Cache-Control": "no-store",
|
|
113
|
-
"Referrer-Policy": "no-referrer",
|
|
114
|
-
};
|
|
115
137
|
// Undo token, handed out only in the response of a successful unsubscribe. A
|
|
116
138
|
// separate audience and a short expiry keep the long-lived mailed unsubscribe
|
|
117
139
|
// link from being able to undo an opt-out (and vice versa).
|
|
@@ -193,7 +215,8 @@ async function verifyUnsubscribeToken(token, encodedSecret, purpose) {
|
|
|
193
215
|
catch (err) {
|
|
194
216
|
if (err instanceof ExtraRouteRejection)
|
|
195
217
|
throw err;
|
|
196
|
-
throw
|
|
218
|
+
throw (expiredTokenRejection(err) ??
|
|
219
|
+
new ExtraRouteRejection(400, UNSUBSCRIBE_TOKEN_INVALID_BODY, "unsubscribe token verification failed"));
|
|
197
220
|
}
|
|
198
221
|
}
|
|
199
222
|
async function dispatchUnsubscribeWrite(verified, deps) {
|
|
@@ -250,52 +273,102 @@ async function dispatchResubscribeWrite(verified, deps) {
|
|
|
250
273
|
function pageLocale(locale) {
|
|
251
274
|
return resolveMailLocale(locale ?? "en");
|
|
252
275
|
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
${bodyHtml}
|
|
264
|
-
</body>
|
|
265
|
-
</html>`;
|
|
276
|
+
/** The result page the unsubscribe routes answer with, for apps serving their own
|
|
277
|
+
* (e.g. legacy) unsubscribe links. Texts come from the mail translations of `locale`;
|
|
278
|
+
* `chrome` (the mail renderer's readMailChrome) adds the tenant's brand row and footer.
|
|
279
|
+
* Served under runProdApp's default CSP the style block and the same-origin font pass;
|
|
280
|
+
* an https logo additionally needs its origin, e.g.
|
|
281
|
+
* `securityHeaders: { csp: { extend: { "img-src": [logoOrigin] } } }`. A hand-written CSP
|
|
282
|
+
* needs `style-src 'unsafe-inline'` as well. */
|
|
283
|
+
export function renderUnsubscribeResultPage(page) {
|
|
284
|
+
const { locale, chrome, ...state } = page;
|
|
285
|
+
return renderUnsubscribePage({ state, locale: pageLocale(locale), chrome }).html;
|
|
266
286
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
287
|
+
const NO_STORE_HEADERS = { "Cache-Control": "no-store" };
|
|
288
|
+
const mailChromeLinkSchema = z.object({ label: z.string(), url: z.string() });
|
|
289
|
+
const mailChromeSchema = z
|
|
290
|
+
.object({
|
|
291
|
+
tenantName: z.string(),
|
|
292
|
+
brandSuffix: z.string(),
|
|
293
|
+
logoUrl: z.string().optional(),
|
|
294
|
+
accentColor: z.string().optional(),
|
|
295
|
+
siteUrl: z.string().optional(),
|
|
296
|
+
footerText: z.string().optional(),
|
|
297
|
+
imprint: mailChromeLinkSchema.optional(),
|
|
298
|
+
privacy: mailChromeLinkSchema.optional(),
|
|
299
|
+
})
|
|
300
|
+
.nullable();
|
|
301
|
+
// Branding is decoration: an opt-out that went through must never turn into an
|
|
302
|
+
// error page because a footer resolver or the config read failed.
|
|
303
|
+
async function readPageChrome(deps, tenantId, locale) {
|
|
304
|
+
try {
|
|
305
|
+
const result = await deps.dispatchSystemQuery({
|
|
306
|
+
handlerQn: DeliveryQueries.unsubscribePageChrome,
|
|
307
|
+
payload: { locale },
|
|
308
|
+
tenantId,
|
|
309
|
+
});
|
|
310
|
+
const parsed = mailChromeSchema.safeParse(result);
|
|
311
|
+
return parsed.success ? parsed.data : null;
|
|
312
|
+
}
|
|
313
|
+
catch (err) {
|
|
314
|
+
createFallbackLogger("delivery").warn("unsubscribe page shown without tenant branding", {
|
|
315
|
+
errorName: err instanceof Error ? err.name : typeof err,
|
|
316
|
+
});
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
274
319
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
320
|
+
// no-referrer on every page: the GET page carries the token in its URL, and the
|
|
321
|
+
// tenant logo and site link would otherwise receive it in the Referer header.
|
|
322
|
+
const PAGE_HEADERS = {
|
|
323
|
+
"Cache-Control": "no-store",
|
|
324
|
+
"Referrer-Policy": "no-referrer",
|
|
325
|
+
};
|
|
326
|
+
async function pageResponse(
|
|
327
|
+
// biome-ignore lint/suspicious/noExplicitAny: Hono context generics are invisible at the framework boundary
|
|
328
|
+
c, deps, state, scope, status) {
|
|
329
|
+
const locale = pageLocale(scope.locale);
|
|
330
|
+
const chrome = scope.tenantId === undefined ? null : await readPageChrome(deps, scope.tenantId, locale);
|
|
331
|
+
const page = renderUnsubscribePage({ state, locale, chrome });
|
|
332
|
+
return c.html(page.html, status, {
|
|
333
|
+
...PAGE_HEADERS,
|
|
334
|
+
"Content-Security-Policy": page.contentSecurityPolicy,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
function localeFromAcceptLanguage(header) {
|
|
338
|
+
const first = header?.split(",")[0]?.split(";")[0]?.trim();
|
|
339
|
+
return first !== undefined && first !== "" && localeClaimSchema.safeParse(first).success
|
|
340
|
+
? first
|
|
341
|
+
: undefined;
|
|
342
|
+
}
|
|
343
|
+
// A browser lands on a page even for a dead link; API callers keep the JSON 400 from
|
|
344
|
+
// verifyUnsubscribeToken. The rejected result never reaches a write.
|
|
345
|
+
async function verifyForPage(token, encodedSecret, purpose, headers) {
|
|
346
|
+
try {
|
|
347
|
+
return await verifyUnsubscribeToken(token, encodedSecret, purpose);
|
|
348
|
+
}
|
|
349
|
+
catch (err) {
|
|
350
|
+
if (err instanceof ExpiredUnsubscribeTokenRejection) {
|
|
351
|
+
return {
|
|
352
|
+
kind: "rejected",
|
|
353
|
+
tenantId: err.tenantId,
|
|
354
|
+
locale: err.locale ?? localeFromAcceptLanguage(headers["accept-language"]),
|
|
355
|
+
};
|
|
289
356
|
}
|
|
290
|
-
|
|
291
|
-
return
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
357
|
+
if (err instanceof ExtraRouteRejection) {
|
|
358
|
+
return {
|
|
359
|
+
kind: "rejected",
|
|
360
|
+
tenantId: undefined,
|
|
361
|
+
locale: localeFromAcceptLanguage(headers["accept-language"]),
|
|
362
|
+
};
|
|
295
363
|
}
|
|
364
|
+
throw err;
|
|
296
365
|
}
|
|
297
366
|
}
|
|
298
|
-
|
|
367
|
+
async function verifyPost(request, token, encodedSecret, purpose) {
|
|
368
|
+
return isFormRequest(request.headers["content-type"])
|
|
369
|
+
? verifyForPage(token, encodedSecret, purpose, request.headers)
|
|
370
|
+
: verifyUnsubscribeToken(token, encodedSecret, purpose);
|
|
371
|
+
}
|
|
299
372
|
function isFormRequest(contentType) {
|
|
300
373
|
return contentType?.includes("application/x-www-form-urlencoded") === true;
|
|
301
374
|
}
|
|
@@ -336,34 +409,40 @@ export function createUnsubscribeRoutes(options) {
|
|
|
336
409
|
method: "GET",
|
|
337
410
|
path: DELIVERY_UNSUBSCRIBE_PATH,
|
|
338
411
|
entry: "signature",
|
|
339
|
-
verify: async ({ query }) => {
|
|
412
|
+
verify: async ({ query, headers }) => {
|
|
340
413
|
const token = query["token"];
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
414
|
+
const verified = await verifyForPage(token, encodedSecret, "unsubscribe", headers);
|
|
415
|
+
if (verified.kind === "rejected")
|
|
416
|
+
return verified;
|
|
417
|
+
// verifyForPage only accepts a present token, the check is for the type.
|
|
418
|
+
if (token === undefined)
|
|
419
|
+
return { kind: "rejected", tenantId: undefined, locale: undefined };
|
|
420
|
+
return { kind: "confirm", token, tenantId: verified.tenantId, locale: verified.locale };
|
|
346
421
|
},
|
|
347
|
-
handler: async (c,
|
|
422
|
+
handler: async (c, verified, deps) => verified.kind === "rejected"
|
|
423
|
+
? pageResponse(c, deps, { kind: "invalid" }, verified, 400)
|
|
424
|
+
: pageResponse(c, deps, { kind: "confirm", token: verified.token }, verified, 200),
|
|
348
425
|
});
|
|
349
426
|
const writeRoute = signatureRoute({
|
|
350
427
|
method: "POST",
|
|
351
428
|
path: DELIVERY_UNSUBSCRIBE_PATH,
|
|
352
429
|
entry: "signature",
|
|
353
|
-
verify: async (request) =>
|
|
430
|
+
verify: async (request) => verifyPost(request, tokenFromPostRequest(request), encodedSecret, "unsubscribe"),
|
|
354
431
|
handler: async (c, verified, deps) => {
|
|
432
|
+
if (verified.kind === "rejected") {
|
|
433
|
+
return pageResponse(c, deps, { kind: "invalid" }, verified, 400);
|
|
434
|
+
}
|
|
355
435
|
// Token-verify passed — everything below is a legitimate write. Don't
|
|
356
436
|
// swallow write-errors as "invalid token", that would mask real bugs
|
|
357
437
|
// (e.g. events-table missing, DB down) behind a misleading 400.
|
|
358
438
|
const succeeded = await dispatchUnsubscribeWrite(verified, deps);
|
|
359
439
|
if (!succeeded) {
|
|
360
|
-
return c
|
|
440
|
+
return pageResponse(c, deps, { kind: "failed" }, verified, 500);
|
|
361
441
|
}
|
|
362
|
-
return c
|
|
442
|
+
return pageResponse(c, deps, {
|
|
363
443
|
kind: "unsubscribed",
|
|
364
444
|
resubscribeToken: await signResubscribeToken(verified, encodedSecret),
|
|
365
|
-
|
|
366
|
-
}), 200, NO_STORE_HEADERS);
|
|
445
|
+
}, verified, 200);
|
|
367
446
|
},
|
|
368
447
|
});
|
|
369
448
|
// Undo direction: token only from the JSON/form body, never the query
|
|
@@ -373,14 +452,17 @@ export function createUnsubscribeRoutes(options) {
|
|
|
373
452
|
method: "POST",
|
|
374
453
|
path: DELIVERY_RESUBSCRIBE_PATH,
|
|
375
454
|
entry: "signature",
|
|
376
|
-
verify: async (request) =>
|
|
455
|
+
verify: async (request) => verifyPost(request, tokenFromRequestBody(request), encodedSecret, "resubscribe"),
|
|
377
456
|
handler: async (c, verified, deps) => {
|
|
457
|
+
if (verified.kind === "rejected") {
|
|
458
|
+
return pageResponse(c, deps, { kind: "invalid" }, verified, 400);
|
|
459
|
+
}
|
|
378
460
|
const outcome = await dispatchResubscribeWrite(verified, deps);
|
|
379
461
|
// The undo button on the unsubscribed page posts a form; a browser should land on a page.
|
|
380
462
|
if (isFormRequest(c.req.header("content-type"))) {
|
|
381
463
|
return outcome === "success"
|
|
382
|
-
? c
|
|
383
|
-
: c
|
|
464
|
+
? pageResponse(c, deps, { kind: "resubscribed" }, verified, 200)
|
|
465
|
+
: pageResponse(c, deps, { kind: "failed" }, verified, outcome === "limit_reached" ? 409 : 500);
|
|
384
466
|
}
|
|
385
467
|
if (outcome === "limit_reached") {
|
|
386
468
|
return c.json({ error: { code: DeliveryErrors.resubscribeLimitReached } }, 409, NO_STORE_HEADERS);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type DeliveryClientOptions, deliveryClient } from "./client-plugin.
|
|
2
|
-
export { DeliveryStatusCell } from "./delivery-status-cell.
|
|
1
|
+
export { type DeliveryClientOptions, deliveryClient } from "./client-plugin.tsx";
|
|
2
|
+
export { DeliveryStatusCell } from "./delivery-status-cell.tsx";
|
|
@@ -1,7 +1,3 @@
|
|
|
1
1
|
export declare function createDerivativesSharpFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
2
|
readonly exports: void;
|
|
3
3
|
};
|
|
4
|
-
/** @deprecated Use createDerivativesSharpFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
5
|
-
export declare const derivativesSharpFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
6
|
-
readonly exports: void;
|
|
7
|
-
};
|
|
@@ -15,5 +15,3 @@ export function createDerivativesSharpFeature() {
|
|
|
15
15
|
r.useExtension(EXT_DERIVATIVE_RENDERER, "image/*", plugin);
|
|
16
16
|
}, { dedupeOptions: {} });
|
|
17
17
|
}
|
|
18
|
-
/** @deprecated Use createDerivativesSharpFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
19
|
-
export const derivativesSharpFeature = createDerivativesSharpFeature();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createDerivativesSharpFeature
|
|
2
|
-
export { imageMetadata } from "./render.
|
|
1
|
+
export { createDerivativesSharpFeature } from "./feature.ts";
|
|
2
|
+
export { imageMetadata } from "./render.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createDerivativesSharpFeature
|
|
1
|
+
export { createDerivativesSharpFeature } from "./feature.js";
|
|
2
2
|
export { imageMetadata } from "./render.js";
|
|
@@ -4,10 +4,3 @@ export declare function createDocumentIngestFoundationFeature(): import("@cosmic
|
|
|
4
4
|
maxPagesPerFileConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"number">;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
|
-
/** @deprecated Use createDocumentIngestFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
8
|
-
export declare const documentIngestFoundationFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
9
|
-
readonly exports: {
|
|
10
|
-
ocrLanguageConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
|
|
11
|
-
maxPagesPerFileConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"number">;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -175,5 +175,3 @@ export function createDocumentIngestFoundationFeature() {
|
|
|
175
175
|
return { ocrLanguageConfigKey, maxPagesPerFileConfigKey };
|
|
176
176
|
}, { dedupeOptions: {} });
|
|
177
177
|
}
|
|
178
|
-
/** @deprecated Use createDocumentIngestFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
179
|
-
export const documentIngestFoundationFeature = createDocumentIngestFoundationFeature();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { documentIngestAggregateId } from "./aggregate-id.
|
|
2
|
-
export { type DocumentExtractMeta, documentExtractEntity, documentExtractsTable, type IngestPage, } from "./entity.
|
|
3
|
-
export { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, type DocumentIngestRequestedPayload, type DocumentIngestSkippedPayload, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.
|
|
4
|
-
export { createDocumentIngestFoundationFeature
|
|
5
|
-
export { readIngestPages, writeIngestPages } from "./pages.
|
|
6
|
-
export { type DocumentIngestProviderOptions, documentIngestProviderOptionsSchema, documentIngestProviderTrigger, EXT_DOCUMENT_INGEST_PROVIDER, listIngestibleMimeTypes, type ResolvedDocumentIngestProvider, resolveDocumentIngestProviders, } from "./providers.
|
|
7
|
-
export { type DocumentExtractWriteResult, writeDocumentExtractForLiveFileRef, } from "./write-document-extract.
|
|
1
|
+
export { documentIngestAggregateId } from "./aggregate-id.ts";
|
|
2
|
+
export { type DocumentExtractMeta, documentExtractEntity, documentExtractsTable, type IngestPage, } from "./entity.ts";
|
|
3
|
+
export { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, type DocumentIngestRequestedPayload, type DocumentIngestSkippedPayload, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.ts";
|
|
4
|
+
export { createDocumentIngestFoundationFeature } from "./feature.ts";
|
|
5
|
+
export { readIngestPages, writeIngestPages } from "./pages.ts";
|
|
6
|
+
export { type DocumentIngestProviderOptions, documentIngestProviderOptionsSchema, documentIngestProviderTrigger, EXT_DOCUMENT_INGEST_PROVIDER, listIngestibleMimeTypes, type ResolvedDocumentIngestProvider, resolveDocumentIngestProviders, } from "./providers.ts";
|
|
7
|
+
export { type DocumentExtractWriteResult, writeDocumentExtractForLiveFileRef, } from "./write-document-extract.ts";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export { documentIngestAggregateId } from "./aggregate-id.js";
|
|
3
3
|
export { documentExtractEntity, documentExtractsTable, } from "./entity.js";
|
|
4
4
|
export { DOCUMENT_INGEST_AGGREGATE_TYPE, DOCUMENT_INGEST_REQUESTED_EVENT_QN, DOCUMENT_INGEST_REQUESTED_EVENT_SHORT, DOCUMENT_INGEST_SKIPPED_EVENT_QN, DOCUMENT_INGEST_SKIPPED_EVENT_SHORT, documentIngestRequestedPayloadSchema, documentIngestSkippedPayloadSchema, } from "./events.js";
|
|
5
|
-
export { createDocumentIngestFoundationFeature
|
|
5
|
+
export { createDocumentIngestFoundationFeature } from "./feature.js";
|
|
6
6
|
export { readIngestPages, writeIngestPages } from "./pages.js";
|
|
7
7
|
export { documentIngestProviderOptionsSchema, documentIngestProviderTrigger, EXT_DOCUMENT_INGEST_PROVIDER, listIngestibleMimeTypes, resolveDocumentIngestProviders, } from "./providers.js";
|
|
8
8
|
export { writeDocumentExtractForLiveFileRef, } from "./write-document-extract.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FeatureDefinition, Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
2
|
import * as z from "zod";
|
|
3
|
-
import { DOCUMENT_INGEST_REQUESTED_EVENT_QN } from "./events.
|
|
3
|
+
import { DOCUMENT_INGEST_REQUESTED_EVENT_QN } from "./events.ts";
|
|
4
4
|
export declare const EXT_DOCUMENT_INGEST_PROVIDER: "documentIngestProvider";
|
|
5
5
|
export declare const documentIngestProviderOptionsSchema: z.ZodObject<{
|
|
6
6
|
mimeTypes: z.ZodArray<z.ZodString>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TenantDb } from "@cosmicdrift/kumiko-framework/db";
|
|
2
2
|
import type { SessionUser } from "@cosmicdrift/kumiko-framework/engine";
|
|
3
|
-
import { type DocumentExtractMeta, type IngestPage } from "./entity.
|
|
3
|
+
import { type DocumentExtractMeta, type IngestPage } from "./entity.ts";
|
|
4
4
|
export type DocumentExtractWriteResult = {
|
|
5
5
|
readonly kind: "written";
|
|
6
6
|
readonly documentExtractId: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type EffectiveFeaturesResolver, type Registry } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { GlobalFeatureToggleRuntime } from "./toggle-runtime.
|
|
2
|
+
import type { GlobalFeatureToggleRuntime } from "./toggle-runtime.ts";
|
|
3
3
|
export declare function composeTierResolverWithGlobalToggles(tierResolver: EffectiveFeaturesResolver, toggleRuntime: GlobalFeatureToggleRuntime, registry: Registry): EffectiveFeaturesResolver;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type FeatureDefinition } from "@cosmicdrift/kumiko-framework/engine";
|
|
2
|
-
import type { GlobalFeatureToggleRuntime } from "./toggle-runtime.
|
|
2
|
+
import type { GlobalFeatureToggleRuntime } from "./toggle-runtime.ts";
|
|
3
3
|
export type FeatureTogglesOptions = {
|
|
4
4
|
readonly getRuntime?: () => GlobalFeatureToggleRuntime;
|
|
5
5
|
};
|
|
6
6
|
export declare function createFeatureTogglesFeature(options?: FeatureTogglesOptions): FeatureDefinition;
|
|
7
|
-
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./constants.
|
|
8
|
-
export { globalFeatureStateTable, globalFeatureStateTableMeta, } from "./global-feature-state-table.
|
|
9
|
-
export { createFeatureToggleRuntime, GlobalFeatureToggleRuntime, type ToggleSyncSignal, } from "./toggle-runtime.
|
|
10
|
-
export { createRedisToggleSyncSignal, type RedisToggleSyncSignal } from "./toggle-sync-signal.
|
|
7
|
+
export { FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors } from "./constants.ts";
|
|
8
|
+
export { globalFeatureStateTable, globalFeatureStateTableMeta, } from "./global-feature-state-table.ts";
|
|
9
|
+
export { createFeatureToggleRuntime, GlobalFeatureToggleRuntime, type ToggleSyncSignal, } from "./toggle-runtime.ts";
|
|
10
|
+
export { createRedisToggleSyncSignal, type RedisToggleSyncSignal } from "./toggle-sync-signal.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
import type { GlobalFeatureToggleRuntime } from "../toggle-runtime.
|
|
2
|
+
import type { GlobalFeatureToggleRuntime } from "../toggle-runtime.ts";
|
|
3
3
|
export declare function createSetWriteHandler(getRuntime: (() => GlobalFeatureToggleRuntime) | undefined): import("@cosmicdrift/kumiko-types/define-handler").WriteHandlerDefinition<"set", z.ZodObject<{
|
|
4
4
|
featureName: z.ZodString;
|
|
5
5
|
enabled: z.ZodBoolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { composeTierResolverWithGlobalToggles } from "./compose-tier-resolver.
|
|
2
|
-
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./constants.
|
|
3
|
-
export { createFeatureToggleRuntime, createFeatureTogglesFeature, createRedisToggleSyncSignal, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, type FeatureTogglesOptions, GlobalFeatureToggleRuntime, globalFeatureStateTable, globalFeatureStateTableMeta, type RedisToggleSyncSignal, type ToggleSyncSignal, } from "./feature.
|
|
1
|
+
export { composeTierResolverWithGlobalToggles } from "./compose-tier-resolver.ts";
|
|
2
|
+
export { FEATURE_TOGGLES_FEATURE, FeatureToggleHandlers, FeatureToggleQueries, TOGGLE_ADMIN_SCREEN_ID, } from "./constants.ts";
|
|
3
|
+
export { createFeatureToggleRuntime, createFeatureTogglesFeature, createRedisToggleSyncSignal, FEATURE_TOGGLE_SET_EVENT_NAME, FeatureToggleErrors, type FeatureTogglesOptions, GlobalFeatureToggleRuntime, globalFeatureStateTable, globalFeatureStateTableMeta, type RedisToggleSyncSignal, type ToggleSyncSignal, } from "./feature.ts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type CacheSyncBus, type RedisClientOptions } from "@cosmicdrift/kumiko-framework/redis";
|
|
2
|
-
import type { ToggleSyncSignal } from "./toggle-runtime.
|
|
2
|
+
import type { ToggleSyncSignal } from "./toggle-runtime.ts";
|
|
3
3
|
export type RedisToggleSyncSignal = ToggleSyncSignal & {
|
|
4
4
|
close(): Promise<void>;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type FeatureTogglesClientOptions, featureTogglesClient, } from "./client-plugin.
|
|
1
|
+
export { type FeatureTogglesClientOptions, featureTogglesClient, } from "./client-plugin.tsx";
|
|
@@ -25,5 +25,3 @@ export type FileDerivativesOptions = {
|
|
|
25
25
|
readonly publicTenantResolution?: PublicVariantTenantResolution;
|
|
26
26
|
};
|
|
27
27
|
export declare function createFileDerivativesFeature(opts?: FileDerivativesOptions): FeatureDefinition;
|
|
28
|
-
/** @deprecated Use createFileDerivativesFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
29
|
-
export declare const fileDerivativesFeature: FeatureDefinition;
|
|
@@ -163,5 +163,3 @@ export function createFileDerivativesFeature(opts = {}) {
|
|
|
163
163
|
}
|
|
164
164
|
}, Object.keys(opts).length === 0 ? { dedupeOptions: {} } : undefined);
|
|
165
165
|
}
|
|
166
|
-
/** @deprecated Use createFileDerivativesFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
167
|
-
export const fileDerivativesFeature = createFileDerivativesFeature();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { FileDerivativesOptions, PublicVariantResolveApexTenant, PublicVariantTenantResolution, } from "./feature.
|
|
2
|
-
export { createFileDerivativesFeature
|
|
3
|
-
export type { DerivativePublicPredicateArgs, DerivativePublicPredicatePlugin, } from "./handlers/public-variant.query.
|
|
4
|
-
export { card, full, hero, thumb } from "./presets.
|
|
1
|
+
export type { FileDerivativesOptions, PublicVariantResolveApexTenant, PublicVariantTenantResolution, } from "./feature.ts";
|
|
2
|
+
export { createFileDerivativesFeature } from "./feature.ts";
|
|
3
|
+
export type { DerivativePublicPredicateArgs, DerivativePublicPredicatePlugin, } from "./handlers/public-variant.query.ts";
|
|
4
|
+
export { card, full, hero, thumb } from "./presets.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createFileDerivativesFeature
|
|
1
|
+
export { createFileDerivativesFeature } from "./feature.js";
|
|
2
2
|
export { card, full, hero, thumb } from "./presets.js";
|
|
@@ -5,9 +5,3 @@ export declare function createFileFoundationFeature(): import("@cosmicdrift/kumi
|
|
|
5
5
|
providerConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
/** @deprecated Use createFileFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
9
|
-
export declare const fileFoundationFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
10
|
-
readonly exports: {
|
|
11
|
-
providerConfigKey: import("@cosmicdrift/kumiko-types/config").ConfigKeyHandle<"text">;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -47,5 +47,3 @@ export function createFileFoundationFeature() {
|
|
|
47
47
|
return { providerConfigKey };
|
|
48
48
|
}, { dedupeOptions: {} });
|
|
49
49
|
}
|
|
50
|
-
/** @deprecated Use createFileFoundationFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
51
|
-
export const fileFoundationFeature = createFileFoundationFeature();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { createFileFoundationFeature, createFileProviderForTenant, type FileProviderContext, type FileProviderPlugin,
|
|
2
|
-
export { type FileRefContent, FileRefTooLargeError, fileContextForTenant, fileContextFromResolver, readFileRefContent, } from "./read-file-ref-content.
|
|
1
|
+
export { createFileFoundationFeature, createFileProviderForTenant, type FileProviderContext, type FileProviderPlugin, isFileProviderPlugin, } from "./feature.ts";
|
|
2
|
+
export { type FileRefContent, FileRefTooLargeError, fileContextForTenant, fileContextFromResolver, readFileRefContent, } from "./read-file-ref-content.ts";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Public API of the file-foundation bundled-feature.
|
|
2
|
-
export { createFileFoundationFeature, createFileProviderForTenant,
|
|
2
|
+
export { createFileFoundationFeature, createFileProviderForTenant, isFileProviderPlugin, } from "./feature.js";
|
|
3
3
|
export { FileRefTooLargeError, fileContextForTenant, fileContextFromResolver, readFileRefContent, } from "./read-file-ref-content.js";
|
|
@@ -5,7 +5,3 @@ export declare function clearStorage(tenantId: string): void;
|
|
|
5
5
|
export declare function createFileProviderInMemoryFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
6
6
|
readonly exports: void;
|
|
7
7
|
};
|
|
8
|
-
/** @deprecated Use createFileProviderInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
9
|
-
export declare const fileProviderInMemoryFeature: import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
10
|
-
readonly exports: void;
|
|
11
|
-
};
|
|
@@ -64,5 +64,3 @@ export function createFileProviderInMemoryFeature() {
|
|
|
64
64
|
r.useExtension("fileProvider", "inmemory", plugin);
|
|
65
65
|
}, { dedupeOptions: {} });
|
|
66
66
|
}
|
|
67
|
-
/** @deprecated Use createFileProviderInMemoryFeature(). Run `bun kumiko-upgrade --apply`. Removed in the first release after 2026-10-29. */
|
|
68
|
-
export const fileProviderInMemoryFeature = createFileProviderInMemoryFeature();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { clearStorage, createFileProviderInMemoryFeature,
|
|
1
|
+
export { clearStorage, createFileProviderInMemoryFeature, listKeys, } from "./feature.ts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Public API of the file-provider-inmemory bundled-feature.
|
|
2
|
-
export { clearStorage, createFileProviderInMemoryFeature,
|
|
2
|
+
export { clearStorage, createFileProviderInMemoryFeature, listKeys, } from "./feature.js";
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
export declare function createFileProviderS3EnvFeature(): import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
1
|
+
export declare function createFileProviderS3EnvFeature(): import("@cosmicdrift/kumiko-framework/env").FeatureWithEnvSchema<import("@cosmicdrift/kumiko-types/feature").FeatureDefinition & {
|
|
2
2
|
readonly exports: void;
|
|
3
|
-
}
|
|
3
|
+
}, {
|
|
4
|
+
S3_ACCESS_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
S3_BUCKET: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
S3_ENDPOINT: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodPipe<import("zod").ZodLiteral<"">, import("zod").ZodTransform<undefined, "">>, import("zod").ZodURL]>>;
|
|
7
|
+
S3_FORCE_PATH_STYLE: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
8
|
+
true: "true";
|
|
9
|
+
false: "false";
|
|
10
|
+
}>>;
|
|
11
|
+
S3_REGION: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
S3_SECRET_KEY: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
}>;
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
// **Pattern-Vorbild:** mirrors file-provider-inmemory (zero admin seeding,
|
|
15
15
|
// only the file-foundation plugin-point required).
|
|
16
16
|
//
|
|
17
|
-
// **Env vars** (read by createS3ProviderFromEnv,
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// Missing required vars throw on the FIRST file op (inside the export cron).
|
|
17
|
+
// **Env vars** (read by createS3ProviderFromEnv, declared in s3EnvSchema):
|
|
18
|
+
// S3_BUCKET, S3_REGION, S3_ACCESS_KEY, S3_SECRET_KEY, optional S3_ENDPOINT
|
|
19
|
+
// and S3_FORCE_PATH_STYLE. The schema keeps them optional because apps mount
|
|
20
|
+
// this provider next to another one; missing vars throw on the FIRST file op.
|
|
22
21
|
// The user-data-rights boot guard surfaces that at boot instead.
|
|
23
22
|
import { defineFeature } from "@cosmicdrift/kumiko-framework/engine";
|
|
23
|
+
import { featureWithEnvSchema } from "@cosmicdrift/kumiko-framework/env";
|
|
24
|
+
import { s3EnvSchema } from "./env-schema.js";
|
|
24
25
|
import { createS3ProviderFromEnv } from "./lib/env-helper.js";
|
|
25
26
|
const FEATURE_NAME = "file-provider-s3-env";
|
|
26
27
|
export function createFileProviderS3EnvFeature() {
|
|
27
|
-
|
|
28
|
+
const feature = defineFeature(FEATURE_NAME, (r) => {
|
|
28
29
|
r.describe('Registers an `"s3-env"` provider for `file-foundation` that reads one S3 credential set from `process.env` (`S3_BUCKET`/`S3_REGION`/`S3_ACCESS_KEY`/`S3_SECRET_KEY`, optional `S3_ENDPOINT`/`S3_FORCE_PATH_STYLE`) and serves every tenant from one shared bucket — no per-tenant config or secret seeding. Use this for single-bucket S3-compatible deploys (e.g. Hetzner Object Storage); use `file-provider-s3` instead when each tenant needs its own bucket/credentials.');
|
|
29
30
|
r.uiHints({
|
|
30
31
|
displayLabel: "File Provider · S3 (env)",
|
|
@@ -35,6 +36,7 @@ export function createFileProviderS3EnvFeature() {
|
|
|
35
36
|
// env, not the per-tenant config + secrets store. Only the file-foundation
|
|
36
37
|
// plugin-extension-point must be mounted.
|
|
37
38
|
r.requires({ features: ["file-foundation"] });
|
|
39
|
+
r.envSchema(s3EnvSchema);
|
|
38
40
|
const plugin = {
|
|
39
41
|
// tenantId ignored: one shared bucket serves all tenants (isolation via
|
|
40
42
|
// tenant-prefixed / UUID keys). Built fresh per call like file-provider-s3;
|
|
@@ -43,4 +45,5 @@ export function createFileProviderS3EnvFeature() {
|
|
|
43
45
|
};
|
|
44
46
|
r.useExtension("fileProvider", "s3-env", plugin);
|
|
45
47
|
}, { dedupeOptions: {} });
|
|
48
|
+
return featureWithEnvSchema(feature, s3EnvSchema);
|
|
46
49
|
}
|