nuxt-backend 0.2.1 → 0.4.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/README.md +25 -7
- package/dist/capabilities/detect.js +16 -7
- package/dist/capabilities/gateway-route.js +24 -0
- package/dist/capabilities/registry.js +3 -2
- package/dist/capabilities/status.js +3 -1
- package/dist/chunks/catalog.mjs +1 -1
- package/dist/chunks/doctor.mjs +596 -71
- package/dist/chunks/email-previews.mjs +1 -1
- package/dist/chunks/health.mjs +2 -2
- package/dist/chunks/index.mjs +3 -3
- package/dist/chunks/install.mjs +4 -4
- package/dist/chunks/run.mjs +1 -1
- package/dist/chunks/server.mjs +9 -7
- package/dist/cli.mjs +628 -128
- package/dist/convex/access-tickets.d.ts +20 -1
- package/dist/convex/access-tickets.d.ts.map +1 -1
- package/dist/convex/access-tickets.js +28 -0
- package/dist/convex/access-tickets.js.map +1 -1
- package/dist/convex/account-data.d.ts +25 -3
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +26 -3
- package/dist/convex/account-data.js.map +1 -1
- package/dist/convex/app.d.ts +15 -2
- package/dist/convex/app.d.ts.map +1 -1
- package/dist/convex/app.js +16 -2
- package/dist/convex/app.js.map +1 -1
- package/dist/convex/billing-launch.d.ts +36 -0
- package/dist/convex/billing-launch.d.ts.map +1 -0
- package/dist/convex/billing-launch.js +18 -0
- package/dist/convex/billing-launch.js.map +1 -0
- package/dist/convex/catalog.d.ts +24 -2
- package/dist/convex/catalog.d.ts.map +1 -1
- package/dist/convex/catalog.js +16 -0
- package/dist/convex/catalog.js.map +1 -1
- package/dist/convex/client/code-binding.js +1 -1
- package/dist/convex/client/component.d.ts.map +1 -1
- package/dist/convex/client/guards.js +3 -3
- package/dist/convex/client/guards.js.map +1 -1
- package/dist/convex/client/index.d.ts +94 -40
- package/dist/convex/client/index.d.ts.map +1 -1
- package/dist/convex/client/index.js +4 -3
- package/dist/convex/client/index.js.map +1 -1
- package/dist/convex/client/plugins.d.ts +67 -30
- package/dist/convex/client/plugins.d.ts.map +1 -1
- package/dist/convex/client/plugins.js +43 -19
- package/dist/convex/client/plugins.js.map +1 -1
- package/dist/convex/components/backend/_generated/api.d.ts +2 -0
- package/dist/convex/components/backend/_generated/api.d.ts.map +1 -1
- package/dist/convex/components/backend/_generated/api.js.map +1 -1
- package/dist/convex/components/backend/_generated/component.d.ts +475 -5
- package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
- package/dist/convex/components/backend/access.d.ts +47 -6
- package/dist/convex/components/backend/access.d.ts.map +1 -1
- package/dist/convex/components/backend/access.js +108 -16
- package/dist/convex/components/backend/access.js.map +1 -1
- package/dist/convex/components/backend/account.d.ts +6 -0
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +49 -2
- package/dist/convex/components/backend/account.js.map +1 -1
- package/dist/convex/components/backend/adapter.d.ts +1 -1
- package/dist/convex/components/backend/adapter.d.ts.map +1 -1
- package/dist/convex/components/backend/adapter.js +1 -1
- package/dist/convex/components/backend/adapter.js.map +1 -1
- package/dist/convex/components/backend/billing.d.ts +29 -1
- package/dist/convex/components/backend/billing.d.ts.map +1 -1
- package/dist/convex/components/backend/billing.js +97 -17
- package/dist/convex/components/backend/billing.js.map +1 -1
- package/dist/convex/components/backend/costs.d.ts +1 -1
- package/dist/convex/components/backend/crons.d.ts.map +1 -1
- package/dist/convex/components/backend/crons.js +3 -0
- package/dist/convex/components/backend/crons.js.map +1 -1
- package/dist/convex/components/backend/funnel.d.ts +2 -2
- package/dist/convex/components/backend/gifts.d.ts +2 -2
- package/dist/convex/components/backend/gifts.js +2 -2
- package/dist/convex/components/backend/jobs.d.ts +122 -11
- package/dist/convex/components/backend/jobs.d.ts.map +1 -1
- package/dist/convex/components/backend/jobs.js +160 -17
- package/dist/convex/components/backend/jobs.js.map +1 -1
- package/dist/convex/components/backend/maintenance.d.ts +2 -2
- package/dist/convex/components/backend/maintenance.d.ts.map +1 -1
- package/dist/convex/components/backend/maintenance.js +11 -1
- package/dist/convex/components/backend/maintenance.js.map +1 -1
- package/dist/convex/components/backend/moderation.d.ts +94 -0
- package/dist/convex/components/backend/moderation.d.ts.map +1 -0
- package/dist/convex/components/backend/moderation.js +53 -0
- package/dist/convex/components/backend/moderation.js.map +1 -0
- package/dist/convex/components/backend/schema.d.ts +437 -36
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +119 -4
- package/dist/convex/components/backend/schema.js.map +1 -1
- package/dist/convex/components/backend/storage.d.ts +19 -0
- package/dist/convex/components/backend/storage.d.ts.map +1 -1
- package/dist/convex/components/backend/storage.js +57 -0
- package/dist/convex/components/backend/storage.js.map +1 -1
- package/dist/convex/components/backend/subscriptions.d.ts +4 -4
- package/dist/convex/components/backend/subscriptions.js +1 -1
- package/dist/convex/components/backend/subscriptions.js.map +1 -1
- package/dist/convex/constants.d.ts +19 -4
- package/dist/convex/constants.d.ts.map +1 -1
- package/dist/convex/constants.js +19 -4
- package/dist/convex/constants.js.map +1 -1
- package/dist/convex/delivery.d.ts +17 -0
- package/dist/convex/delivery.d.ts.map +1 -1
- package/dist/convex/delivery.js +26 -1
- package/dist/convex/delivery.js.map +1 -1
- package/dist/convex/email-templates.d.ts +56 -6
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +69 -14
- package/dist/convex/email-templates.js.map +1 -1
- package/dist/convex/emails/notification.d.ts +9 -0
- package/dist/convex/emails/notification.d.ts.map +1 -0
- package/dist/convex/emails/notification.js +21 -0
- package/dist/convex/emails/notification.js.map +1 -0
- package/dist/convex/emails/renewal-reminder.d.ts.map +1 -1
- package/dist/convex/emails/renewal-reminder.js +17 -1
- package/dist/convex/emails/renewal-reminder.js.map +1 -1
- package/dist/convex/errors.d.ts +15 -8
- package/dist/convex/errors.d.ts.map +1 -1
- package/dist/convex/errors.js +78 -15
- package/dist/convex/errors.js.map +1 -1
- package/dist/convex/events.d.ts +14 -4
- package/dist/convex/events.d.ts.map +1 -1
- package/dist/convex/events.js +11 -4
- package/dist/convex/events.js.map +1 -1
- package/dist/convex/files.d.ts +30 -4
- package/dist/convex/files.d.ts.map +1 -1
- package/dist/convex/files.js +44 -6
- package/dist/convex/files.js.map +1 -1
- package/dist/convex/integrations/account.d.ts +7 -0
- package/dist/convex/integrations/account.d.ts.map +1 -1
- package/dist/convex/integrations/account.js +2 -0
- package/dist/convex/integrations/account.js.map +1 -1
- package/dist/convex/integrations/ai/chat.js +9 -9
- package/dist/convex/integrations/ai/chat.js.map +1 -1
- package/dist/convex/integrations/ai/config.d.ts +157 -37
- package/dist/convex/integrations/ai/config.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.d.ts +3 -0
- package/dist/convex/integrations/ai/context.d.ts.map +1 -1
- package/dist/convex/integrations/ai/context.js +4 -3
- package/dist/convex/integrations/ai/context.js.map +1 -1
- package/dist/convex/integrations/ai/costs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/costs.js +49 -2
- package/dist/convex/integrations/ai/costs.js.map +1 -1
- package/dist/convex/integrations/ai/embeddings.d.ts +6 -6
- package/dist/convex/integrations/ai/embeddings.d.ts.map +1 -1
- package/dist/convex/integrations/ai/embeddings.js +17 -30
- package/dist/convex/integrations/ai/embeddings.js.map +1 -1
- package/dist/convex/integrations/ai/images.d.ts +25 -0
- package/dist/convex/integrations/ai/images.d.ts.map +1 -0
- package/dist/convex/integrations/ai/images.js +117 -0
- package/dist/convex/integrations/ai/images.js.map +1 -0
- package/dist/convex/integrations/ai/job-errors.d.ts +44 -4
- package/dist/convex/integrations/ai/job-errors.d.ts.map +1 -1
- package/dist/convex/integrations/ai/job-errors.js +72 -9
- package/dist/convex/integrations/ai/job-errors.js.map +1 -1
- package/dist/convex/integrations/ai/jobs.d.ts +301 -14
- package/dist/convex/integrations/ai/jobs.d.ts.map +1 -1
- package/dist/convex/integrations/ai/jobs.js +688 -90
- package/dist/convex/integrations/ai/jobs.js.map +1 -1
- package/dist/convex/integrations/ai/knowledge.d.ts.map +1 -1
- package/dist/convex/integrations/ai/knowledge.js +10 -11
- package/dist/convex/integrations/ai/knowledge.js.map +1 -1
- package/dist/convex/integrations/ai/metering.d.ts +15 -5
- package/dist/convex/integrations/ai/metering.d.ts.map +1 -1
- package/dist/convex/integrations/ai/metering.js +73 -26
- package/dist/convex/integrations/ai/metering.js.map +1 -1
- package/dist/convex/integrations/ai/model-id.d.ts +14 -1
- package/dist/convex/integrations/ai/model-id.d.ts.map +1 -1
- package/dist/convex/integrations/ai/model-id.js +24 -2
- package/dist/convex/integrations/ai/model-id.js.map +1 -1
- package/dist/convex/integrations/ai/models.d.ts +104 -21
- package/dist/convex/integrations/ai/models.d.ts.map +1 -1
- package/dist/convex/integrations/ai/models.js +220 -45
- package/dist/convex/integrations/ai/models.js.map +1 -1
- package/dist/convex/integrations/ai/moderation-providers.d.ts +136 -0
- package/dist/convex/integrations/ai/moderation-providers.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-providers.js +277 -0
- package/dist/convex/integrations/ai/moderation-providers.js.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts +54 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.d.ts.map +1 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js +141 -0
- package/dist/convex/integrations/ai/moderation-taxonomy.js.map +1 -0
- package/dist/convex/integrations/ai/moderation.d.ts +225 -20
- package/dist/convex/integrations/ai/moderation.d.ts.map +1 -1
- package/dist/convex/integrations/ai/moderation.js +361 -37
- package/dist/convex/integrations/ai/moderation.js.map +1 -1
- package/dist/convex/integrations/ai/provenance.d.ts +6 -0
- package/dist/convex/integrations/ai/provenance.d.ts.map +1 -1
- package/dist/convex/integrations/ai/provenance.js +4 -1
- package/dist/convex/integrations/ai/provenance.js.map +1 -1
- package/dist/convex/integrations/ai/setup.js +5 -5
- package/dist/convex/integrations/ai/setup.js.map +1 -1
- package/dist/convex/integrations/ai/stream.d.ts +1 -1
- package/dist/convex/integrations/ai/stream.d.ts.map +1 -1
- package/dist/convex/integrations/ai/stream.js +4 -2
- package/dist/convex/integrations/ai/stream.js.map +1 -1
- package/dist/convex/integrations/ai.d.ts +15 -8
- package/dist/convex/integrations/ai.d.ts.map +1 -1
- package/dist/convex/integrations/ai.js +4 -1
- package/dist/convex/integrations/ai.js.map +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
- package/dist/convex/integrations/billing/checkout.js +4 -4
- package/dist/convex/integrations/billing/checkout.js.map +1 -1
- package/dist/convex/integrations/billing/context.d.ts +8 -0
- package/dist/convex/integrations/billing/context.d.ts.map +1 -1
- package/dist/convex/integrations/billing/context.js +24 -2
- package/dist/convex/integrations/billing/context.js.map +1 -1
- package/dist/convex/integrations/billing/credits.d.ts +7 -0
- package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
- package/dist/convex/integrations/billing/credits.js +25 -7
- package/dist/convex/integrations/billing/credits.js.map +1 -1
- package/dist/convex/integrations/billing/features.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts +41 -1
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +92 -29
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +7 -3
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +18 -8
- package/dist/convex/integrations/billing/functions.js.map +1 -1
- package/dist/convex/integrations/billing/gifts.d.ts +4 -0
- package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
- package/dist/convex/integrations/billing/gifts.js +37 -6
- package/dist/convex/integrations/billing/gifts.js.map +1 -1
- package/dist/convex/integrations/billing/history.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts +9 -3
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +15 -6
- package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
- package/dist/convex/integrations/billing/passes.d.ts +2 -2
- package/dist/convex/integrations/billing/passes.d.ts.map +1 -1
- package/dist/convex/integrations/billing/passes.js +5 -13
- package/dist/convex/integrations/billing/passes.js.map +1 -1
- package/dist/convex/integrations/billing/pricing.d.ts +9 -2
- package/dist/convex/integrations/billing/pricing.d.ts.map +1 -1
- package/dist/convex/integrations/billing/pricing.js +38 -4
- package/dist/convex/integrations/billing/pricing.js.map +1 -1
- package/dist/convex/integrations/billing/provider-failure.d.ts +17 -0
- package/dist/convex/integrations/billing/provider-failure.d.ts.map +1 -0
- package/dist/convex/integrations/billing/provider-failure.js +52 -0
- package/dist/convex/integrations/billing/provider-failure.js.map +1 -0
- package/dist/convex/integrations/billing/quotas.d.ts.map +1 -1
- package/dist/convex/integrations/billing/rate-limit.d.ts +16 -0
- package/dist/convex/integrations/billing/rate-limit.d.ts.map +1 -0
- package/dist/convex/integrations/billing/rate-limit.js +45 -0
- package/dist/convex/integrations/billing/rate-limit.js.map +1 -0
- package/dist/convex/integrations/billing/referral-orders.d.ts +1 -1
- package/dist/convex/integrations/billing/referral-orders.js +1 -1
- package/dist/convex/integrations/billing/resync.d.ts +28 -0
- package/dist/convex/integrations/billing/resync.d.ts.map +1 -0
- package/dist/convex/integrations/billing/resync.js +139 -0
- package/dist/convex/integrations/billing/resync.js.map +1 -0
- package/dist/convex/integrations/billing/subscriptions.d.ts +1 -1
- package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/subscriptions.js +6 -2
- package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
- package/dist/convex/integrations/billing/types/lifecycle.d.ts +1 -1
- package/dist/convex/integrations/billing/types/records.d.ts +68 -3
- package/dist/convex/integrations/billing/types/records.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/setup.d.ts +10 -4
- package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
- package/dist/convex/integrations/billing/types/surface.d.ts +47 -6
- package/dist/convex/integrations/billing/types/surface.d.ts.map +1 -1
- package/dist/convex/integrations/billing/webhooks.js +2 -2
- package/dist/convex/integrations/billing/welcome.d.ts +16 -0
- package/dist/convex/integrations/billing/welcome.d.ts.map +1 -0
- package/dist/convex/integrations/billing/welcome.js +93 -0
- package/dist/convex/integrations/billing/welcome.js.map +1 -0
- package/dist/convex/integrations/billing.d.ts +3 -2
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +17 -5
- package/dist/convex/integrations/billing.js.map +1 -1
- package/dist/convex/integrations/email-sync.d.ts +24 -2
- package/dist/convex/integrations/email-sync.d.ts.map +1 -1
- package/dist/convex/integrations/email-sync.js +54 -23
- package/dist/convex/integrations/email-sync.js.map +1 -1
- package/dist/convex/integrations/email.d.ts +17 -3
- package/dist/convex/integrations/email.d.ts.map +1 -1
- package/dist/convex/integrations/email.js.map +1 -1
- package/dist/convex/integrations/functions.d.ts +2 -2
- package/dist/convex/integrations/functions.d.ts.map +1 -1
- package/dist/convex/integrations/functions.js +1 -1
- package/dist/convex/integrations/functions.js.map +1 -1
- package/dist/convex/integrations/inbound.d.ts +16 -7
- package/dist/convex/integrations/inbound.d.ts.map +1 -1
- package/dist/convex/integrations/inbound.js +21 -10
- package/dist/convex/integrations/inbound.js.map +1 -1
- package/dist/convex/integrations/launch.d.ts +124 -3
- package/dist/convex/integrations/launch.d.ts.map +1 -1
- package/dist/convex/integrations/launch.js +172 -22
- package/dist/convex/integrations/launch.js.map +1 -1
- package/dist/convex/integrations/notifications.d.ts +6 -2
- package/dist/convex/integrations/notifications.d.ts.map +1 -1
- package/dist/convex/integrations/notifications.js +13 -15
- package/dist/convex/integrations/notifications.js.map +1 -1
- package/dist/convex/integrations/rate-limit.d.ts +18 -0
- package/dist/convex/integrations/rate-limit.d.ts.map +1 -1
- package/dist/convex/integrations/rate-limit.js +18 -3
- package/dist/convex/integrations/rate-limit.js.map +1 -1
- package/dist/convex/integrations/referrals.d.ts +20 -0
- package/dist/convex/integrations/referrals.d.ts.map +1 -1
- package/dist/convex/integrations/referrals.js +14 -9
- package/dist/convex/integrations/referrals.js.map +1 -1
- package/dist/convex/integrations/reports.d.ts +4 -1
- package/dist/convex/integrations/reports.d.ts.map +1 -1
- package/dist/convex/integrations/reports.js +14 -3
- package/dist/convex/integrations/reports.js.map +1 -1
- package/dist/convex/integrations/retention.d.ts +42 -4
- package/dist/convex/integrations/retention.d.ts.map +1 -1
- package/dist/convex/integrations/retention.js +62 -4
- package/dist/convex/integrations/retention.js.map +1 -1
- package/dist/convex/integrations/storage.d.ts +138 -3
- package/dist/convex/integrations/storage.d.ts.map +1 -1
- package/dist/convex/integrations/storage.js +64 -5
- package/dist/convex/integrations/storage.js.map +1 -1
- package/dist/convex/label-format.d.ts +2 -2
- package/dist/convex/label-format.d.ts.map +1 -1
- package/dist/convex/label-format.js +2 -2
- package/dist/convex/label-format.js.map +1 -1
- package/dist/convex/label-groups/admin.d.ts +30 -0
- package/dist/convex/label-groups/admin.d.ts.map +1 -1
- package/dist/convex/label-groups/admin.js +31 -0
- package/dist/convex/label-groups/admin.js.map +1 -1
- package/dist/convex/label-groups/audit.d.ts +1 -0
- package/dist/convex/label-groups/audit.d.ts.map +1 -1
- package/dist/convex/label-groups/audit.js +1 -0
- package/dist/convex/label-groups/audit.js.map +1 -1
- package/dist/convex/label-groups/auth.d.ts +7 -0
- package/dist/convex/label-groups/auth.d.ts.map +1 -1
- package/dist/convex/label-groups/auth.js +7 -0
- package/dist/convex/label-groups/auth.js.map +1 -1
- package/dist/convex/label-groups/cancelFlow.d.ts +1 -1
- package/dist/convex/label-groups/cancelFlow.js +2 -2
- package/dist/convex/label-groups/cancelFlow.js.map +1 -1
- package/dist/convex/label-groups/email.d.ts.map +1 -1
- package/dist/convex/label-groups/email.js +2 -1
- package/dist/convex/label-groups/email.js.map +1 -1
- package/dist/convex/label-groups/errors.d.ts +13 -0
- package/dist/convex/label-groups/errors.d.ts.map +1 -1
- package/dist/convex/label-groups/errors.js +18 -1
- package/dist/convex/label-groups/errors.js.map +1 -1
- package/dist/convex/label-groups/gift.d.ts +26 -0
- package/dist/convex/label-groups/gift.d.ts.map +1 -1
- package/dist/convex/label-groups/gift.js +32 -2
- package/dist/convex/label-groups/gift.js.map +1 -1
- package/dist/convex/label-groups/legal.d.ts +28 -2
- package/dist/convex/label-groups/legal.d.ts.map +1 -1
- package/dist/convex/label-groups/legal.js +31 -0
- package/dist/convex/label-groups/legal.js.map +1 -1
- package/dist/convex/label-groups/notifications.d.ts +3 -1
- package/dist/convex/label-groups/notifications.d.ts.map +1 -1
- package/dist/convex/label-groups/notifications.js +5 -3
- package/dist/convex/label-groups/notifications.js.map +1 -1
- package/dist/convex/label-groups/pastDue.d.ts +1 -1
- package/dist/convex/label-groups/pastDue.d.ts.map +1 -1
- package/dist/convex/label-groups/pastDue.js +1 -1
- package/dist/convex/label-groups/pastDue.js.map +1 -1
- package/dist/convex/label-groups/pricing.d.ts +17 -0
- package/dist/convex/label-groups/pricing.d.ts.map +1 -1
- package/dist/convex/label-groups/pricing.js +24 -0
- package/dist/convex/label-groups/pricing.js.map +1 -1
- package/dist/convex/label-groups/referral.d.ts +6 -2
- package/dist/convex/label-groups/referral.d.ts.map +1 -1
- package/dist/convex/label-groups/referral.js +6 -2
- package/dist/convex/label-groups/referral.js.map +1 -1
- package/dist/convex/label-groups/report.d.ts +8 -1
- package/dist/convex/label-groups/report.d.ts.map +1 -1
- package/dist/convex/label-groups/report.js +10 -1
- package/dist/convex/label-groups/report.js.map +1 -1
- package/dist/convex/label-groups/settings.d.ts +34 -0
- package/dist/convex/label-groups/settings.d.ts.map +1 -1
- package/dist/convex/label-groups/settings.js +39 -0
- package/dist/convex/label-groups/settings.js.map +1 -1
- package/dist/convex/label-groups/upload.d.ts +1 -0
- package/dist/convex/label-groups/upload.d.ts.map +1 -1
- package/dist/convex/label-groups/upload.js +2 -0
- package/dist/convex/label-groups/upload.js.map +1 -1
- package/dist/convex/label-groups/waitlist.d.ts +5 -0
- package/dist/convex/label-groups/waitlist.d.ts.map +1 -1
- package/dist/convex/label-groups/waitlist.js +7 -2
- package/dist/convex/label-groups/waitlist.js.map +1 -1
- package/dist/convex/label-groups/withdrawal.d.ts +1 -1
- package/dist/convex/label-groups/withdrawal.js +1 -1
- package/dist/convex/label-translations.d.ts.map +1 -1
- package/dist/convex/label-translations.js +94 -34
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +203 -2
- package/dist/convex/labels.d.ts.map +1 -1
- package/dist/convex/legal.d.ts +30 -3
- package/dist/convex/legal.d.ts.map +1 -1
- package/dist/convex/legal.js +19 -4
- package/dist/convex/legal.js.map +1 -1
- package/dist/convex/log.js +20 -1
- package/dist/convex/log.js.map +1 -1
- package/dist/convex/money.d.ts +10 -0
- package/dist/convex/money.d.ts.map +1 -0
- package/dist/convex/money.js +37 -0
- package/dist/convex/money.js.map +1 -0
- package/dist/convex/monitoring.d.ts +6 -4
- package/dist/convex/monitoring.d.ts.map +1 -1
- package/dist/convex/monitoring.js +6 -4
- package/dist/convex/monitoring.js.map +1 -1
- package/dist/convex/report-rules.d.ts +8 -0
- package/dist/convex/report-rules.d.ts.map +1 -1
- package/dist/convex/report-rules.js +17 -0
- package/dist/convex/report-rules.js.map +1 -1
- package/dist/convex/sensitive-actions.d.ts.map +1 -1
- package/dist/convex/sensitive-actions.js +1 -0
- package/dist/convex/sensitive-actions.js.map +1 -1
- package/dist/convex/test-billing.d.ts +83 -0
- package/dist/convex/test-billing.d.ts.map +1 -0
- package/dist/convex/test-billing.js +131 -0
- package/dist/convex/test-billing.js.map +1 -0
- package/dist/convex/test-models.d.ts +21 -2
- package/dist/convex/test-models.d.ts.map +1 -1
- package/dist/convex/test-models.js +86 -6
- package/dist/convex/test-models.js.map +1 -1
- package/dist/convex/test-moderation.d.ts +24 -0
- package/dist/convex/test-moderation.d.ts.map +1 -0
- package/dist/convex/test-moderation.js +114 -0
- package/dist/convex/test-moderation.js.map +1 -0
- package/dist/devtools-client/_nuxt/CiCAOwUc.js +5 -0
- package/dist/devtools-client/index.html +1 -1
- package/dist/env-registry.js +37 -5
- package/dist/eslint.d.mts +2 -1
- package/dist/eslint.mjs +2 -1
- package/dist/module.d.ts +96 -3
- package/dist/module.js +2 -2
- package/dist/module.json +1 -1
- package/dist/runtime/chunk-recovery.d.ts +13 -0
- package/dist/runtime/chunk-recovery.js +1 -0
- package/dist/runtime/config.d.ts +95 -14
- package/dist/runtime/config.js +13 -1
- package/dist/runtime/locales/de.json +208 -26
- package/dist/runtime/locales/en.json +207 -25
- package/dist/runtime/locales/es.json +206 -24
- package/dist/runtime/locales/fr.json +206 -24
- package/dist/runtime/locales/ru.json +206 -24
- package/dist/runtime/monitoring/sdk/sentry.client.config.js +2 -1
- package/dist/runtime/monitoring/sdk/sentry.server.config.js +6 -1
- package/dist/runtime/server/chunk-recovery.d.ts +49 -0
- package/dist/runtime/server/chunk-recovery.js +44 -0
- package/dist/runtime/server/content-wasm.d.ts +13 -0
- package/dist/runtime/server/content-wasm.js +9 -0
- package/dist/runtime/server/csp.d.ts +22 -0
- package/dist/runtime/server/csp.js +18 -0
- package/dist/runtime/server/monitoring/csp.d.ts +12 -0
- package/dist/runtime/server/monitoring/csp.js +19 -0
- package/dist/runtime/server/photo-decoder-csp.d.ts +17 -0
- package/dist/runtime/server/photo-decoder-csp.js +9 -0
- package/dist/runtime/server/protection/csp.d.ts +1 -7
- package/dist/runtime/server/protection/csp.js +4 -17
- package/dist/runtime/test-utils/aliases.d.ts +6 -4
- package/dist/runtime/test-utils/aliases.js +3 -9
- package/dist/runtime/test-utils/base-modules.d.ts +9 -13
- package/dist/runtime/test-utils/install.js +4 -2
- package/dist/runtime/vue/a11y.js +1 -1
- package/dist/runtime/vue/auth-client.d.ts +8 -5
- package/dist/runtime/vue/components/account/AccountData.vue +2 -0
- package/dist/runtime/vue/components/account/AccountDeletion.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.css +1 -1
- package/dist/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPrompt.css +1 -1
- package/dist/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/dist/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/dist/runtime/vue/components/account/EmailUnsubscribe.css +1 -1
- package/dist/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/dist/runtime/vue/components/account/HowDidYouHear.css +1 -1
- package/dist/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/dist/runtime/vue/components/account/KeepAccount.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.css +1 -1
- package/dist/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/dist/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.css +1 -1
- package/dist/runtime/vue/components/account/ProfilePreferencesSection.vue +3 -1
- package/dist/runtime/vue/components/account/ProfileSettings.css +1 -1
- package/dist/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/dist/runtime/vue/components/account/SecurityAlerts.css +1 -1
- package/dist/runtime/vue/components/account/SecurityAlerts.vue +2 -1
- package/dist/runtime/vue/components/account/SecurityPasskeys.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySessions.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.css +1 -1
- package/dist/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/dist/runtime/vue/components/account/security-alerts.d.ts +7 -0
- package/dist/runtime/vue/components/account/security-alerts.js +6 -2
- package/dist/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/dist/runtime/vue/components/admin/AdminAccess.vue +2 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.d.vue.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue +42 -0
- package/dist/runtime/vue/components/admin/AdminAccessMemberTickets.vue.d.ts +7 -0
- package/dist/runtime/vue/components/admin/AdminAnnouncements.css +1 -1
- package/dist/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/dist/runtime/vue/components/admin/AdminChart.css +1 -1
- package/dist/runtime/vue/components/admin/AdminConsole.css +1 -1
- package/dist/runtime/vue/components/admin/AdminExperiments.css +1 -1
- package/dist/runtime/vue/components/admin/AdminFlags.css +1 -1
- package/dist/runtime/vue/components/admin/AdminModeration.d.vue.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue +135 -0
- package/dist/runtime/vue/components/admin/AdminModeration.vue.d.ts +3 -0
- package/dist/runtime/vue/components/admin/AdminQueue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminQueueJob.vue +5 -2
- package/dist/runtime/vue/components/admin/AdminReferrals.css +1 -1
- package/dist/runtime/vue/components/admin/AdminReports.css +1 -1
- package/dist/runtime/vue/components/admin/AdminRevenue.css +1 -1
- package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +30 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +30 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +30 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +30 -0
- package/dist/runtime/vue/components/admin/admin-access-tab.js +2 -1
- package/dist/runtime/vue/components/admin/admin-moderation-tab.d.ts +1 -0
- package/dist/runtime/vue/components/admin/admin-moderation-tab.js +34 -0
- package/dist/runtime/vue/components/admin/admin-revenue-tab.js +4 -1
- package/dist/runtime/vue/components/admin/admin-tabs.js +2 -0
- package/dist/runtime/vue/components/admin/admin.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.css +1 -1
- package/dist/runtime/vue/components/auth/AuthForm.d.vue.ts +7 -0
- package/dist/runtime/vue/components/auth/AuthForm.vue +4 -4
- package/dist/runtime/vue/components/auth/AuthForm.vue.d.ts +7 -0
- package/dist/runtime/vue/components/auth/AuthFormChoose.css +1 -1
- package/dist/runtime/vue/components/auth/AuthFormHeader.css +1 -1
- package/dist/runtime/vue/components/auth/AuthFormPasskeyOffer.css +1 -1
- package/dist/runtime/vue/components/auth/InviteRedeem.css +1 -1
- package/dist/runtime/vue/components/auth/InviteRedeem.vue +95 -8
- package/dist/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.css +1 -1
- package/dist/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/dist/runtime/vue/components/auth/ReauthenticatePasskey.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistForm.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistForm.d.vue.ts +5 -0
- package/dist/runtime/vue/components/auth/WaitlistForm.vue +4 -5
- package/dist/runtime/vue/components/auth/WaitlistForm.vue.d.ts +5 -0
- package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistShare.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistShare.vue +1 -7
- package/dist/runtime/vue/components/auth/WaitlistStatus.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistStatus.vue +120 -23
- package/dist/runtime/vue/components/auth/auth-form.d.ts +1 -1
- package/dist/runtime/vue/components/auth/waitlist-form.js +1 -1
- package/dist/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/dist/runtime/vue/components/billing/BillingHistory.css +1 -1
- package/dist/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/BillingHistoryOrder.css +1 -1
- package/dist/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelConfirmGroup.vue +2 -7
- package/dist/runtime/vue/components/billing/CancelFlow.css +1 -1
- package/dist/runtime/vue/components/billing/CancelFlow.vue +1 -0
- package/dist/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/dist/runtime/vue/components/billing/GiftForm.css +1 -0
- package/dist/runtime/vue/components/billing/GiftForm.d.vue.ts +105 -0
- package/dist/runtime/vue/components/billing/GiftForm.vue +228 -0
- package/dist/runtime/vue/components/billing/GiftForm.vue.d.ts +105 -0
- package/dist/runtime/vue/components/billing/GiftList.css +1 -1
- package/dist/runtime/vue/components/billing/GiftList.d.vue.ts +87 -2
- package/dist/runtime/vue/components/billing/GiftList.vue +7 -4
- package/dist/runtime/vue/components/billing/GiftList.vue.d.ts +87 -2
- package/dist/runtime/vue/components/billing/GiftReceived.vue +11 -3
- package/dist/runtime/vue/components/billing/PlanChangeConfirmGroup.d.vue.ts +7 -0
- package/dist/runtime/vue/components/billing/PlanChangeConfirmGroup.vue +50 -0
- package/dist/runtime/vue/components/billing/PlanChangeConfirmGroup.vue.d.ts +7 -0
- package/dist/runtime/vue/components/billing/PricingChangeConfirm.d.vue.ts +4 -0
- package/dist/runtime/vue/components/billing/PricingChangeConfirm.vue +17 -0
- package/dist/runtime/vue/components/billing/PricingChangeConfirm.vue.d.ts +4 -0
- package/dist/runtime/vue/components/billing/PricingPackCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.css +1 -1
- package/dist/runtime/vue/components/billing/PricingPlanCard.vue +23 -1
- package/dist/runtime/vue/components/billing/PricingTable.css +1 -1
- package/dist/runtime/vue/components/billing/PricingTable.d.vue.ts +26 -2
- package/dist/runtime/vue/components/billing/PricingTable.vue +106 -20
- package/dist/runtime/vue/components/billing/PricingTable.vue.d.ts +26 -2
- package/dist/runtime/vue/components/billing/ReferralCard.css +1 -1
- package/dist/runtime/vue/components/billing/ReferralCard.d.vue.ts +4 -0
- package/dist/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/dist/runtime/vue/components/billing/ReferralCard.vue.d.ts +4 -0
- package/dist/runtime/vue/components/billing/ReferralLanding.css +1 -1
- package/dist/runtime/vue/components/billing/ReferralLanding.vue +44 -2
- package/dist/runtime/vue/components/billing/UpgradePrompt.css +1 -1
- package/dist/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/dist/runtime/vue/components/billing/UsageHistory.css +1 -1
- package/dist/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/dist/runtime/vue/components/billing/WithdrawalButton.css +1 -1
- package/dist/runtime/vue/components/billing/WithdrawalButton.vue +1 -0
- package/dist/runtime/vue/components/billing/cancel-flow.js +2 -1
- package/dist/runtime/vue/components/billing/pricing-table.d.ts +16 -0
- package/dist/runtime/vue/components/billing/withdrawal-button.d.ts +3 -2
- package/dist/runtime/vue/components/billing/withdrawal-button.js +13 -33
- package/dist/runtime/vue/components/shared.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.css +1 -1
- package/dist/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/dist/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/dist/runtime/vue/components/shell/AiLabel.css +1 -1
- package/dist/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/dist/runtime/vue/components/shell/AppShell.css +1 -1
- package/dist/runtime/vue/components/shell/AppShell.vue +3 -0
- package/dist/runtime/vue/components/shell/BackendNotices.vue +1 -0
- package/dist/runtime/vue/components/shell/ConfirmDialog.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/dist/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/dist/runtime/vue/components/shell/ContactForm.css +1 -1
- package/dist/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/dist/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/dist/runtime/vue/components/shell/Gate.css +1 -1
- package/dist/runtime/vue/components/shell/Gate.vue +2 -0
- package/dist/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/dist/runtime/vue/components/shell/LegalCompany.d.vue.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue +23 -0
- package/dist/runtime/vue/components/shell/LegalCompany.vue.d.ts +3 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue +51 -0
- package/dist/runtime/vue/components/shell/LegalContactPoints.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalDetail.d.vue.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue +30 -0
- package/dist/runtime/vue/components/shell/LegalDetail.vue.d.ts +11 -0
- package/dist/runtime/vue/components/shell/LegalDocument.css +1 -1
- package/dist/runtime/vue/components/shell/LegalDocument.vue +49 -13
- package/dist/runtime/vue/components/shell/LegalModeration.d.vue.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue +72 -0
- package/dist/runtime/vue/components/shell/LegalModeration.vue.d.ts +8 -0
- package/dist/runtime/vue/components/shell/LegalProcessors.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalProcessors.vue +46 -15
- package/dist/runtime/vue/components/shell/LegalProcessors.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.d.vue.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalStorage.vue +49 -16
- package/dist/runtime/vue/components/shell/LegalStorage.vue.d.ts +3 -2
- package/dist/runtime/vue/components/shell/LegalVersion.d.vue.ts +10 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue +24 -0
- package/dist/runtime/vue/components/shell/LegalVersion.vue.d.ts +10 -0
- package/dist/runtime/vue/components/shell/NoticeAnnouncement.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeDeletion.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeGift.vue +7 -4
- package/dist/runtime/vue/components/shell/NoticeImpersonation.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeLowCredits.css +1 -1
- package/dist/runtime/vue/components/shell/NoticeMaintenance.css +1 -1
- package/dist/runtime/vue/components/shell/NoticePastDue.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.css +1 -1
- package/dist/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/dist/runtime/vue/components/shell/ReportAppeal.vue +16 -13
- package/dist/runtime/vue/components/shell/ReportNotice.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.css +1 -1
- package/dist/runtime/vue/components/shell/UploadField.d.vue.ts +2 -0
- package/dist/runtime/vue/components/shell/UploadField.vue +16 -3
- package/dist/runtime/vue/components/shell/UploadField.vue.d.ts +2 -0
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.css +1 -1
- package/dist/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/dist/runtime/vue/components/shell/legal.d.ts +35 -4
- package/dist/runtime/vue/components/shell/legal.js +126 -13
- package/dist/runtime/vue/components/shell/report-form.js +1 -44
- package/dist/runtime/vue/components/shell/upload-field.d.ts +3 -1
- package/dist/runtime/vue/components/tokens.css +1 -1
- package/dist/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.css +1 -1
- package/dist/runtime/vue/components/workspaces/AuditLog.d.vue.ts +1 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.vue.d.ts +1 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBilling.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceBilling.vue +29 -50
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingPause.d.vue.ts +3 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingPause.vue +69 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingPause.vue.d.ts +3 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingSwitch.d.vue.ts +3 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingSwitch.vue +54 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceBillingSwitch.vue.d.ts +3 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceCredits.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceList.css +1 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +40 -2
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue +33 -1
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +40 -2
- package/dist/runtime/vue/components/workspaces/workspace-billing.d.ts +39 -2
- package/dist/runtime/vue/components/workspaces/workspace-billing.js +94 -2
- package/dist/runtime/vue/components/workspaces/workspace-settings.d.ts +4 -0
- package/dist/runtime/vue/composables/billing-format.d.ts +9 -4
- package/dist/runtime/vue/composables/billing-format.js +17 -9
- package/dist/runtime/vue/composables/billing-provider.js +3 -2
- package/dist/runtime/vue/composables/prepare-photo.d.ts +75 -0
- package/dist/runtime/vue/composables/prepare-photo.js +223 -0
- package/dist/runtime/vue/composables/use-access.d.ts +72 -6
- package/dist/runtime/vue/composables/use-access.js +57 -2
- package/dist/runtime/vue/composables/use-billing.d.ts +82 -10
- package/dist/runtime/vue/composables/use-billing.js +48 -0
- package/dist/runtime/vue/composables/use-email-link.d.ts +55 -4
- package/dist/runtime/vue/composables/use-email-link.js +9 -9
- package/dist/runtime/vue/composables/use-gift-form.d.ts +123 -0
- package/dist/runtime/vue/composables/use-gift-form.js +169 -0
- package/dist/runtime/vue/composables/use-gift-list.d.ts +44 -4
- package/dist/runtime/vue/composables/use-gift-list.js +13 -5
- package/dist/runtime/vue/composables/use-install-prompt.d.ts +71 -0
- package/dist/runtime/vue/composables/use-install-prompt.js +53 -0
- package/dist/runtime/vue/composables/use-labels.js +29 -30
- package/dist/runtime/vue/composables/use-login-flow.d.ts +9 -0
- package/dist/runtime/vue/composables/use-login-flow.js +8 -1
- package/dist/runtime/vue/composables/use-notifications.js +3 -0
- package/dist/runtime/vue/composables/use-orders.d.ts +1 -1
- package/dist/runtime/vue/composables/use-passkeys.js +2 -2
- package/dist/runtime/vue/composables/use-pricing.d.ts +69 -5
- package/dist/runtime/vue/composables/use-pricing.js +41 -10
- package/dist/runtime/vue/composables/use-push-subscription.js +1 -7
- package/dist/runtime/vue/composables/use-referral-invite.d.ts +48 -4
- package/dist/runtime/vue/composables/use-referral-invite.js +30 -10
- package/dist/runtime/vue/composables/use-referrals.js +2 -1
- package/dist/runtime/vue/composables/use-report-appeal.d.ts +86 -0
- package/dist/runtime/vue/composables/use-report-appeal.js +61 -0
- package/dist/runtime/vue/composables/use-report-form.d.ts +178 -0
- package/dist/runtime/vue/composables/use-report-form.js +278 -0
- package/dist/runtime/vue/composables/use-return-path.d.ts +5 -4
- package/dist/runtime/vue/composables/use-return-path.js +16 -2
- package/dist/runtime/vue/composables/use-sign-in-alerts.d.ts +85 -0
- package/dist/runtime/vue/composables/use-sign-in-alerts.js +70 -0
- package/dist/runtime/vue/composables/use-upload-field.d.ts +32 -6
- package/dist/runtime/vue/composables/use-upload-field.js +75 -36
- package/dist/runtime/vue/composables/use-waitlist.d.ts +21 -2
- package/dist/runtime/vue/composables/use-waitlist.js +29 -5
- package/dist/runtime/vue/composables/use-withdrawal.d.ts +63 -0
- package/dist/runtime/vue/composables/use-withdrawal.js +38 -0
- package/dist/runtime/vue/middleware/page-access.js +2 -2
- package/dist/runtime/vue/pages/gifts.vue +11 -0
- package/dist/runtime/vue/pages/login.vue +5 -7
- package/dist/runtime/vue/pages/report.vue +2 -3
- package/dist/runtime/vue/parts.d.ts +5 -0
- package/dist/runtime/vue/passkey-ceremony.d.ts +42 -0
- package/dist/runtime/vue/passkey-ceremony.js +37 -0
- package/dist/runtime/vue/passkey-client.d.ts +11 -49
- package/dist/runtime/vue/passkey-client.js +2 -34
- package/dist/runtime/vue/plugins/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/plugins/checkout-return.js +1 -1
- package/dist/runtime/vue/plugins/chunk-recovery.client.d.ts +10 -0
- package/dist/runtime/vue/plugins/chunk-recovery.client.js +10 -0
- package/dist/runtime/vue/plugins/install-banner.client.d.ts +7 -0
- package/dist/runtime/vue/plugins/install-banner.client.js +5 -0
- package/dist/runtime/vue/plugins/install-prompt.client.d.ts +7 -0
- package/dist/runtime/vue/plugins/install-prompt.client.js +6 -0
- package/dist/runtime/vue/plugins/passkey-ceremony.d.ts +3 -1
- package/dist/runtime/vue/plugins/passkey-ceremony.js +1 -1
- package/dist/runtime/vue/plugins/session-ended.js +2 -3
- package/dist/runtime/vue/protection/state.d.ts +6 -0
- package/dist/runtime/vue/utils/active-locale.js +8 -0
- package/dist/runtime/vue/utils/auth-session.js +1 -1
- package/dist/runtime/vue/utils/billing-access.d.ts +1 -1
- package/dist/runtime/vue/utils/checkout-return.d.ts +5 -4
- package/dist/runtime/vue/utils/checkout-return.js +3 -3
- package/dist/runtime/vue/utils/confirm-group.d.ts +18 -0
- package/dist/runtime/vue/utils/confirm-group.js +17 -0
- package/dist/runtime/vue/utils/display-mode.d.ts +8 -0
- package/dist/runtime/vue/utils/display-mode.js +11 -0
- package/dist/runtime/vue/utils/heic-absent.d.ts +2 -0
- package/dist/runtime/vue/utils/heic-absent.js +3 -0
- package/dist/runtime/vue/utils/intl.d.ts +12 -4
- package/dist/runtime/vue/utils/intl.js +13 -2
- package/dist/runtime/vue/utils/kept-invite.js +6 -29
- package/dist/runtime/vue/utils/login-bindings.js +1 -1
- package/dist/runtime/vue/utils/page-guard.js +6 -5
- package/dist/runtime/vue/utils/page-origin.d.ts +15 -0
- package/dist/runtime/vue/utils/page-origin.js +8 -0
- package/dist/runtime/vue/utils/page-rules.d.ts +9 -0
- package/dist/runtime/vue/utils/page-rules.js +3 -0
- package/dist/runtime/vue/utils/passkey-prompt.d.ts +12 -0
- package/dist/runtime/vue/utils/passkey-prompt.js +8 -0
- package/dist/runtime/vue/utils/plan-change-confirm.d.ts +76 -0
- package/dist/runtime/vue/utils/plan-change-confirm.js +39 -0
- package/dist/runtime/vue/utils/pricing-bindings.d.ts +7 -1
- package/dist/runtime/vue/utils/pricing-bindings.js +21 -0
- package/dist/runtime/vue/utils/pricing-seo.js +4 -2
- package/dist/runtime/vue/utils/renamed-component.js +1 -1
- package/dist/runtime/vue/utils/tab-keep.d.ts +17 -0
- package/dist/runtime/vue/utils/tab-keep.js +46 -0
- package/dist/shared/{nuxt-backend.KEzfHO2K.mjs → nuxt-backend.9IVxzzft.mjs} +628 -65
- package/dist/shared/{nuxt-backend.ikObmtHs.mjs → nuxt-backend.BCjeoX0x.mjs} +2 -26
- package/dist/shared/{nuxt-backend.DXEf0rrv.mjs → nuxt-backend.Baxb382E.mjs} +1 -1
- package/dist/shared/{nuxt-backend.2m535CLS.mjs → nuxt-backend.BjQoqNIu.mjs} +26 -2
- package/dist/shared/{nuxt-backend.Dm1NkY7v.mjs → nuxt-backend.CbR37s_c.mjs} +371 -53
- package/dist/types.d.ts +1 -1
- package/package.json +18 -13
- package/skills/nuxt-backend/SKILL.md +3 -3
- package/skills/nuxt-backend/references/api.md +118 -32
- package/skills/nuxt-backend/references/renames.json +179 -2015
- package/skills/nuxt-backend/references/surface.json +141 -4
- package/skills/nuxt-backend-ai/SKILL.md +13 -6
- package/skills/nuxt-backend-ai/references/api.md +22 -3
- package/skills/nuxt-backend-auth/references/api.md +21 -4
- package/skills/nuxt-backend-billing/references/api.md +22 -5
- package/skills/nuxt-backend-data/SKILL.md +3 -3
- package/skills/nuxt-backend-data/references/api.md +7 -3
- package/skills/nuxt-backend-email/SKILL.md +5 -2
- package/skills/nuxt-backend-email/references/api.md +3 -1
- package/skills/nuxt-backend-growth/references/api.md +5 -0
- package/skills/nuxt-backend-ship/SKILL.md +15 -23
- package/skills/nuxt-backend-ship/references/api.md +33 -6
- package/skills/nuxt-backend-ship/references/operate.md +28 -0
- package/skills/nuxt-backend-ui/SKILL.md +13 -4
- package/skills/nuxt-backend-upgrade/SKILL.md +20 -14
- package/skills/nuxt-backend-upgrade/references/api.md +2 -2
- package/skills/nuxt-backend-upgrade/references/upgrade.md +56 -414
- package/src/convex/access-tickets.ts +30 -1
- package/src/convex/account-data.ts +26 -3
- package/src/convex/app.ts +16 -2
- package/src/convex/billing-launch.ts +42 -0
- package/src/convex/catalog.ts +33 -2
- package/src/convex/client/code-binding.ts +1 -1
- package/src/convex/client/guards.ts +3 -3
- package/src/convex/client/index.ts +4 -3
- package/src/convex/client/plugins.ts +43 -19
- package/src/convex/components/backend/_generated/api.ts +2 -0
- package/src/convex/components/backend/_generated/component.ts +1327 -286
- package/src/convex/components/backend/access.ts +109 -16
- package/src/convex/components/backend/account.ts +48 -2
- package/src/convex/components/backend/adapter.ts +4 -0
- package/src/convex/components/backend/billing.ts +94 -17
- package/src/convex/components/backend/crons.ts +4 -0
- package/src/convex/components/backend/gifts.ts +2 -2
- package/src/convex/components/backend/jobs.ts +159 -17
- package/src/convex/components/backend/maintenance.ts +14 -1
- package/src/convex/components/backend/moderation.ts +57 -0
- package/src/convex/components/backend/schema.ts +121 -4
- package/src/convex/components/backend/storage.ts +56 -0
- package/src/convex/components/backend/subscriptions.ts +1 -1
- package/src/convex/constants.ts +20 -4
- package/src/convex/delivery.ts +26 -1
- package/src/convex/email-templates.ts +124 -21
- package/src/convex/emails/notification.ts +22 -0
- package/src/convex/emails/renewal-reminder.ts +19 -1
- package/src/convex/errors.ts +86 -16
- package/src/convex/events.ts +11 -4
- package/src/convex/files.ts +48 -6
- package/src/convex/integrations/account.ts +4 -0
- package/src/convex/integrations/ai/chat.ts +9 -9
- package/src/convex/integrations/ai/config.ts +147 -37
- package/src/convex/integrations/ai/context.ts +7 -4
- package/src/convex/integrations/ai/costs.ts +45 -2
- package/src/convex/integrations/ai/embeddings.ts +24 -39
- package/src/convex/integrations/ai/images.ts +155 -0
- package/src/convex/integrations/ai/job-errors.ts +82 -10
- package/src/convex/integrations/ai/jobs.ts +932 -93
- package/src/convex/integrations/ai/knowledge.ts +9 -10
- package/src/convex/integrations/ai/metering.ts +83 -28
- package/src/convex/integrations/ai/model-id.ts +24 -2
- package/src/convex/integrations/ai/models.ts +274 -59
- package/src/convex/integrations/ai/moderation-providers.ts +373 -0
- package/src/convex/integrations/ai/moderation-taxonomy.ts +174 -0
- package/src/convex/integrations/ai/moderation.ts +536 -48
- package/src/convex/integrations/ai/provenance.ts +10 -1
- package/src/convex/integrations/ai/setup.ts +5 -5
- package/src/convex/integrations/ai/stream.ts +4 -3
- package/src/convex/integrations/ai.ts +24 -6
- package/src/convex/integrations/billing/checkout.ts +4 -4
- package/src/convex/integrations/billing/context.ts +38 -3
- package/src/convex/integrations/billing/credits.ts +27 -7
- package/src/convex/integrations/billing/free-plan.ts +120 -24
- package/src/convex/integrations/billing/functions.ts +20 -8
- package/src/convex/integrations/billing/gifts.ts +34 -6
- package/src/convex/integrations/billing/lifecycle.ts +14 -6
- package/src/convex/integrations/billing/passes.ts +5 -13
- package/src/convex/integrations/billing/pricing.ts +43 -5
- package/src/convex/integrations/billing/provider-failure.ts +56 -0
- package/src/convex/integrations/billing/rate-limit.ts +46 -0
- package/src/convex/integrations/billing/referral-orders.ts +1 -1
- package/src/convex/integrations/billing/resync.ts +187 -0
- package/src/convex/integrations/billing/rewards.ts +1 -1
- package/src/convex/integrations/billing/subscriptions.ts +4 -2
- package/src/convex/integrations/billing/types/lifecycle.ts +1 -1
- package/src/convex/integrations/billing/types/records.ts +67 -3
- package/src/convex/integrations/billing/types/setup.ts +7 -6
- package/src/convex/integrations/billing/types/surface.ts +47 -7
- package/src/convex/integrations/billing/webhooks.ts +2 -2
- package/src/convex/integrations/billing/welcome.ts +103 -0
- package/src/convex/integrations/billing.ts +20 -5
- package/src/convex/integrations/email-sync.ts +74 -26
- package/src/convex/integrations/email.ts +17 -2
- package/src/convex/integrations/functions.ts +2 -2
- package/src/convex/integrations/inbound.ts +32 -16
- package/src/convex/integrations/launch.ts +294 -28
- package/src/convex/integrations/notifications.ts +16 -17
- package/src/convex/integrations/rate-limit.ts +18 -3
- package/src/convex/integrations/referrals.ts +25 -7
- package/src/convex/integrations/reports.ts +18 -5
- package/src/convex/integrations/retention.ts +73 -5
- package/src/convex/integrations/storage.ts +198 -7
- package/src/convex/label-format.ts +2 -2
- package/src/convex/label-groups/admin.ts +31 -0
- package/src/convex/label-groups/audit.ts +1 -0
- package/src/convex/label-groups/auth.ts +7 -0
- package/src/convex/label-groups/cancelFlow.ts +2 -2
- package/src/convex/label-groups/email.ts +2 -1
- package/src/convex/label-groups/errors.ts +18 -1
- package/src/convex/label-groups/gift.ts +32 -2
- package/src/convex/label-groups/legal.ts +31 -0
- package/src/convex/label-groups/notifications.ts +5 -3
- package/src/convex/label-groups/pastDue.ts +1 -1
- package/src/convex/label-groups/pricing.ts +24 -0
- package/src/convex/label-groups/referral.ts +6 -2
- package/src/convex/label-groups/report.ts +10 -1
- package/src/convex/label-groups/settings.ts +39 -0
- package/src/convex/label-groups/upload.ts +2 -0
- package/src/convex/label-groups/waitlist.ts +7 -2
- package/src/convex/label-groups/withdrawal.ts +1 -1
- package/src/convex/label-translations.ts +94 -34
- package/src/convex/labels.ts +25 -0
- package/src/convex/legal.ts +35 -4
- package/src/convex/log.ts +20 -1
- package/src/convex/money.ts +40 -0
- package/src/convex/monitoring.ts +6 -4
- package/src/convex/report-rules.ts +19 -0
- package/src/convex/sensitive-actions.ts +1 -0
- package/src/convex/test-billing.ts +189 -0
- package/src/convex/test-models.ts +85 -6
- package/src/convex/test-moderation.ts +122 -0
- package/src/convex/test.ts +492 -8
- package/src/runtime/vue/components/account/AccountData.vue +2 -0
- package/src/runtime/vue/components/account/AccountDeletion.css +2 -1
- package/src/runtime/vue/components/account/ActivationChecklist.css +7 -2
- package/src/runtime/vue/components/account/ActivationChecklist.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPrompt.css +10 -5
- package/src/runtime/vue/components/account/ConsentPromptDialog.vue +1 -0
- package/src/runtime/vue/components/account/ConsentPromptStorage.vue +1 -0
- package/src/runtime/vue/components/account/EmailUnsubscribe.css +10 -2
- package/src/runtime/vue/components/account/EmailUnsubscribe.vue +2 -2
- package/src/runtime/vue/components/account/HowDidYouHear.css +12 -3
- package/src/runtime/vue/components/account/HowDidYouHear.vue +1 -0
- package/src/runtime/vue/components/account/KeepAccount.css +5 -1
- package/src/runtime/vue/components/account/OnboardingFlow.css +8 -3
- package/src/runtime/vue/components/account/OnboardingFlow.vue +1 -0
- package/src/runtime/vue/components/account/ProfileIdentity.css +1 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.css +5 -1
- package/src/runtime/vue/components/account/ProfilePreferencesSection.vue +4 -2
- package/src/runtime/vue/components/account/ProfileSettings.css +5 -1
- package/src/runtime/vue/components/account/ProfileSettings.vue +1 -0
- package/src/runtime/vue/components/account/SecurityAlerts.css +2 -1
- package/src/runtime/vue/components/account/SecurityAlerts.vue +2 -2
- package/src/runtime/vue/components/account/SecurityPasskeys.css +5 -3
- package/src/runtime/vue/components/account/SecuritySessions.css +1 -1
- package/src/runtime/vue/components/account/SecuritySettings.css +2 -1
- package/src/runtime/vue/components/account/SecuritySettings.vue +1 -0
- package/src/runtime/vue/components/admin/AdminAccess.css +1 -1
- package/src/runtime/vue/components/admin/AdminAccess.vue +3 -1
- package/src/runtime/vue/components/admin/AdminAccessMemberTickets.vue +51 -0
- package/src/runtime/vue/components/admin/AdminAnnouncements.css +4 -2
- package/src/runtime/vue/components/admin/AdminBilling.css +1 -1
- package/src/runtime/vue/components/admin/AdminChart.css +2 -1
- package/src/runtime/vue/components/admin/AdminConsole.css +2 -0
- package/src/runtime/vue/components/admin/AdminExperiments.css +2 -1
- package/src/runtime/vue/components/admin/AdminFlags.css +4 -2
- package/src/runtime/vue/components/admin/AdminModeration.vue +148 -0
- package/src/runtime/vue/components/admin/AdminQueue.css +6 -2
- package/src/runtime/vue/components/admin/AdminQueueJob.vue +6 -2
- package/src/runtime/vue/components/admin/AdminReferrals.css +5 -1
- package/src/runtime/vue/components/admin/AdminReports.css +2 -1
- package/src/runtime/vue/components/admin/AdminRevenue.css +2 -1
- package/src/runtime/vue/components/admin/AdminUsers.vue +1 -0
- package/src/runtime/vue/components/admin/AdminWorkspaces.vue +1 -0
- package/src/runtime/vue/components/admin/admin.css +4 -3
- package/src/runtime/vue/components/auth/AuthForm.css +9 -3
- package/src/runtime/vue/components/auth/AuthForm.vue +5 -5
- package/src/runtime/vue/components/auth/AuthFormChoose.css +3 -1
- package/src/runtime/vue/components/auth/AuthFormHeader.css +1 -1
- package/src/runtime/vue/components/auth/AuthFormPasskeyOffer.css +2 -1
- package/src/runtime/vue/components/auth/InviteRedeem.css +57 -1
- package/src/runtime/vue/components/auth/InviteRedeem.vue +110 -9
- package/src/runtime/vue/components/auth/ReauthenticateCode.css +1 -1
- package/src/runtime/vue/components/auth/ReauthenticateDialog.css +9 -2
- package/src/runtime/vue/components/auth/ReauthenticateDialog.vue +3 -2
- package/src/runtime/vue/components/auth/ReauthenticatePasskey.css +1 -1
- package/src/runtime/vue/components/auth/WaitlistForm.css +5 -1
- package/src/runtime/vue/components/auth/WaitlistForm.vue +6 -6
- package/src/runtime/vue/components/auth/WaitlistPlace.css +5 -1
- package/src/runtime/vue/components/auth/WaitlistShare.css +8 -3
- package/src/runtime/vue/components/auth/WaitlistShare.vue +2 -8
- package/src/runtime/vue/components/auth/WaitlistStatus.css +27 -1
- package/src/runtime/vue/components/auth/WaitlistStatus.vue +153 -31
- package/src/runtime/vue/components/billing/BillingCheckoutLink.vue +2 -0
- package/src/runtime/vue/components/billing/BillingHistory.css +3 -2
- package/src/runtime/vue/components/billing/BillingHistory.vue +1 -0
- package/src/runtime/vue/components/billing/BillingHistoryOrder.css +1 -1
- package/src/runtime/vue/components/billing/BillingPortalLink.vue +1 -0
- package/src/runtime/vue/components/billing/CancelConfirmGroup.vue +2 -8
- package/src/runtime/vue/components/billing/CancelFlow.css +10 -4
- package/src/runtime/vue/components/billing/CancelFlow.vue +2 -1
- package/src/runtime/vue/components/billing/CancelFlowEnd.vue +3 -1
- package/src/runtime/vue/components/billing/GiftForm.css +89 -0
- package/src/runtime/vue/components/billing/GiftForm.vue +251 -0
- package/src/runtime/vue/components/billing/GiftList.css +7 -2
- package/src/runtime/vue/components/billing/GiftList.vue +21 -9
- package/src/runtime/vue/components/billing/GiftReceived.vue +11 -3
- package/src/runtime/vue/components/billing/PlanChangeConfirmGroup.vue +59 -0
- package/src/runtime/vue/components/billing/PricingChangeConfirm.vue +22 -0
- package/src/runtime/vue/components/billing/PricingPackCard.css +2 -1
- package/src/runtime/vue/components/billing/PricingPlanCard.css +33 -4
- package/src/runtime/vue/components/billing/PricingPlanCard.vue +25 -3
- package/src/runtime/vue/components/billing/PricingTable.css +2 -2
- package/src/runtime/vue/components/billing/PricingTable.vue +164 -31
- package/src/runtime/vue/components/billing/ReferralCard.css +8 -3
- package/src/runtime/vue/components/billing/ReferralCard.vue +1 -0
- package/src/runtime/vue/components/billing/ReferralLanding.css +16 -2
- package/src/runtime/vue/components/billing/ReferralLanding.vue +54 -3
- package/src/runtime/vue/components/billing/UpgradePrompt.css +8 -3
- package/src/runtime/vue/components/billing/UpgradePrompt.vue +1 -0
- package/src/runtime/vue/components/billing/UsageHistory.css +3 -2
- package/src/runtime/vue/components/billing/UsageHistory.vue +1 -0
- package/src/runtime/vue/components/billing/WithdrawalButton.css +8 -2
- package/src/runtime/vue/components/billing/WithdrawalButton.vue +2 -1
- package/src/runtime/vue/components/shared.css +79 -5
- package/src/runtime/vue/components/shell/AccessDenied.css +7 -2
- package/src/runtime/vue/components/shell/AccessDenied.vue +1 -0
- package/src/runtime/vue/components/shell/AccountMenu.vue +1 -0
- package/src/runtime/vue/components/shell/AiLabel.css +3 -2
- package/src/runtime/vue/components/shell/AiLabel.vue +4 -1
- package/src/runtime/vue/components/shell/AppShell.css +7 -3
- package/src/runtime/vue/components/shell/AppShell.vue +3 -0
- package/src/runtime/vue/components/shell/BackendNotices.vue +3 -2
- package/src/runtime/vue/components/shell/ConfirmDialog.css +7 -2
- package/src/runtime/vue/components/shell/ConnectionStatus.css +1 -1
- package/src/runtime/vue/components/shell/ConnectionStatus.vue +1 -0
- package/src/runtime/vue/components/shell/ContactForm.css +10 -1
- package/src/runtime/vue/components/shell/ContactForm.vue +1 -0
- package/src/runtime/vue/components/shell/FrameMain.vue +2 -0
- package/src/runtime/vue/components/shell/Gate.css +7 -2
- package/src/runtime/vue/components/shell/Gate.vue +2 -0
- package/src/runtime/vue/components/shell/GateQuota.vue +1 -0
- package/src/runtime/vue/components/shell/LegalCompany.vue +38 -0
- package/src/runtime/vue/components/shell/LegalContactPoints.vue +74 -0
- package/src/runtime/vue/components/shell/LegalDetail.vue +54 -0
- package/src/runtime/vue/components/shell/LegalDocument.css +21 -4
- package/src/runtime/vue/components/shell/LegalDocument.vue +54 -15
- package/src/runtime/vue/components/shell/LegalModeration.vue +94 -0
- package/src/runtime/vue/components/shell/LegalProcessors.vue +64 -22
- package/src/runtime/vue/components/shell/LegalStorage.vue +64 -23
- package/src/runtime/vue/components/shell/LegalVersion.vue +44 -0
- package/src/runtime/vue/components/shell/NoticeAnnouncement.css +2 -1
- package/src/runtime/vue/components/shell/NoticeDeletion.css +7 -2
- package/src/runtime/vue/components/shell/NoticeGift.css +2 -1
- package/src/runtime/vue/components/shell/NoticeGift.vue +8 -5
- package/src/runtime/vue/components/shell/NoticeImpersonation.css +2 -1
- package/src/runtime/vue/components/shell/NoticeLowCredits.css +9 -2
- package/src/runtime/vue/components/shell/NoticeMaintenance.css +2 -1
- package/src/runtime/vue/components/shell/NoticePastDue.css +8 -2
- package/src/runtime/vue/components/shell/NoticePastDue.vue +1 -1
- package/src/runtime/vue/components/shell/NotificationInbox.css +8 -4
- package/src/runtime/vue/components/shell/NotificationInbox.vue +1 -0
- package/src/runtime/vue/components/shell/ReportAppeal.vue +17 -14
- package/src/runtime/vue/components/shell/ReportNotice.css +2 -1
- package/src/runtime/vue/components/shell/UploadField.css +6 -2
- package/src/runtime/vue/components/shell/UploadField.vue +21 -5
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.css +7 -2
- package/src/runtime/vue/components/shell/WorkspaceSwitcher.vue +1 -0
- package/src/runtime/vue/components/tokens.css +51 -1
- package/src/runtime/vue/components/workspaces/AcceptInvitation.vue +1 -0
- package/src/runtime/vue/components/workspaces/AuditLog.css +3 -2
- package/src/runtime/vue/components/workspaces/AuditLog.vue +1 -0
- package/src/runtime/vue/components/workspaces/WorkspaceBilling.css +76 -2
- package/src/runtime/vue/components/workspaces/WorkspaceBilling.vue +45 -53
- package/src/runtime/vue/components/workspaces/WorkspaceBillingPause.vue +79 -0
- package/src/runtime/vue/components/workspaces/WorkspaceBillingSwitch.vue +63 -0
- package/src/runtime/vue/components/workspaces/WorkspaceCredits.css +2 -0
- package/src/runtime/vue/components/workspaces/WorkspaceList.css +3 -2
- package/src/runtime/vue/components/workspaces/WorkspaceSettings.vue +48 -4
- package/src/runtime/vue/pages/gifts.vue +21 -5
- package/src/runtime/vue/pages/invite.vue +4 -2
- package/src/runtime/vue/pages/login.vue +8 -8
- package/src/runtime/vue/pages/referral.vue +1 -2
- package/src/runtime/vue/pages/report.vue +2 -3
- package/src/runtime/vue/pages/waitlist.vue +8 -5
- package/dist/devtools-client/_nuxt/CfQg3BRt.js +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readFileSync, existsSync, writeFileSync, lstatSync, readdirSync, mkdirSync, cpSync, unlinkSync, rmSync, symlinkSync, realpathSync, openSync, fstatSync, closeSync, writeSync, fchmodSync, renameSync } from 'node:fs';
|
|
1
|
+
import { readFileSync, existsSync, writeFileSync, lstatSync, readdirSync, mkdirSync, cpSync, unlinkSync, rmSync, symlinkSync, realpathSync, openSync, fstatSync, closeSync, writeSync, fchmodSync, renameSync, statSync } from 'node:fs';
|
|
2
2
|
import { join, dirname, basename, resolve, relative } from 'node:path';
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import { generateKeyPairSync, randomBytes, sign, createHash } from 'node:crypto';
|
|
@@ -35,6 +35,16 @@ const AI_FINDINGS = {
|
|
|
35
35
|
"ai-components": { title: "Chat and knowledge components", prod: "fail" },
|
|
36
36
|
// A sandbox (a public demo) makes no model call without a daily spend limit.
|
|
37
37
|
"ai-spend-limit": { title: "AI spend limit on a sandbox", prod: "fail" },
|
|
38
|
+
// --prod only, off a sandbox: setupAi's daily spendLimit, and the cap of each gateway the order sends calls through, which doctor does not read.
|
|
39
|
+
"ai-gateway-budget": { title: "AI gateway budget" },
|
|
40
|
+
// The default classifier through the Vercel AI Gateway reads text only: a check with images is refused.
|
|
41
|
+
"ai-moderation-images": { title: "Image checks and the safety classifier" },
|
|
42
|
+
// A named moderation provider without its keys, image checks with no known-abuse match, an Azure region outside the EU.
|
|
43
|
+
"ai-moderation-providers": { title: "Moderation providers", prod: "fail" },
|
|
44
|
+
"deployment-content-safety-endpoint": { title: "Deployment CONTENT_SAFETY_ENDPOINT", prod: "fail" },
|
|
45
|
+
"deployment-content-safety-key": { title: "Deployment CONTENT_SAFETY_KEY", prod: "fail" },
|
|
46
|
+
"deployment-second-opinion-key": { title: "Deployment SECOND_OPINION_KEY", prod: "fail" },
|
|
47
|
+
"deployment-known-abuse-key": { title: "Deployment KNOWN_ABUSE_KEY", prod: "fail" },
|
|
38
48
|
"deployment-ai-gateway-api-key": { title: "Deployment AI_GATEWAY_API_KEY", prod: "fail", fixable: true },
|
|
39
49
|
"deployment-provenance-private-key": { title: "Deployment PROVENANCE_PRIVATE_KEY", prod: "fail", fixable: true },
|
|
40
50
|
"deployment-provenance-certificate": { title: "Deployment PROVENANCE_CERTIFICATE", prod: "fail", fixable: true }
|
|
@@ -84,6 +94,12 @@ const BILLING_FINDINGS = {
|
|
|
84
94
|
"billing-portal": { title: "Customer portal" },
|
|
85
95
|
"billing-customer-emails": { title: "Customer emails", fixable: true },
|
|
86
96
|
"billing-team-customers": { title: "Team customers" },
|
|
97
|
+
// The provider's own checkout links that sell a catalog product: deleted in its dashboard, never by `doctor --fix`.
|
|
98
|
+
"billing-checkout-links": { title: "Provider checkout links" },
|
|
99
|
+
// The catalog's prices against the organization's default currency, which the provider wants on every product.
|
|
100
|
+
"billing-currency": { title: "Billing currency" },
|
|
101
|
+
// A plan product the sync found carries the credits and features the catalog gives its plan; `billing sync` attaches what is missing.
|
|
102
|
+
"billing-plan-benefits": { title: "Plan benefits" },
|
|
87
103
|
"billing-gift-twins": { title: "Gift products" },
|
|
88
104
|
"billing-pass-products": { title: "Plan pass products" },
|
|
89
105
|
"billing-feature-benefits": { title: "Feature benefits" },
|
|
@@ -91,7 +107,9 @@ const BILLING_FINDINGS = {
|
|
|
91
107
|
"billing-promotion-portal": { title: "Promotions and plan changes" },
|
|
92
108
|
"billing-provider-sdk": { title: "Billing provider SDK" },
|
|
93
109
|
// --prod only: the catalog against the production ids billing sync wrote.
|
|
94
|
-
"billing-catalog-production": { title: "Production catalog" }
|
|
110
|
+
"billing-catalog-production": { title: "Production catalog" },
|
|
111
|
+
// --prod only: whether billing sells on production yet (a token and a production catalog); before it does, the findings that only say so warn.
|
|
112
|
+
"billing-launch": { title: "Billing launch" }
|
|
95
113
|
};
|
|
96
114
|
|
|
97
115
|
const DEPLOYMENT_FINDINGS = {
|
|
@@ -135,6 +153,8 @@ const MONITORING_FINDINGS = {
|
|
|
135
153
|
"monitoring-backend-exceptions": { title: "Backend exception reporting" },
|
|
136
154
|
// --prod only: probed on the live site.
|
|
137
155
|
"monitoring-health": { title: "Health endpoint" },
|
|
156
|
+
// --prod only: not checked (doctor reads no monitoring account), once the health endpoint answers; says where to set one up.
|
|
157
|
+
"monitoring-uptime": { title: "Uptime monitor" },
|
|
138
158
|
// --prod only: production's usage limits, read with the Convex CLI.
|
|
139
159
|
"monitoring-usage-alerts": { title: "Usage alerts" }
|
|
140
160
|
};
|
|
@@ -165,10 +185,14 @@ const SCAFFOLD_FINDINGS = {
|
|
|
165
185
|
"paths-file": { title: "Paths file", fixable: true },
|
|
166
186
|
// The brand file the module writes from app.config, against app.config.
|
|
167
187
|
"brand-file": { title: "Brand file", fixable: true },
|
|
188
|
+
// The labels file the module writes from app.config, against app.config.
|
|
189
|
+
"labels-file": { title: "Labels file", fixable: true },
|
|
168
190
|
"dev-script": { title: "Dev script", fixable: true },
|
|
169
191
|
"convex-config": { title: "Mounts and routes", fixable: true },
|
|
170
192
|
"function-contract": { title: "Function contract", fixable: true },
|
|
171
193
|
"agent-files": { title: "Agent files" },
|
|
194
|
+
// The app's .env.example against the package's, and against what reads its names.
|
|
195
|
+
"env-example": { title: ".env.example" },
|
|
172
196
|
// Informational: a same-named component is how an app swaps a part.
|
|
173
197
|
"name-collisions": { title: "Name collisions" },
|
|
174
198
|
// From the last `analyze` run, which doctor never makes itself; none until there is one.
|
|
@@ -258,6 +282,15 @@ const DEPLOYMENT_KIND_LABEL = {
|
|
|
258
282
|
"none": "no deployment configured"
|
|
259
283
|
};
|
|
260
284
|
|
|
285
|
+
const GATEWAY_KEY_FIX = {
|
|
286
|
+
dev: "Add AI_GATEWAY_API_KEY to .env.local and run `npx nuxt-backend env push`.",
|
|
287
|
+
prod: "Set production's own AI_GATEWAY_API_KEY on the deployment: `npx convex env set --prod AI_GATEWAY_API_KEY` (env push never sends .env.local's development key to production)."
|
|
288
|
+
};
|
|
289
|
+
const GATEWAY_ORDER_UNREAD = "Doctor cannot read the gateway order";
|
|
290
|
+
function gatewayKeyIsTheFix(finding) {
|
|
291
|
+
return finding.fixHint.startsWith(GATEWAY_KEY_FIX.dev) || finding.fixHint.startsWith(GATEWAY_KEY_FIX.prod);
|
|
292
|
+
}
|
|
293
|
+
|
|
261
294
|
function isSet(context, name) {
|
|
262
295
|
if (context.deployed) return context.deployed.has(name);
|
|
263
296
|
if (context.prod) return false;
|
|
@@ -304,12 +337,16 @@ function emailMode(context) {
|
|
|
304
337
|
return { state: "test", reason: environment ? `BACKEND_ENVIRONMENT is ${environment}: only the provider's test addresses receive mail` : "test mode: only the provider's test addresses receive mail" };
|
|
305
338
|
}
|
|
306
339
|
function modelMode(context) {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
|
|
340
|
+
const route = context.findings.find((finding) => finding.id === "deployment-ai-gateway-api-key");
|
|
341
|
+
if (route?.status !== "warn" && route?.status !== "fail") return null;
|
|
342
|
+
if (route.message.startsWith(GATEWAY_ORDER_UNREAD)) return null;
|
|
343
|
+
const why = gatewayKeyIsTheFix(route) && !isSet(context, "AI_GATEWAY_API_KEY") ? unsetReason(context, ["AI_GATEWAY_API_KEY"]) : "no gateway in setupAi({ gateway }) or a route of setupAi({ routes }) can serve this deployment";
|
|
344
|
+
return { state: "missing", reason: `its models are refused: ${why}` };
|
|
311
345
|
}
|
|
312
346
|
function billingMode(context) {
|
|
347
|
+
if (context.findings.some((finding) => finding.id === "billing-launch" && finding.status === "warn")) {
|
|
348
|
+
return { state: "missing", reason: 'not launched on production yet: nothing can be bought until it holds BILLING_ACCESS_TOKEN and a production catalog, and its pricing reads "Plans open soon"' };
|
|
349
|
+
}
|
|
313
350
|
if (!isSet(context, "BILLING_ACCESS_TOKEN")) return { state: "missing", reason: unsetReason(context, ["BILLING_ACCESS_TOKEN"]) };
|
|
314
351
|
const environment = environmentOf(context);
|
|
315
352
|
if (environment === null) return { state: "test", reason: "BACKEND_ENVIRONMENT is set on the deployment and its value was not read: taken as the sandbox" };
|
|
@@ -446,12 +483,13 @@ const CAPABILITIES = {
|
|
|
446
483
|
purpose: "Metered model calls and streams: each call reserves prepaid credits, runs the model by its provider/model id, then settles at the cost it reports.",
|
|
447
484
|
providers: [
|
|
448
485
|
{ name: "AI SDK", gives: "model calls and streams, by provider/model id" },
|
|
449
|
-
{ name: "
|
|
486
|
+
{ name: "Convex AI Gateway", gives: "every provider's models on a paid Convex plan, billed to the team with no key, and the cost of each call" },
|
|
487
|
+
{ name: "Vercel AI Gateway", gives: "one key for every provider's models, and the cost of each call; setupAi({ gateway }) picks between the two" },
|
|
450
488
|
{ name: "Convex persistent text streaming", gives: "streams that persist server-side and resume after a reload" },
|
|
451
489
|
{ name: "Polar", gives: "the credit meters each call spends" }
|
|
452
490
|
],
|
|
453
491
|
development: "the models themselves, through the Convex AI Gateway or a Vercel AI Gateway key, and credits from the billing sandbox",
|
|
454
|
-
env: ["AI_GATEWAY_API_KEY", "PROVENANCE_PRIVATE_KEY", "PROVENANCE_CERTIFICATE"],
|
|
492
|
+
env: ["AI_GATEWAY_API_KEY", "PROVENANCE_PRIVATE_KEY", "PROVENANCE_CERTIFICATE", "CONTENT_SAFETY_ENDPOINT", "CONTENT_SAFETY_KEY", "SECOND_OPINION_KEY", "KNOWN_ABUSE_KEY"],
|
|
455
493
|
findings: ["ai"],
|
|
456
494
|
docs: "/docs/build/ai",
|
|
457
495
|
devtools: "billing",
|
|
@@ -618,7 +656,7 @@ const BACKEND_ENV = {
|
|
|
618
656
|
},
|
|
619
657
|
BILLING_ACCESS_TOKEN: {
|
|
620
658
|
side: "deployment",
|
|
621
|
-
without:
|
|
659
|
+
without: 'billing reads answer empty; on production billing is not launched (the pricing reads "Plans open soon" and every sale is refused as not_launched), elsewhere a checkout is refused as not_configured',
|
|
622
660
|
values: "an organization access token of the billing provider: a sandbox token outside production, a live one on it",
|
|
623
661
|
dotenv: true,
|
|
624
662
|
findings: ["billing-access", "deployment-billing-access-token", "billing-organization"]
|
|
@@ -633,12 +671,44 @@ const BACKEND_ENV = {
|
|
|
633
671
|
},
|
|
634
672
|
AI_GATEWAY_API_KEY: {
|
|
635
673
|
side: "deployment",
|
|
636
|
-
without: "a provider/model id the backend names goes through the Convex AI Gateway alone, on Convex Cloud with a paid plan and @convex-dev/ai-sdk-provider installed; anywhere else (a free plan, a self-hosted deployment) it is refused when called",
|
|
637
|
-
values: "a Vercel AI Gateway API key:
|
|
674
|
+
without: "a provider/model id the backend names goes through the Convex AI Gateway alone, on Convex Cloud with a paid plan and @convex-dev/ai-sdk-provider installed; anywhere else (a free plan, a self-hosted deployment) it is refused when called. Under setupAi({ gateway: 'vercel' }) it is refused everywhere",
|
|
675
|
+
values: "a Vercel AI Gateway API key: read when setupAi({ gateway }) names 'vercel', as the default order does, after the Convex AI Gateway. Convex runs actions on its own servers, never on Vercel, so the gateway's keyless sign-in never reaches them",
|
|
638
676
|
dotenv: true,
|
|
639
677
|
whenFlagged: true,
|
|
640
678
|
findings: ["deployment-ai-gateway-api-key"]
|
|
641
679
|
},
|
|
680
|
+
CONTENT_SAFETY_ENDPOINT: {
|
|
681
|
+
side: "deployment",
|
|
682
|
+
dotenv: true,
|
|
683
|
+
whenFlagged: true,
|
|
684
|
+
without: "azureContentSafety() refuses every check it is asked for (`unavailable`, reason `not_configured`), so content it would check is refused as unchecked",
|
|
685
|
+
values: "your Azure AI Content Safety resource's endpoint, such as `https://<name>.cognitiveservices.azure.com`: the resource runs in the region you created it in, which `azureContentSafety({ region })` names",
|
|
686
|
+
findings: ["deployment-content-safety-endpoint"]
|
|
687
|
+
},
|
|
688
|
+
CONTENT_SAFETY_KEY: {
|
|
689
|
+
side: "deployment",
|
|
690
|
+
dotenv: true,
|
|
691
|
+
whenFlagged: true,
|
|
692
|
+
without: "as without CONTENT_SAFETY_ENDPOINT: the two call the resource together",
|
|
693
|
+
values: "a key of your Azure AI Content Safety resource (**Keys and Endpoint** in the Azure portal)",
|
|
694
|
+
findings: ["deployment-content-safety-key"]
|
|
695
|
+
},
|
|
696
|
+
SECOND_OPINION_KEY: {
|
|
697
|
+
side: "deployment",
|
|
698
|
+
dotenv: true,
|
|
699
|
+
whenFlagged: true,
|
|
700
|
+
without: "openaiModeration() refuses every check it is asked for, so a score in the gray band is refused as unchecked",
|
|
701
|
+
values: "an OpenAI API key, for its free moderation endpoint (`omni-moderation-latest`), asked only when a score sits just under its threshold",
|
|
702
|
+
findings: ["deployment-second-opinion-key"]
|
|
703
|
+
},
|
|
704
|
+
KNOWN_ABUSE_KEY: {
|
|
705
|
+
side: "deployment",
|
|
706
|
+
dotenv: true,
|
|
707
|
+
whenFlagged: true,
|
|
708
|
+
without: "arachnidShield() refuses every check, so every image the app moderates is refused as unchecked",
|
|
709
|
+
values: "your Project Arachnid Shield credentials, as `username:password`: the account the Canadian Centre for Child Protection gives a vetted organization",
|
|
710
|
+
findings: ["deployment-known-abuse-key"]
|
|
711
|
+
},
|
|
642
712
|
PROVENANCE_PRIVATE_KEY: {
|
|
643
713
|
side: "deployment",
|
|
644
714
|
whenFlagged: true,
|
|
@@ -749,7 +819,7 @@ function counts(name, context) {
|
|
|
749
819
|
const entry = BACKEND_ENV[name];
|
|
750
820
|
if (entry.devOnly) return false;
|
|
751
821
|
if (entry.whenFlagged) {
|
|
752
|
-
return context.findings.some((finding) => entry.findings.includes(finding.id) && (finding.status === "warn" || finding.status === "fail"));
|
|
822
|
+
return context.findings.some((finding) => entry.findings.includes(finding.id) && (finding.status === "warn" || finding.status === "fail") && (name !== "AI_GATEWAY_API_KEY" || gatewayKeyIsTheFix(finding)));
|
|
753
823
|
}
|
|
754
824
|
return entry.side !== "app" && (context.prod === true || !CAPABILITY_SWITCHES.includes(name));
|
|
755
825
|
}
|
|
@@ -815,9 +885,10 @@ const TASK_SKILLS = [
|
|
|
815
885
|
covers: "sign-in, sessions, passkeys, roles, user-scoped functions, workspaces and invitations, invite codes and the waitlist, the admin console with impersonation, the activity trail, consents, and account export and deletion",
|
|
816
886
|
docs: ["/docs/build/auth", "/docs/build/growth/launch"],
|
|
817
887
|
entrypoints: ["nuxt-backend/auth", "nuxt-backend/auth.config", "nuxt-backend/access", "nuxt-backend/audit", "nuxt-backend/account", "nuxt-backend/admin"],
|
|
818
|
-
composables: ["useAuth", "useLoginFlow", "useReturnPath", "useEmailChange", "useWorkspace", "usePasskeys", "useSessions", "useHumanCheck", "useReauthentication", "useAccessPhase", "useInvite", "useAccessAdmin", "useWaitlist", "useWaitlistAdmin", "useAuditLog", "useAccount", "useConsents", "useAdmin"],
|
|
888
|
+
composables: ["useAuth", "useLoginFlow", "useReturnPath", "useEmailChange", "useWorkspace", "usePasskeys", "useSessions", "useSignInAlerts", "useHumanCheck", "useReauthentication", "useAccessPhase", "useInvite", "useMemberTicket", "useAccessAdmin", "useWaitlist", "useWaitlistAdmin", "useAuditLog", "useAccount", "useConsents", "useAdmin"],
|
|
819
889
|
components: ["AuthForm", "WaitlistForm", "ConsentPrompt", "AccessDenied", "AcceptInvitation", "WorkspaceSettings", "ProfileSettings", "SecuritySettings", "ReauthenticateDialog", "AuditLog", "AccountData", "AdminUsers", "AdminWorkspaces"],
|
|
820
890
|
server: ["backendAuth"],
|
|
891
|
+
commands: ["access admit"],
|
|
821
892
|
findings: ["auth", "protection"],
|
|
822
893
|
functions: ["auth", "audit", "account", "admin"]
|
|
823
894
|
},
|
|
@@ -826,9 +897,9 @@ const TASK_SKILLS = [
|
|
|
826
897
|
covers: "the catalog, plans, checkout, the portal, feature gates, plan quotas and credits",
|
|
827
898
|
docs: ["/docs/build/billing"],
|
|
828
899
|
entrypoints: ["nuxt-backend/billing"],
|
|
829
|
-
composables: ["useBilling", "useFeatures", "useCredits", "usePricing", "useOrders", "useUsage"],
|
|
900
|
+
composables: ["useBilling", "useFeatures", "useCredits", "usePricing", "useOrders", "useUsage", "useWithdrawal", "formatBillingAmount"],
|
|
830
901
|
components: ["PricingTable", "BillingCheckoutLink", "BillingPortalLink", "BillingHistory", "UsageHistory", "UpgradePrompt", "CancelFlow", "WithdrawalButton"],
|
|
831
|
-
commands: ["billing sync", "billing reset"],
|
|
902
|
+
commands: ["billing sync", "billing reset", "billing resync"],
|
|
832
903
|
findings: ["billing"],
|
|
833
904
|
functions: ["billing"]
|
|
834
905
|
},
|
|
@@ -836,8 +907,8 @@ const TASK_SKILLS = [
|
|
|
836
907
|
name: "nuxt-backend-growth",
|
|
837
908
|
covers: "launch phases, offers, referrals, gifts, lifecycle email and the funnel",
|
|
838
909
|
docs: ["/docs/build/growth"],
|
|
839
|
-
composables: ["useCampaign", "useGifts", "useOnboarding", "useActivation", "useExperiment", "useReferrals", "useReferralAdmin"],
|
|
840
|
-
components: ["OnboardingFlow", "ActivationChecklist", "HowDidYouHear", "ReferralCard"],
|
|
910
|
+
composables: ["useCampaign", "useGifts", "useGiftForm", "useGiftList", "useOnboarding", "useActivation", "useExperiment", "useReferrals", "useReferralInvite", "useReferralAdmin"],
|
|
911
|
+
components: ["OnboardingFlow", "ActivationChecklist", "HowDidYouHear", "ReferralCard", "GiftForm", "GiftList"],
|
|
841
912
|
findings: ["analytics"]
|
|
842
913
|
},
|
|
843
914
|
{
|
|
@@ -845,7 +916,7 @@ const TASK_SKILLS = [
|
|
|
845
916
|
covers: "transactional email, templates, delivery tracking, the dev inbox and notifications",
|
|
846
917
|
docs: ["/docs/build/email", "/docs/develop/dev-inbox"],
|
|
847
918
|
entrypoints: ["nuxt-backend/email", "nuxt-backend/notifications"],
|
|
848
|
-
composables: ["useEmailStatus", "useSandboxInbox", "useNotifications", "useNotificationInbox", "useEmailPreferences", "usePushSubscription", "useAnnouncements", "useAnnouncementsAdmin", "useContactForm", "useInboxAdmin"],
|
|
919
|
+
composables: ["useEmailStatus", "useSandboxInbox", "useNotifications", "useNotificationInbox", "useEmailPreferences", "useEmailLink", "usePushSubscription", "useInstallPrompt", "useAnnouncements", "useAnnouncementsAdmin", "useContactForm", "useInboxAdmin"],
|
|
849
920
|
components: ["NotificationInbox", "ContactForm"],
|
|
850
921
|
commands: ["inbox", "email sync"],
|
|
851
922
|
findings: ["email", "notifications"],
|
|
@@ -865,7 +936,7 @@ const TASK_SKILLS = [
|
|
|
865
936
|
covers: "the function tiers, queries and mutations, errors, search, workflows, uploads, share links, retention, tokens and the Convex components for counts, queues, cached actions, crons and migrations",
|
|
866
937
|
docs: ["/docs/build/data"],
|
|
867
938
|
entrypoints: ["nuxt-backend/functions", "nuxt-backend/search", "nuxt-backend/workflows", "nuxt-backend/storage"],
|
|
868
|
-
composables: ["getBackendError", "useBackendClient", "useConnectionState", "useSearch", "useWorkflowStatus", "useShareLink", "useUploadField"],
|
|
939
|
+
composables: ["getBackendError", "useBackendClient", "useConnectionState", "useSearch", "useWorkflowStatus", "useShareLink", "useUploadField", "preparePhoto", "isPhotoFile", "PhotoPrepError"],
|
|
869
940
|
components: ["ConnectionStatus", "UploadField"]
|
|
870
941
|
},
|
|
871
942
|
{
|
|
@@ -881,7 +952,8 @@ const TASK_SKILLS = [
|
|
|
881
952
|
covers: "provider setup, tests, deploying, production checks, monitoring, flags and kill switches, webhooks and rate limits",
|
|
882
953
|
docs: ["/docs/services", "/docs/develop/testing", "/docs/ship"],
|
|
883
954
|
entrypoints: ["nuxt-backend/http", "nuxt-backend/rate-limit", "nuxt-backend/monitoring", "nuxt-backend/flags", "nuxt-backend/test", "nuxt-backend/test-utils", "nuxt-backend/eslint"],
|
|
884
|
-
composables: ["useFlag", "useFlagAdmin"],
|
|
955
|
+
composables: ["useFlag", "useFlagAdmin", "useReportForm", "useReportAppeal"],
|
|
956
|
+
components: ["LegalProcessors", "LegalStorage", "LegalDetail", "LegalVersion", "LegalContactPoints", "LegalModeration"],
|
|
885
957
|
commands: ["doctor", "status", "env push", "env rotate", "deploy", "analyze", "mcp"],
|
|
886
958
|
findings: ["monitoring", "site"],
|
|
887
959
|
functions: ["flags", "webhooks"]
|
|
@@ -1281,6 +1353,13 @@ class ConvexCliError extends Error {
|
|
|
1281
1353
|
* whole stderr: the lines the message quotes are its list of the ones it has.
|
|
1282
1354
|
*/
|
|
1283
1355
|
missingFunction;
|
|
1356
|
+
/**
|
|
1357
|
+
* `convex run --component` named a component path the deployment does not
|
|
1358
|
+
* mount: the paths it does mount, read off the whole stderr, where the CLI
|
|
1359
|
+
* lists them (`[]` for a deployment that mounts none). `null` for any
|
|
1360
|
+
* other failure.
|
|
1361
|
+
*/
|
|
1362
|
+
components;
|
|
1284
1363
|
constructor(message, details) {
|
|
1285
1364
|
super(message);
|
|
1286
1365
|
this.name = "ConvexCliError";
|
|
@@ -1289,8 +1368,15 @@ class ConvexCliError extends Error {
|
|
|
1289
1368
|
this.timedOut = details.timedOut;
|
|
1290
1369
|
this.stderrTail = details.stderrTail;
|
|
1291
1370
|
this.missingFunction = details.missingFunction === true;
|
|
1371
|
+
this.components = details.components ?? null;
|
|
1292
1372
|
}
|
|
1293
1373
|
}
|
|
1374
|
+
function listedComponents(stderr) {
|
|
1375
|
+
const text = stripVTControlCharacters(stderr);
|
|
1376
|
+
if (!/Component path ".*" was not found/.test(text)) return null;
|
|
1377
|
+
const [, listing = ""] = text.split(/Available components:/);
|
|
1378
|
+
return listing.split(/\r?\n/).map((line) => /^\s*•\s*(\S+)\s*$/.exec(line)?.[1]).filter((path) => Boolean(path));
|
|
1379
|
+
}
|
|
1294
1380
|
const ENV_SUBCOMMANDS = /* @__PURE__ */ new Set(["set", "list", "get", "remove"]);
|
|
1295
1381
|
function commandName(args) {
|
|
1296
1382
|
const [first, second, third] = args;
|
|
@@ -1357,7 +1443,7 @@ function runConvex(rootDir, args, options = {}) {
|
|
|
1357
1443
|
}, timeout);
|
|
1358
1444
|
const fail = (how, code, signal) => {
|
|
1359
1445
|
const tail = stderrTail(stderr, options.input);
|
|
1360
|
-
reject(new ConvexCliError(tail ? `${command} ${how}: ${tail}` : `${command} ${how}`, { code, signal, timedOut, stderrTail: tail, missingFunction: /Could not find function for /.test(stderr) }));
|
|
1446
|
+
reject(new ConvexCliError(tail ? `${command} ${how}: ${tail}` : `${command} ${how}`, { code, signal, timedOut, stderrTail: tail, missingFunction: /Could not find function for /.test(stderr), components: listedComponents(stderr) }));
|
|
1361
1447
|
};
|
|
1362
1448
|
child.on("error", (error) => {
|
|
1363
1449
|
clearTimeout(timer);
|
|
@@ -1532,7 +1618,7 @@ function walk(node, visit, parent) {
|
|
|
1532
1618
|
if (key !== "loc" && key !== "comments" && !key.endsWith("Comments")) walk(value, visit, isNode ? candidate : parent);
|
|
1533
1619
|
}
|
|
1534
1620
|
}
|
|
1535
|
-
function keyOf(property) {
|
|
1621
|
+
function keyOf$1(property) {
|
|
1536
1622
|
const key = property.key;
|
|
1537
1623
|
if (!key) return void 0;
|
|
1538
1624
|
return key.type === "Identifier" ? key.name : key.type === "StringLiteral" ? key.value : void 0;
|
|
@@ -1550,14 +1636,23 @@ const INTEGRATION_DSN_ENV = "NEXT_PUBLIC_SENTRY_DSN";
|
|
|
1550
1636
|
function appMonitoringDsn(env) {
|
|
1551
1637
|
return env.MONITORING_DSN?.trim() || env[INTEGRATION_DSN_ENV]?.trim() || void 0;
|
|
1552
1638
|
}
|
|
1553
|
-
function
|
|
1639
|
+
function monitoringSdkVersion(rootDir) {
|
|
1554
1640
|
try {
|
|
1555
|
-
createRequire(join(rootDir, "package.json"))
|
|
1556
|
-
return
|
|
1641
|
+
const manifest = createRequire(join(rootDir, "package.json"))(`${MONITORING_SDK}/package.json`);
|
|
1642
|
+
return typeof manifest.version === "string" ? manifest.version : "0.0.0";
|
|
1557
1643
|
} catch {
|
|
1558
|
-
return
|
|
1644
|
+
return null;
|
|
1559
1645
|
}
|
|
1560
1646
|
}
|
|
1647
|
+
function monitoringSdkInstalled(rootDir) {
|
|
1648
|
+
return monitoringSdkVersion(rootDir) !== null;
|
|
1649
|
+
}
|
|
1650
|
+
const TUNNEL_SDK_VERSION = "11.10.0";
|
|
1651
|
+
function sdkServesTunnel(version) {
|
|
1652
|
+
const [major, minor] = (version ?? "").split(".").map((part) => Number.parseInt(part, 10));
|
|
1653
|
+
if (!Number.isFinite(major) || !Number.isFinite(minor)) return false;
|
|
1654
|
+
return major > 11 || major === 11 && minor >= 10;
|
|
1655
|
+
}
|
|
1561
1656
|
function deploysToVercel(rootDir, env) {
|
|
1562
1657
|
return Boolean(env.VERCEL) || existsSync(join(rootDir, ".vercel", "project.json"));
|
|
1563
1658
|
}
|
|
@@ -1571,7 +1666,16 @@ function monitoringDsnFinding(isSet, { prod }) {
|
|
|
1571
1666
|
"Add the DSN to .env.local and run `npx nuxt-backend env push --prod`."
|
|
1572
1667
|
);
|
|
1573
1668
|
}
|
|
1574
|
-
function appFinding(rootDir, env, { dsn,
|
|
1669
|
+
function appFinding(rootDir, env, { dsn, version, prod }) {
|
|
1670
|
+
const sdk = version !== null;
|
|
1671
|
+
if (dsn && sdk && !sdkServesTunnel(version)) {
|
|
1672
|
+
return finding(
|
|
1673
|
+
"monitoring-app",
|
|
1674
|
+
"warn",
|
|
1675
|
+
`${MONITORING_SDK} ${version} is older than ${TUNNEL_SDK_VERSION}: the browser reports straight to the ingest, which ad blockers drop, instead of through the managed tunnel on the app's own origin.`,
|
|
1676
|
+
`Upgrade it: npm install ${MONITORING_SDK}@^${TUNNEL_SDK_VERSION}. The module turns the tunnel on at the next build.`
|
|
1677
|
+
);
|
|
1678
|
+
}
|
|
1575
1679
|
if (dsn) {
|
|
1576
1680
|
return sdk ? finding("monitoring-app", "pass", `The browser and the Nuxt server report errors through ${MONITORING_SDK}.`) : finding("monitoring-app", "warn", `A DSN is set for the app, but ${MONITORING_SDK} is not installed: the browser and the Nuxt server report nothing.`, `Install it: npm install ${MONITORING_SDK}. The module wires it once it is there.`);
|
|
1577
1681
|
}
|
|
@@ -1588,8 +1692,9 @@ function appFinding(rootDir, env, { dsn, sdk, prod }) {
|
|
|
1588
1692
|
}
|
|
1589
1693
|
function monitoringFindings(rootDir, { env, deployed, prod }) {
|
|
1590
1694
|
const dsn = appMonitoringDsn(env);
|
|
1591
|
-
const
|
|
1592
|
-
const
|
|
1695
|
+
const version = monitoringSdkVersion(rootDir);
|
|
1696
|
+
const sdk = version !== null;
|
|
1697
|
+
const findings = [appFinding(rootDir, env, { dsn, version, prod })];
|
|
1593
1698
|
if (dsn && sdk && deploysToVercel(rootDir, env)) {
|
|
1594
1699
|
const unset = SOURCE_MAP_ENV.filter((name) => !env[name]);
|
|
1595
1700
|
findings.push(unset.length === 0 ? finding("monitoring-source-maps", "pass", "A Vercel build uploads its source maps: SENTRY_AUTH_TOKEN, SENTRY_ORG and SENTRY_PROJECT are set.") : finding(
|
|
@@ -1633,7 +1738,16 @@ function usageAlertsFinding(limits, { convexGateway }) {
|
|
|
1633
1738
|
return finding("monitoring-usage-alerts", "pass", `Production warns the team by email once usage passes its limits: ${[...warned].sort().join(", ")}.`);
|
|
1634
1739
|
}
|
|
1635
1740
|
|
|
1636
|
-
|
|
1741
|
+
function routeKeyFor(id, routes) {
|
|
1742
|
+
if (Object.hasOwn(routes, id)) return id;
|
|
1743
|
+
let best;
|
|
1744
|
+
for (const key of Object.keys(routes)) {
|
|
1745
|
+
if (key.endsWith("*") && id.startsWith(key.slice(0, -1)) && (best === void 0 || key.length > best.length)) best = key;
|
|
1746
|
+
}
|
|
1747
|
+
return best;
|
|
1748
|
+
}
|
|
1749
|
+
const DEFAULT_MODERATION_MODEL = "meta-llama/llama-guard-4-12b";
|
|
1750
|
+
const NAMED_MODEL = /\b(?:model|image)\s*(?::|\()\s*(['"`])([a-z0-9][a-z0-9-]*\/[^\s'"`]+)\1/gi;
|
|
1637
1751
|
|
|
1638
1752
|
const DEFAULT_AUTH_ROUTE = "/api/auth";
|
|
1639
1753
|
const RECENT_SIGN_IN_SECONDS = 600;
|
|
@@ -1659,6 +1773,7 @@ const DEFAULT_ADMIN_PATH = "/admin";
|
|
|
1659
1773
|
const HEALTH_ROUTE = "/api/backend/health";
|
|
1660
1774
|
const VISITOR_IP_ROUTE = "/api/backend/visitor-ip";
|
|
1661
1775
|
const LOCAL_LOG_ROUTE = "/api/backend/_monitoring";
|
|
1776
|
+
const RESYNC_ENTITLEMENTS_FUNCTION = "billing:resyncEntitlements";
|
|
1662
1777
|
|
|
1663
1778
|
const DEFAULT_BACKEND_PATHS = Object.freeze({
|
|
1664
1779
|
authRoute: DEFAULT_AUTH_ROUTE,
|
|
@@ -1759,6 +1874,141 @@ async function appBrandOf(config) {
|
|
|
1759
1874
|
}
|
|
1760
1875
|
}
|
|
1761
1876
|
|
|
1877
|
+
const LABELS_FILE = "labels.generated.ts";
|
|
1878
|
+
function keyOf(key) {
|
|
1879
|
+
return /^[A-Z_$][\w$]*$/i.test(key) ? key : quoted$1(key);
|
|
1880
|
+
}
|
|
1881
|
+
function treeLines(tree, indent) {
|
|
1882
|
+
return Object.entries(tree).flatMap(([key, value]) => typeof value === "string" ? [`${indent}${keyOf(key)}: ${quoted$1(value)},`] : [`${indent}${keyOf(key)}: {`, ...treeLines(value, `${indent} `), `${indent}},`]);
|
|
1883
|
+
}
|
|
1884
|
+
function renderLabelsFile(labels) {
|
|
1885
|
+
const lines = treeLines(labels, " ");
|
|
1886
|
+
return [
|
|
1887
|
+
"/* Generated by nuxt-backend from app.config (`backend.labels`) \u2014 do not edit. */",
|
|
1888
|
+
"// The Nuxt module rewrites this file whenever app.config changes a label, and the",
|
|
1889
|
+
"// backend reads it: email.ts passes `labels` on, so emails and notifications say what the pages say. Commit it.",
|
|
1890
|
+
lines.length === 0 ? "export const labels = {}" : "export const labels = {",
|
|
1891
|
+
...lines.length === 0 ? [] : [...lines, "}"],
|
|
1892
|
+
""
|
|
1893
|
+
].join("\n");
|
|
1894
|
+
}
|
|
1895
|
+
const IMPORT_DEPTH = 3;
|
|
1896
|
+
const MODULE_FILES = ["", ".ts", ".mts", ".js", ".mjs", "/index.ts", "/index.js"];
|
|
1897
|
+
function unwrapped(node) {
|
|
1898
|
+
let current = node;
|
|
1899
|
+
while (current && ["TSAsExpression", "TSSatisfiesExpression", "TSNonNullExpression", "ParenthesizedExpression", "TSTypeAssertion"].includes(current.type)) current = current.expression;
|
|
1900
|
+
return current;
|
|
1901
|
+
}
|
|
1902
|
+
function constOf(scope, name) {
|
|
1903
|
+
for (const statement of scope.body) {
|
|
1904
|
+
const declaration = statement.type === "ExportNamedDeclaration" ? statement.declaration : statement;
|
|
1905
|
+
if (declaration?.type !== "VariableDeclaration" || declaration.kind !== "const") continue;
|
|
1906
|
+
const found = declaration.declarations.find((entry) => entry.id.type === "Identifier" && entry.id.name === name);
|
|
1907
|
+
if (found) return found.init;
|
|
1908
|
+
}
|
|
1909
|
+
return void 0;
|
|
1910
|
+
}
|
|
1911
|
+
function importedScope(magicast, scope, specifier) {
|
|
1912
|
+
if (!specifier.startsWith(".") || scope.depth >= IMPORT_DEPTH) return void 0;
|
|
1913
|
+
const base = resolve(dirname(scope.file), specifier);
|
|
1914
|
+
const file = MODULE_FILES.map((extension) => `${base}${extension}`).find((candidate) => /\.[mc]?[jt]s$/.test(candidate) && statSync(candidate, { throwIfNoEntry: false })?.isFile());
|
|
1915
|
+
if (!file) return void 0;
|
|
1916
|
+
const program = parse(magicast, readFileSync(file, "utf-8"));
|
|
1917
|
+
if (typeof program === "string") return void 0;
|
|
1918
|
+
return { file, body: programBody(program), depth: scope.depth + 1 };
|
|
1919
|
+
}
|
|
1920
|
+
function importOf(scope, name) {
|
|
1921
|
+
for (const statement of scope.body) {
|
|
1922
|
+
if (statement.type !== "ImportDeclaration" || statement.importKind === "type") continue;
|
|
1923
|
+
const specifier = statement.specifiers.find((entry) => entry.local.name === name);
|
|
1924
|
+
if (specifier) return { source: statement.source.value, specifier };
|
|
1925
|
+
}
|
|
1926
|
+
return void 0;
|
|
1927
|
+
}
|
|
1928
|
+
function importedValue(magicast, scope, { source, specifier }) {
|
|
1929
|
+
const target = importedScope(magicast, scope, source);
|
|
1930
|
+
if (!target) return void 0;
|
|
1931
|
+
let node;
|
|
1932
|
+
if (specifier.type === "ImportDefaultSpecifier") node = target.body.find((entry) => entry.type === "ExportDefaultDeclaration")?.declaration;
|
|
1933
|
+
else if (specifier.type === "ImportSpecifier") {
|
|
1934
|
+
const imported = specifier.imported;
|
|
1935
|
+
node = constOf(target, imported.type === "Identifier" ? imported.name : imported.value);
|
|
1936
|
+
}
|
|
1937
|
+
return node ? { node, scope: target } : void 0;
|
|
1938
|
+
}
|
|
1939
|
+
function binding(magicast, scope, name) {
|
|
1940
|
+
const own = constOf(scope, name);
|
|
1941
|
+
if (own) return { node: own, scope };
|
|
1942
|
+
const imported = importOf(scope, name);
|
|
1943
|
+
return imported ? importedValue(magicast, scope, imported) : void 0;
|
|
1944
|
+
}
|
|
1945
|
+
const UNSAFE_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
1946
|
+
function keyName(entry) {
|
|
1947
|
+
if (entry.computed) return void 0;
|
|
1948
|
+
const key = entry.key;
|
|
1949
|
+
const name = key.type === "Identifier" ? key.name : key.type === "StringLiteral" ? key.value : void 0;
|
|
1950
|
+
return name === void 0 || UNSAFE_KEYS.has(name) ? void 0 : name;
|
|
1951
|
+
}
|
|
1952
|
+
function entryLabels(magicast, entry, scope, seen) {
|
|
1953
|
+
if (entry.type === "SpreadElement") {
|
|
1954
|
+
const spread = labelValue(magicast, entry.argument, scope, seen);
|
|
1955
|
+
return spread && typeof spread === "object" ? spread : {};
|
|
1956
|
+
}
|
|
1957
|
+
const key = entry.type === "ObjectProperty" ? keyName(entry) : void 0;
|
|
1958
|
+
if (key === void 0) return {};
|
|
1959
|
+
const read = labelValue(magicast, entry.value, scope, seen);
|
|
1960
|
+
return read !== void 0 && (typeof read === "string" || Object.keys(read).length > 0) ? { [key]: read } : {};
|
|
1961
|
+
}
|
|
1962
|
+
function labelValue(magicast, node, scope, seen) {
|
|
1963
|
+
const value = unwrapped(node);
|
|
1964
|
+
if (!value || seen.has(value)) return void 0;
|
|
1965
|
+
const text = literal(value);
|
|
1966
|
+
if (text !== void 0) return text;
|
|
1967
|
+
const inner = /* @__PURE__ */ new Set([...seen, value]);
|
|
1968
|
+
if (value.type === "Identifier") {
|
|
1969
|
+
const bound = binding(magicast, scope, value.name);
|
|
1970
|
+
return bound ? labelValue(magicast, bound.node, bound.scope, inner) : void 0;
|
|
1971
|
+
}
|
|
1972
|
+
if (value.type !== "ObjectExpression") return void 0;
|
|
1973
|
+
return Object.assign({}, ...value.properties.map((entry) => entryLabels(magicast, entry, scope, inner)));
|
|
1974
|
+
}
|
|
1975
|
+
function programBody(program) {
|
|
1976
|
+
return (program.program ?? program).body;
|
|
1977
|
+
}
|
|
1978
|
+
function labelsOfAppConfig(magicast, text, file) {
|
|
1979
|
+
const program = parse(magicast, text);
|
|
1980
|
+
if (typeof program === "string") return {};
|
|
1981
|
+
const scope = { file, body: programBody(program), depth: 0 };
|
|
1982
|
+
const backend = unwrapped(property(exportedObject(program.program ?? program), "backend"));
|
|
1983
|
+
const read = labelValue(magicast, property(backend, "labels"), scope, /* @__PURE__ */ new Set());
|
|
1984
|
+
return read && typeof read === "object" ? read : {};
|
|
1985
|
+
}
|
|
1986
|
+
function mergeUnder(into, layer) {
|
|
1987
|
+
for (const [key, value] of Object.entries(layer)) {
|
|
1988
|
+
if (UNSAFE_KEYS.has(key)) continue;
|
|
1989
|
+
const own = Object.hasOwn(into, key) ? into[key] : void 0;
|
|
1990
|
+
if (own === void 0) into[key] = typeof value === "string" ? value : structuredClone(value);
|
|
1991
|
+
else if (typeof own === "object" && typeof value === "object") mergeUnder(own, value);
|
|
1992
|
+
}
|
|
1993
|
+
}
|
|
1994
|
+
async function readAppLabels(srcDirs) {
|
|
1995
|
+
const magicast = await import('magicast');
|
|
1996
|
+
const labels = {};
|
|
1997
|
+
for (const dir of srcDirs) {
|
|
1998
|
+
const file = APP_CONFIG_FILES.map((name) => join(dir, name)).find(existsSync);
|
|
1999
|
+
if (file) mergeUnder(labels, labelsOfAppConfig(magicast, readFileSync(file, "utf-8"), file));
|
|
2000
|
+
}
|
|
2001
|
+
return labels;
|
|
2002
|
+
}
|
|
2003
|
+
async function appLabelsOf(config) {
|
|
2004
|
+
if (!config) return null;
|
|
2005
|
+
try {
|
|
2006
|
+
return await readAppLabels(brandSourceDirs(config));
|
|
2007
|
+
} catch {
|
|
2008
|
+
return null;
|
|
2009
|
+
}
|
|
2010
|
+
}
|
|
2011
|
+
|
|
1762
2012
|
function definePage(def) {
|
|
1763
2013
|
return def;
|
|
1764
2014
|
}
|
|
@@ -1896,12 +2146,21 @@ function cachingRulesOver(routeRules, paths) {
|
|
|
1896
2146
|
return keys.length && covered.length ? [{ pattern, paths: covered, keys }] : [];
|
|
1897
2147
|
});
|
|
1898
2148
|
}
|
|
2149
|
+
const WHOLE_PARAMETER = /^:\w+(?:\(([^/]*)\))?([?*+]?)$/;
|
|
2150
|
+
function pagePathShape(path) {
|
|
2151
|
+
return normalizePagePath(path).split("/").map((segment) => {
|
|
2152
|
+
const parameter = WHOLE_PARAMETER.exec(segment);
|
|
2153
|
+
if (!parameter) return segment.replace(/(:\w+)\(\)/g, "$1");
|
|
2154
|
+
const [, pattern, modifier] = parameter;
|
|
2155
|
+
return `:${pattern ? `(${pattern})` : ""}${modifier}`;
|
|
2156
|
+
}).join("/");
|
|
2157
|
+
}
|
|
1899
2158
|
function collectExistingPagePaths(pages, parent = "") {
|
|
1900
2159
|
const paths = /* @__PURE__ */ new Set();
|
|
1901
2160
|
for (const page of pages) {
|
|
1902
2161
|
const absolute = page.path.startsWith("/") ? page.path : `${parent}/${page.path}`;
|
|
1903
2162
|
const normalized = normalizePagePath(absolute);
|
|
1904
|
-
paths.add(normalized);
|
|
2163
|
+
paths.add(pagePathShape(normalized));
|
|
1905
2164
|
if (page.children?.length) {
|
|
1906
2165
|
for (const child of collectExistingPagePaths(page.children, normalized === "/" ? "" : normalized)) {
|
|
1907
2166
|
paths.add(child);
|
|
@@ -2102,11 +2361,14 @@ const FEATURE_FILE_TEMPLATES = {
|
|
|
2102
2361
|
// spendLimit is the most a UTC day of model calls may cost the whole app:
|
|
2103
2362
|
// past it, the pause_ai switch turns on until the day ends. Raise it as
|
|
2104
2363
|
// your app grows; a sandbox deployment, a public demo, refuses AI without one.
|
|
2364
|
+
// Model ids go through the Convex AI Gateway on a paid plan, else the Vercel
|
|
2365
|
+
// AI Gateway with AI_GATEWAY_API_KEY: \`gateway: 'convex'\` or \`'vercel'\`
|
|
2366
|
+
// picks one (https://nuxt-backend.dev/docs/services/ai-gateway#choose-a-gateway).
|
|
2105
2367
|
export const ai = setupAi(components, { billing, rateLimiter, spendLimit: { usdPerDay: 10 } })
|
|
2106
2368
|
|
|
2107
|
-
// What each person's AI calls cost
|
|
2108
|
-
// and
|
|
2109
|
-
export const { getCosts } = ai.api
|
|
2369
|
+
// What each person's AI calls cost, and what the safety classifier flagged:
|
|
2370
|
+
// the admin console's Costs and Moderation tabs read them, for administrators only.
|
|
2371
|
+
export const { getCosts, listModerationFlags } = ai.api
|
|
2110
2372
|
|
|
2111
2373
|
// A metered action — swap the echo for your model call. Costs 1 credit
|
|
2112
2374
|
// from the 'credits' meter per call (see billing.catalog.ts).
|
|
@@ -2174,12 +2436,13 @@ const FEATURE_FILE_TEMPLATES = {
|
|
|
2174
2436
|
// lifecycle (each resolves the caller's own billing entity), the order and
|
|
2175
2437
|
// usage history read live from the provider, the admin-only refund and
|
|
2176
2438
|
// revenue metrics (the admin console's Revenue view), the free plan every new
|
|
2177
|
-
// workspace starts on (internal; run by the workpool),
|
|
2439
|
+
// workspace starts on (internal; run by the workpool), the entitlement resync
|
|
2440
|
+
// (internal; \`nuxt-backend billing resync\` runs it), and the gift sweep
|
|
2178
2441
|
// (internal; woken by the component's cron, and scheduled for a gift dated
|
|
2179
2442
|
// for later).
|
|
2180
2443
|
export const {
|
|
2181
2444
|
getPricing, getConfiguredProducts, getBillingAccess, getFeatures, getCredits,
|
|
2182
|
-
getCurrentSubscription, listAllSubscriptions, syncEntitlements, syncProducts, startFreePlan,
|
|
2445
|
+
getCurrentSubscription, listAllSubscriptions, syncEntitlements, syncProducts, startFreePlan, resyncEntitlements,
|
|
2183
2446
|
generateCheckoutLink, generateCustomerPortalUrl,
|
|
2184
2447
|
updateSubscription, cancelSubscription, getCancelFlow, acceptSaveOffer, uncancelSubscription,
|
|
2185
2448
|
cancelPendingChange, pauseSubscription, resumeSubscription,
|
|
@@ -2222,6 +2485,7 @@ const FEATURE_FILE_TEMPLATES = {
|
|
|
2222
2485
|
import { components } from './_generated/api'
|
|
2223
2486
|
import { internalAction } from './_generated/server'
|
|
2224
2487
|
import { brand } from './brand.generated'
|
|
2488
|
+
import { labels } from './labels.generated'
|
|
2225
2489
|
import { paths } from './paths.generated'
|
|
2226
2490
|
|
|
2227
2491
|
// Transactional + marketing email over the backend component's email module.
|
|
@@ -2235,7 +2499,9 @@ const FEATURE_FILE_TEMPLATES = {
|
|
|
2235
2499
|
// \`paths\` (paths.generated.ts) is where an email's unsubscribe link opens, and
|
|
2236
2500
|
// \`brand\` (brand.generated.ts) the name, logo and postal address app.config
|
|
2237
2501
|
// declares (\`backend.brand\`): the emails name the app as its pages do.
|
|
2238
|
-
|
|
2502
|
+
// \`labels\` (labels.generated.ts) are the labels app.config sets
|
|
2503
|
+
// (\`backend.labels\`): emails, notification emails and push say what the pages say.
|
|
2504
|
+
export const email = setupEmail(components, { paths, brand, labels })
|
|
2239
2505
|
|
|
2240
2506
|
// The read behind useEmailStatus, and the DevTools Email tab's previews
|
|
2241
2507
|
// (internal: only the Convex CLI reaches them, on a dev deployment).
|
|
@@ -2341,7 +2607,8 @@ const FEATURE_FILE_TEMPLATES = {
|
|
|
2341
2607
|
// they allowed (PUSH_PUBLIC_KEY and PUSH_PRIVATE_KEY, which env push
|
|
2342
2608
|
// generates). An event of your own joins through notify: record it under
|
|
2343
2609
|
// \`app.\` with audit.recordBackendEvent, say what it becomes here, and give
|
|
2344
|
-
// its words as labels (
|
|
2610
|
+
// its words as labels (app.config's \`backend.labels.notifications\`, which reach
|
|
2611
|
+
// the email and the push through labels.generated.ts):
|
|
2345
2612
|
// notify: { 'app.project_archived': { channels: ['app', 'email', 'push'], link: event => \`/projects/\${event.targetId}\` } }
|
|
2346
2613
|
export const notifications = setupNotifications(components, { email, paths })
|
|
2347
2614
|
|
|
@@ -2560,7 +2827,9 @@ const BACKEND_FILE_TEMPLATES = {
|
|
|
2560
2827
|
// The paths nuxt.config declares, at their defaults until the module writes the app's own.
|
|
2561
2828
|
[PATHS_FILE]: renderPathsFile(DEFAULT_BACKEND_PATHS),
|
|
2562
2829
|
// The brand app.config declares, empty until the module writes the app's own.
|
|
2563
|
-
[BRAND_FILE]: renderBrandFile({})
|
|
2830
|
+
[BRAND_FILE]: renderBrandFile({}),
|
|
2831
|
+
// The labels app.config sets, empty until the module writes the app's own.
|
|
2832
|
+
[LABELS_FILE]: renderLabelsFile({})
|
|
2564
2833
|
};
|
|
2565
2834
|
const DEFAULT_LAYOUT_TEMPLATE = dedent(_a || (_a = __template(['\n <script setup lang="ts">\n // The frame of the app: the header with your brand, the workspace switcher,\n // the notification bell and the account menu, then the app-wide notices and\n // your page. Put your links in the `nav` slot, and your buttons before the\n // account menu in `actions`. `<AppShell :switcher="false">` hides the\n // switcher for an app whose people never share a workspace.\n const { brand } = useBackendConfig()\n <\/script>\n\n <template>\n <AppShell>\n <template #brand>\n <NuxtLink to="/">\n {{ brand.name || \'Your app\' }}\n </NuxtLink>\n </template>\n <slot />\n </AppShell>\n </template>\n '], ['\n <script setup lang="ts">\n // The frame of the app: the header with your brand, the workspace switcher,\n // the notification bell and the account menu, then the app-wide notices and\n // your page. Put your links in the \\`nav\\` slot, and your buttons before the\n // account menu in \\`actions\\`. \\`<AppShell :switcher="false">\\` hides the\n // switcher for an app whose people never share a workspace.\n const { brand } = useBackendConfig()\n <\/script>\n\n <template>\n <AppShell>\n <template #brand>\n <NuxtLink to="/">\n {{ brand.name || \'Your app\' }}\n </NuxtLink>\n </template>\n <slot />\n </AppShell>\n </template>\n ']))) + "\n";
|
|
2566
2835
|
|
|
@@ -2691,6 +2960,164 @@ function pinnedRegion(rootDir) {
|
|
|
2691
2960
|
}
|
|
2692
2961
|
return void 0;
|
|
2693
2962
|
}
|
|
2963
|
+
const GATEWAY_LIST = /^\s*(?:(['"`])(?:convex|vercel)\1\s*(?:,\s*)?)+$/;
|
|
2964
|
+
const GATEWAY_NAME = /['"`](convex|vercel)['"`]/g;
|
|
2965
|
+
const GATEWAY_LITERAL = /^(['"`])(convex|vercel)\1$/;
|
|
2966
|
+
function blanked(code) {
|
|
2967
|
+
const spaces = (token) => token.replace(/[^\n]/g, " ");
|
|
2968
|
+
const plain = code.replace(STRINGS_AND_COMMENTS, (token) => token.startsWith("/") ? spaces(token) : token);
|
|
2969
|
+
const bare = code.replace(STRINGS_AND_COMMENTS, (token) => token.startsWith("/") ? spaces(token) : token[0] + spaces(token.slice(1, -1)) + token.at(-1));
|
|
2970
|
+
return { plain, bare };
|
|
2971
|
+
}
|
|
2972
|
+
const OPEN = "([{";
|
|
2973
|
+
const CLOSE = ")]}";
|
|
2974
|
+
function closing(bare, at) {
|
|
2975
|
+
let depth = 0;
|
|
2976
|
+
for (let index = at; index < bare.length; index++) {
|
|
2977
|
+
if (OPEN.includes(bare[index])) depth++;
|
|
2978
|
+
else if (CLOSE.includes(bare[index]) && --depth === 0) return index;
|
|
2979
|
+
}
|
|
2980
|
+
return -1;
|
|
2981
|
+
}
|
|
2982
|
+
function topLevelParts(bare, from, to) {
|
|
2983
|
+
const parts = [];
|
|
2984
|
+
let depth = 0;
|
|
2985
|
+
let start = from + 1;
|
|
2986
|
+
for (let index = from + 1; index < to; index++) {
|
|
2987
|
+
const char = bare[index];
|
|
2988
|
+
if (OPEN.includes(char)) depth++;
|
|
2989
|
+
else if (CLOSE.includes(char)) depth--;
|
|
2990
|
+
else if (char === "," && depth === 0) {
|
|
2991
|
+
parts.push([start, index]);
|
|
2992
|
+
start = index + 1;
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
if (bare.slice(start, to).trim()) parts.push([start, to]);
|
|
2996
|
+
return parts;
|
|
2997
|
+
}
|
|
2998
|
+
const OPTION_KEY = {
|
|
2999
|
+
gateway: /^(['"`]?)gateway\1\s*(:|$)/,
|
|
3000
|
+
routes: /^(['"`]?)routes\1\s*(:|$)/
|
|
3001
|
+
};
|
|
3002
|
+
function optionOfCall(plain, bare, open, name) {
|
|
3003
|
+
const close = closing(bare, open);
|
|
3004
|
+
if (close < 0) return "unread";
|
|
3005
|
+
const options = topLevelParts(bare, open, close)[1];
|
|
3006
|
+
if (!options) return void 0;
|
|
3007
|
+
const start = options[0] + (bare.slice(options[0], options[1]).length - bare.slice(options[0], options[1]).trimStart().length);
|
|
3008
|
+
if (bare[start] !== "{") return "unread";
|
|
3009
|
+
const end = closing(bare, start);
|
|
3010
|
+
let value;
|
|
3011
|
+
for (const [from, to] of topLevelParts(bare, start, end)) {
|
|
3012
|
+
if (bare.slice(from, to).trim().startsWith("...")) return "unread";
|
|
3013
|
+
const text = plain.slice(from, to).trim();
|
|
3014
|
+
const key = OPTION_KEY[name].exec(text);
|
|
3015
|
+
if (!key) continue;
|
|
3016
|
+
if (!key[2]) return "unread";
|
|
3017
|
+
value = text.slice(key[0].length).trim();
|
|
3018
|
+
}
|
|
3019
|
+
return value;
|
|
3020
|
+
}
|
|
3021
|
+
function orderOfCall(plain, bare, open) {
|
|
3022
|
+
const value = optionOfCall(plain, bare, open, "gateway");
|
|
3023
|
+
if (value === void 0 || value === "unread") return value;
|
|
3024
|
+
const single = GATEWAY_LITERAL.exec(value);
|
|
3025
|
+
if (single) return [single[2]];
|
|
3026
|
+
if (value.startsWith("[") && value.endsWith("]") && GATEWAY_LIST.test(value.slice(1, -1))) return [...new Set([...value.matchAll(GATEWAY_NAME)].map(([, name]) => name))];
|
|
3027
|
+
return "unread";
|
|
3028
|
+
}
|
|
3029
|
+
function chosenGateways(rootDir) {
|
|
3030
|
+
const orders = [];
|
|
3031
|
+
for (const code of backendSources(rootDir)) {
|
|
3032
|
+
const { plain, bare } = blanked(code);
|
|
3033
|
+
for (const call of bare.matchAll(/\bsetupAi\s*\(/g)) orders.push(orderOfCall(plain, bare, call.index + call[0].length - 1));
|
|
3034
|
+
}
|
|
3035
|
+
if (orders.includes("unread")) return "unread";
|
|
3036
|
+
const named = new Set(orders.map((order) => order?.join(",") ?? "convex,vercel"));
|
|
3037
|
+
if (named.size > 1) return "unread";
|
|
3038
|
+
return orders.find((order) => order !== void 0);
|
|
3039
|
+
}
|
|
3040
|
+
function valueEnd(bare, from) {
|
|
3041
|
+
let depth = 0;
|
|
3042
|
+
for (let index = from; index < bare.length; index++) {
|
|
3043
|
+
const char = bare[index];
|
|
3044
|
+
if (OPEN.includes(char)) depth++;
|
|
3045
|
+
else if (CLOSE.includes(char) && depth-- === 0) return index;
|
|
3046
|
+
else if (char === "," && depth === 0) return index;
|
|
3047
|
+
}
|
|
3048
|
+
return bare.length;
|
|
3049
|
+
}
|
|
3050
|
+
function checksImages(rootDir) {
|
|
3051
|
+
return backendSources(rootDir).some((code) => {
|
|
3052
|
+
const { bare } = blanked(code);
|
|
3053
|
+
for (const match of bare.matchAll(/\b(?:moderate|requireSafe)\s*([(:])/g)) {
|
|
3054
|
+
const at = match.index + match[0].length - 1;
|
|
3055
|
+
const end = match[1] === "(" ? closing(bare, at) : valueEnd(bare, at + 1);
|
|
3056
|
+
if (/\bimages\b/.test(bare.slice(at, end < 0 ? bare.length : end))) return true;
|
|
3057
|
+
}
|
|
3058
|
+
return false;
|
|
3059
|
+
});
|
|
3060
|
+
}
|
|
3061
|
+
function namesModerationModel(rootDir) {
|
|
3062
|
+
return backendSources(rootDir).some((code) => {
|
|
3063
|
+
const { bare } = blanked(code);
|
|
3064
|
+
for (const match of bare.matchAll(/\bmoderation\s*:\s*\{/g)) {
|
|
3065
|
+
const open = match.index + match[0].length - 1;
|
|
3066
|
+
if (/\bmodel\b/.test(bare.slice(open, closing(bare, open)))) return true;
|
|
3067
|
+
}
|
|
3068
|
+
return false;
|
|
3069
|
+
});
|
|
3070
|
+
}
|
|
3071
|
+
const ROUTE_ENTRY = /\s*(['"`])([^'"`/]+\/[^'"`]+)\1\s*:\s*(?:(['"`])(convex|vercel)\3|\[([^\]]*)\])\s*(?:,|$)/y;
|
|
3072
|
+
function routeEntries(body) {
|
|
3073
|
+
const routes = {};
|
|
3074
|
+
ROUTE_ENTRY.lastIndex = 0;
|
|
3075
|
+
while (ROUTE_ENTRY.lastIndex < body.length && body.slice(ROUTE_ENTRY.lastIndex).trim() !== "") {
|
|
3076
|
+
const at = ROUTE_ENTRY.lastIndex;
|
|
3077
|
+
const match = ROUTE_ENTRY.exec(body);
|
|
3078
|
+
if (!match || match.index !== at || match[5] !== void 0 && !GATEWAY_LIST.test(match[5])) return void 0;
|
|
3079
|
+
const names = match[4] ? [match[4]] : [...match[5].matchAll(GATEWAY_NAME)].map(([, name]) => name);
|
|
3080
|
+
routes[match[2]] = [...new Set(names)];
|
|
3081
|
+
}
|
|
3082
|
+
return Object.keys(routes).length === 0 ? void 0 : routes;
|
|
3083
|
+
}
|
|
3084
|
+
function routesOfCall(plain, bare, open) {
|
|
3085
|
+
const value = optionOfCall(plain, bare, open, "routes");
|
|
3086
|
+
if (value === void 0 || value === "unread") return value;
|
|
3087
|
+
if (!value.startsWith("{") || !value.endsWith("}")) return "unread";
|
|
3088
|
+
const body = value.slice(1, -1);
|
|
3089
|
+
if (body.trim() === "") return void 0;
|
|
3090
|
+
return routeEntries(body) ?? "unread";
|
|
3091
|
+
}
|
|
3092
|
+
function chosenRoutes(rootDir) {
|
|
3093
|
+
const found = [];
|
|
3094
|
+
for (const code of backendSources(rootDir)) {
|
|
3095
|
+
const { plain, bare } = blanked(code);
|
|
3096
|
+
for (const call of bare.matchAll(/\bsetupAi\s*\(/g)) found.push(routesOfCall(plain, bare, call.index + call[0].length - 1));
|
|
3097
|
+
}
|
|
3098
|
+
if (found.includes("unread")) return "unread";
|
|
3099
|
+
const named = found.filter((routes) => routes !== void 0);
|
|
3100
|
+
if (new Set(named.map((routes) => JSON.stringify(routes))).size > 1) return "unread";
|
|
3101
|
+
return named[0];
|
|
3102
|
+
}
|
|
3103
|
+
const MODERATION_FACTORIES = [
|
|
3104
|
+
[/\bazureContentSafety\s*\(/, { id: "azure-content-safety", env: ["CONTENT_SAFETY_ENDPOINT", "CONTENT_SAFETY_KEY"] }],
|
|
3105
|
+
[/\bopenaiModeration\s*\(/, { id: "openai-moderation", env: ["SECOND_OPINION_KEY"] }],
|
|
3106
|
+
[/\barachnidShield\s*\(/, { id: "arachnid-shield", env: ["KNOWN_ABUSE_KEY"] }]
|
|
3107
|
+
];
|
|
3108
|
+
const AZURE_REGION = /\bazureContentSafety\s*\(\s*\{[^}]*\bregion\s*:\s*(['"`])([\w-]+)\1/;
|
|
3109
|
+
function moderationProviders(rootDir) {
|
|
3110
|
+
const named = /* @__PURE__ */ new Map();
|
|
3111
|
+
for (const code of backendSources(rootDir)) {
|
|
3112
|
+
const { plain, bare } = blanked(code);
|
|
3113
|
+
for (const [call, provider] of MODERATION_FACTORIES) {
|
|
3114
|
+
if (!call.test(bare)) continue;
|
|
3115
|
+
const region = provider.id === "azure-content-safety" ? AZURE_REGION.exec(plain)?.[2] : void 0;
|
|
3116
|
+
named.set(provider.id, { ...provider, ...region ? { region } : {} });
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
3119
|
+
return [...named.values()];
|
|
3120
|
+
}
|
|
2694
3121
|
const PROVENANCE_ON = /\bprovenance\s*:(?!\s*(?:false|undefined)\b)|\.storeImage\s*\(/;
|
|
2695
3122
|
function usesProvenance(rootDir) {
|
|
2696
3123
|
return backendSources(rootDir).some((code) => PROVENANCE_ON.test(code.replace(STRINGS_AND_COMMENTS, (token) => token.startsWith("/") ? "" : token)));
|
|
@@ -2895,6 +3322,7 @@ function notForProduction(name, value) {
|
|
|
2895
3322
|
if (url?.protocol === "https:" && !isLoopbackUrl(url.href)) return null;
|
|
2896
3323
|
return `required \u2014 .env.local's SITE_URL (${value}) is no public https origin: pass production's with --site-url, or set it in the dashboard`;
|
|
2897
3324
|
}
|
|
3325
|
+
if (name === "AI_GATEWAY_API_KEY") return "production's own key, never .env.local's development one: create a key with a budget of its own and set it with `npx convex env set --prod AI_GATEWAY_API_KEY`";
|
|
2898
3326
|
if (name === "PROTECTION_PROOF_SECRET") return "production's own, never .env.local's: generate one (openssl rand -base64 32) and set it on the deployment and in the host's env";
|
|
2899
3327
|
if (name === "PROTECTION_CHALLENGE_SECRET_KEY" && TEST_CHALLENGE_SECRET_KEYS.includes(value.trim())) return ".env.local holds the challenge provider's test secret key, which passes every answer: set production's own key on the deployment";
|
|
2900
3328
|
return null;
|
|
@@ -3308,59 +3736,183 @@ function pathsFileFinding(rootDir, source) {
|
|
|
3308
3736
|
return [finding("paths-file", "warn", problems.join(" "), fixes.join(" "))];
|
|
3309
3737
|
}
|
|
3310
3738
|
|
|
3311
|
-
function
|
|
3739
|
+
function generatedFileLocation(rootDir, file) {
|
|
3312
3740
|
const functionsDir = resolveFunctionsDir(rootDir);
|
|
3313
|
-
return { name: `${functionsDir}/${
|
|
3741
|
+
return { name: `${functionsDir}/${file}`, path: join(rootDir, functionsDir, file) };
|
|
3314
3742
|
}
|
|
3315
|
-
function
|
|
3316
|
-
const { path } =
|
|
3743
|
+
function syncGeneratedFile(rootDir, file, text) {
|
|
3744
|
+
const { path } = generatedFileLocation(rootDir, file);
|
|
3317
3745
|
if (!existsSync(join(path, ".."))) return "no-functions-dir";
|
|
3318
|
-
const text = renderBrandFile(brand);
|
|
3319
3746
|
if (readTextIfPresent(path) === text) return "unchanged";
|
|
3320
3747
|
writeFileSync(path, text);
|
|
3321
3748
|
return "written";
|
|
3322
3749
|
}
|
|
3750
|
+
function generatedFileState(rootDir, file, text) {
|
|
3751
|
+
const { path } = generatedFileLocation(rootDir, file);
|
|
3752
|
+
if (!existsSync(join(path, ".."))) return null;
|
|
3753
|
+
const found = readTextIfPresent(path);
|
|
3754
|
+
return found === void 0 ? "missing" : found === text ? "current" : "stale";
|
|
3755
|
+
}
|
|
3756
|
+
function generatedFileFinding(rootDir, check) {
|
|
3757
|
+
const state = generatedFileState(rootDir, check.file, check.text);
|
|
3758
|
+
if (state === null) return [];
|
|
3759
|
+
const { name } = generatedFileLocation(rootDir, check.file);
|
|
3760
|
+
if (state === "current") return [finding(check.id, "pass", `${name} carries ${check.holds}.`)];
|
|
3761
|
+
const problem = state === "stale" ? `${name} is out of date with ${check.source}` : `${name} is missing`;
|
|
3762
|
+
return [finding(check.id, "warn", `${problem}: ${check.consequence}.`, "Run: npx nuxt-backend doctor --fix (or any `nuxt prepare`, `dev` or `build`), and deploy the functions.")];
|
|
3763
|
+
}
|
|
3764
|
+
|
|
3765
|
+
function brandFileLocation(rootDir) {
|
|
3766
|
+
return generatedFileLocation(rootDir, BRAND_FILE);
|
|
3767
|
+
}
|
|
3768
|
+
function syncBrandFile(rootDir, brand) {
|
|
3769
|
+
return syncGeneratedFile(rootDir, BRAND_FILE, renderBrandFile(brand));
|
|
3770
|
+
}
|
|
3323
3771
|
function brandFileFinding(rootDir, brand) {
|
|
3324
3772
|
if (!brand) return [];
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
return
|
|
3773
|
+
return generatedFileFinding(rootDir, { id: "brand-file", file: BRAND_FILE, text: renderBrandFile(brand), holds: "the brand app.config declares", source: `app.config's \`backend.brand\``, consequence: "the emails name the app otherwise than its pages" });
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
function labelsFileLocation(rootDir) {
|
|
3777
|
+
return generatedFileLocation(rootDir, LABELS_FILE);
|
|
3778
|
+
}
|
|
3779
|
+
function syncLabelsFile(rootDir, labels) {
|
|
3780
|
+
return syncGeneratedFile(rootDir, LABELS_FILE, renderLabelsFile(labels));
|
|
3781
|
+
}
|
|
3782
|
+
function labelsFileFinding(rootDir, labels) {
|
|
3783
|
+
if (!labels) return [];
|
|
3784
|
+
return generatedFileFinding(rootDir, { id: "labels-file", file: LABELS_FILE, text: renderLabelsFile(labels), holds: "the labels app.config sets", source: `app.config's \`backend.labels\``, consequence: "emails and notifications say otherwise than the pages" });
|
|
3330
3785
|
}
|
|
3331
3786
|
|
|
3332
3787
|
const MANIFEST_ROUTE = "/manifest.webmanifest";
|
|
3333
|
-
const
|
|
3788
|
+
const INSTALL_SIZES = [192, 512];
|
|
3789
|
+
const ICON_SETS = [
|
|
3790
|
+
{ 192: "/icon-192.png", 512: "/icon-512.png" },
|
|
3791
|
+
{ 192: "/web-app-manifest-192x192.png", 512: "/web-app-manifest-512x512.png" }
|
|
3792
|
+
];
|
|
3793
|
+
const MASKABLE_ICONS = { 192: "/icon-maskable-192.png", 512: "/icon-maskable-512.png" };
|
|
3794
|
+
const APPLE_TOUCH_ICON = "/apple-touch-icon.png";
|
|
3334
3795
|
const OWN_MANIFESTS = ["manifest.webmanifest", "manifest.json", "site.webmanifest"];
|
|
3335
3796
|
const MANIFEST_MODULES = ["@vite-pwa/nuxt", "@kevinmarrec/nuxt-pwa", "nuxt-pwa-module"];
|
|
3336
|
-
|
|
3797
|
+
const INSTALL_ORIENTATIONS = ["any", "natural", "landscape", "landscape-primary", "landscape-secondary", "portrait", "portrait-primary", "portrait-secondary"];
|
|
3798
|
+
const fileOf = (publicDir, path) => join(publicDir, ...path.replace(/^\/+/, "").split("/"));
|
|
3799
|
+
const present = (publicDir, icons) => INSTALL_SIZES.every((size) => existsSync(fileOf(publicDir, icons[size])));
|
|
3800
|
+
function installIcons(publicDir, options = {}) {
|
|
3801
|
+
return options.icons ?? ICON_SETS.find((set) => present(publicDir, set)) ?? ICON_SETS[0];
|
|
3802
|
+
}
|
|
3803
|
+
function maskableIcons(publicDir, options = {}) {
|
|
3804
|
+
if (options.maskable === true) return installIcons(publicDir, options);
|
|
3805
|
+
if (options.maskable) return present(publicDir, options.maskable) ? options.maskable : null;
|
|
3806
|
+
if (options.maskable === false) return null;
|
|
3807
|
+
return present(publicDir, MASKABLE_ICONS) ? MASKABLE_ICONS : null;
|
|
3808
|
+
}
|
|
3809
|
+
function installableGaps(publicDir, brand, options = {}) {
|
|
3810
|
+
const icons = installIcons(publicDir, options);
|
|
3337
3811
|
return [
|
|
3338
|
-
...
|
|
3812
|
+
...INSTALL_SIZES.filter((size) => !existsSync(fileOf(publicDir, icons[size]))).map((size) => `public${icons[size]} (${size} \xD7 ${size} px)`),
|
|
3339
3813
|
...brand?.name ? [] : ["app.config's `backend.brand.name`"]
|
|
3340
3814
|
];
|
|
3341
3815
|
}
|
|
3342
|
-
function ownsManifest(publicDir, modules) {
|
|
3343
|
-
|
|
3816
|
+
function ownsManifest(publicDir, modules, links = []) {
|
|
3817
|
+
const linked = links.some((link) => typeof link === "object" && link !== null && String(link.rel).split(/\s+/).includes("manifest"));
|
|
3818
|
+
return linked || OWN_MANIFESTS.some((file) => existsSync(join(publicDir, file))) || modules.some((name) => MANIFEST_MODULES.includes(name));
|
|
3344
3819
|
}
|
|
3345
|
-
|
|
3820
|
+
const lightColor = (color) => typeof color === "string" ? color : color?.light;
|
|
3821
|
+
function webAppManifest(name, { icons = ICON_SETS[0], maskable = null, ...options } = {}) {
|
|
3822
|
+
const theme = lightColor(options.themeColor);
|
|
3823
|
+
const background = options.backgroundColor ?? theme;
|
|
3824
|
+
const entries = (pair, purpose) => INSTALL_SIZES.map((size) => ({ src: pair[size], sizes: `${size}x${size}`, type: "image/png", purpose }));
|
|
3346
3825
|
return {
|
|
3826
|
+
...options.id ? { id: options.id } : {},
|
|
3347
3827
|
name,
|
|
3348
3828
|
short_name: name,
|
|
3829
|
+
...options.description ? { description: options.description } : {},
|
|
3830
|
+
...options.lang ? { lang: options.lang } : {},
|
|
3349
3831
|
start_url: "/",
|
|
3350
3832
|
scope: "/",
|
|
3351
3833
|
display: "standalone",
|
|
3352
|
-
|
|
3834
|
+
...options.orientation ? { orientation: options.orientation } : {},
|
|
3835
|
+
...theme ? { theme_color: theme } : {},
|
|
3836
|
+
...background ? { background_color: background } : {},
|
|
3837
|
+
icons: [...entries(icons, "any"), ...maskable ? entries(maskable, "maskable") : []]
|
|
3353
3838
|
};
|
|
3354
3839
|
}
|
|
3355
|
-
function
|
|
3356
|
-
if (
|
|
3357
|
-
|
|
3840
|
+
function themeColorMeta(color) {
|
|
3841
|
+
if (!color) return [];
|
|
3842
|
+
if (typeof color === "string") return [{ name: "theme-color", content: color }];
|
|
3843
|
+
return [
|
|
3844
|
+
{ name: "theme-color", content: color.light, media: "(prefers-color-scheme: light)" },
|
|
3845
|
+
{ name: "theme-color", content: color.dark, media: "(prefers-color-scheme: dark)" }
|
|
3846
|
+
];
|
|
3847
|
+
}
|
|
3848
|
+
function installableFinding(publicDir, brand, { modules, pushKeys, options, links }) {
|
|
3849
|
+
if (options === false || ownsManifest(publicDir, modules, links)) return [];
|
|
3850
|
+
const gaps = installableGaps(publicDir, brand, options);
|
|
3358
3851
|
if (gaps.length === 0) return [finding("installable", "pass", `The app is installable: the module serves ${MANIFEST_ROUTE} for ${brand.name}, with both icons.`)];
|
|
3359
|
-
const
|
|
3852
|
+
const icons = installIcons(publicDir, options);
|
|
3853
|
+
const reaching = INSTALL_SIZES.some((size) => existsSync(fileOf(publicDir, icons[size])));
|
|
3360
3854
|
const message = `The module adds no web app manifest: ${gaps.join(" and ")} ${gaps.length === 1 ? "is" : "are"} missing.${pushKeys ? " iPhone and iPad take web push only once the app is on the Home Screen." : ""}`;
|
|
3361
|
-
const fix =
|
|
3855
|
+
const fix = `Add two square PNG icons with a solid background to public/ (${INSTALL_SIZES.map((size) => icons[size].slice(1)).join(" and ")}), and set backend.brand.name in app.config.`;
|
|
3362
3856
|
return [finding("installable", reaching ? "warn" : "pass", reaching ? message : `Not installable yet (optional): ${gaps.join(" and ")} ${gaps.length === 1 ? "is" : "are"} missing.`, reaching ? fix : "")];
|
|
3363
3857
|
}
|
|
3858
|
+
const COLOR = /^(?:#[\da-f]{3,4}|#[\da-f]{6}|#[\da-f]{8}|[a-z]+|(?:rgba?|hsla?|hwb|lab|lch|oklab|oklch|color)\([^()]*\))$/i;
|
|
3859
|
+
function isPublicPath(value) {
|
|
3860
|
+
return typeof value === "string" && /^\/(?![/\\])/.test(value) && !/^[a-z][\w+.-]*:/i.test(value) && !value.split(/[/\\]/).includes("..");
|
|
3861
|
+
}
|
|
3862
|
+
function isSitePath(value) {
|
|
3863
|
+
return typeof value === "string" && /^\/(?![/\\])/.test(value) && !/\s/.test(value);
|
|
3864
|
+
}
|
|
3865
|
+
function isLanguageTag(value) {
|
|
3866
|
+
if (typeof value !== "string" || value.trim() !== value || value === "") return false;
|
|
3867
|
+
try {
|
|
3868
|
+
return Intl.getCanonicalLocales(value).length === 1;
|
|
3869
|
+
} catch {
|
|
3870
|
+
return false;
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
function pairProblems(key, pair) {
|
|
3874
|
+
if (!pair || typeof pair !== "object" || Array.isArray(pair)) return [`\`installable.${key}\` takes \`{ 192: '/icon-192.png', 512: '/icon-512.png' }\`.`];
|
|
3875
|
+
return INSTALL_SIZES.flatMap((size) => {
|
|
3876
|
+
const path = pair[size];
|
|
3877
|
+
if (path === void 0) return [`\`installable.${key}\` has no ${size} px icon: give both sizes.`];
|
|
3878
|
+
return isPublicPath(path) ? [] : [`\`installable.${key}[${size}]\` is ${JSON.stringify(path)}: give a path of a file in \`public/\`, with one leading \`/\`, never another origin.`];
|
|
3879
|
+
});
|
|
3880
|
+
}
|
|
3881
|
+
function identityProblems(options) {
|
|
3882
|
+
const problems = [];
|
|
3883
|
+
if (options.id !== void 0 && !isSitePath(options.id)) problems.push(`\`installable.id\` is ${JSON.stringify(options.id)}: give a path on the site, with one leading \`/\`, such as '/'.`);
|
|
3884
|
+
if (options.lang !== void 0 && !isLanguageTag(options.lang)) problems.push(`\`installable.lang\` is ${JSON.stringify(options.lang)}: give a language tag, such as 'en' or 'pt-BR'.`);
|
|
3885
|
+
if (options.orientation !== void 0 && !INSTALL_ORIENTATIONS.includes(options.orientation)) problems.push(`\`installable.orientation\` is ${JSON.stringify(options.orientation)}: give one of ${INSTALL_ORIENTATIONS.map((name) => `'${name}'`).join(", ")}.`);
|
|
3886
|
+
return problems;
|
|
3887
|
+
}
|
|
3888
|
+
function valueProblems(options) {
|
|
3889
|
+
return [
|
|
3890
|
+
...options.description === void 0 || typeof options.description === "string" ? [] : ["`installable.description` takes a string."],
|
|
3891
|
+
...options.browserBanner === void 0 || typeof options.browserBanner === "boolean" ? [] : ["`installable.browserBanner` takes `true` or `false`."]
|
|
3892
|
+
];
|
|
3893
|
+
}
|
|
3894
|
+
function installableProblems(value) {
|
|
3895
|
+
if (value === void 0 || value === false) return [];
|
|
3896
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return ["`installable` takes an object of options, or `false` for no manifest."];
|
|
3897
|
+
const options = value;
|
|
3898
|
+
const color = (key, color2) => typeof color2 === "string" && COLOR.test(color2.trim()) ? [] : [`\`installable.${key}\` is ${JSON.stringify(color2)}: give a CSS colour, such as '#ffb900'.`];
|
|
3899
|
+
const theme = options.themeColor;
|
|
3900
|
+
return [
|
|
3901
|
+
...theme === void 0 ? [] : typeof theme === "object" && theme !== null ? [...color("themeColor.light", theme.light), ...color("themeColor.dark", theme.dark)] : color("themeColor", theme),
|
|
3902
|
+
...options.backgroundColor === void 0 ? [] : color("backgroundColor", options.backgroundColor),
|
|
3903
|
+
...valueProblems(options),
|
|
3904
|
+
...identityProblems(options),
|
|
3905
|
+
...options.icons === void 0 ? [] : pairProblems("icons", options.icons),
|
|
3906
|
+
...options.maskable === void 0 || typeof options.maskable === "boolean" ? [] : pairProblems("maskable", options.maskable)
|
|
3907
|
+
];
|
|
3908
|
+
}
|
|
3909
|
+
function namedIconWarnings(publicDir, options = {}) {
|
|
3910
|
+
const missing = (key, pair, outcome) => `\`installable.${key}\` names ${pair[192]} and ${pair[512]}, and public/ does not hold both: ${outcome}`;
|
|
3911
|
+
return [
|
|
3912
|
+
...options.icons && !present(publicDir, options.icons) ? [missing("icons", options.icons, "the module serves no manifest.")] : [],
|
|
3913
|
+
...typeof options.maskable === "object" && !present(publicDir, options.maskable) ? [missing("maskable", options.maskable, "the manifest lists no maskable icon.")] : []
|
|
3914
|
+
];
|
|
3915
|
+
}
|
|
3364
3916
|
|
|
3365
3917
|
const component = (entry) => ({ ...entry, kind: "component" });
|
|
3366
3918
|
const part = (entry) => ({ ...entry, kind: "part" });
|
|
@@ -3423,6 +3975,7 @@ const UI_ENTRIES = [
|
|
|
3423
3975
|
part({ name: "PricingPlanCard", parent: "PricingTable", folder: "billing", capability: "billing" }),
|
|
3424
3976
|
part({ name: "PricingPackCard", parent: "PricingTable", folder: "billing", capability: "billing" }),
|
|
3425
3977
|
part({ name: "PricingCancelConfirm", parent: "PricingTable", folder: "billing", capability: "billing" }),
|
|
3978
|
+
part({ name: "PricingChangeConfirm", parent: "PricingTable", folder: "billing", capability: "billing" }),
|
|
3426
3979
|
part({ name: "PricingEmailOptOut", parent: "PricingTable", folder: "billing", capability: "billing" }),
|
|
3427
3980
|
component({ name: "BillingCheckoutLink", folder: "billing", capability: "billing", unstyled: true }),
|
|
3428
3981
|
component({ name: "BillingPortalLink", folder: "billing", capability: "billing", unstyled: true }),
|
|
@@ -3437,6 +3990,8 @@ const UI_ENTRIES = [
|
|
|
3437
3990
|
part({ name: "CancelFlowConfirm", parent: "CancelFlow", folder: "billing", capability: "billing", unstyled: true }),
|
|
3438
3991
|
part({ name: "CancelFlowEnd", parent: "CancelFlow", folder: "billing", capability: "billing", unstyled: true }),
|
|
3439
3992
|
component({ name: "WithdrawalButton", folder: "billing", capability: "billing" }),
|
|
3993
|
+
component({ name: "GiftForm", folder: "billing", capability: "billing" }),
|
|
3994
|
+
component({ name: "GiftList", folder: "billing", capability: "billing" }),
|
|
3440
3995
|
component({ name: "ReferralCard", folder: "billing", capability: "billing" }),
|
|
3441
3996
|
component({ name: "AdminUsers", folder: "admin", capability: "auth", lazy: true }),
|
|
3442
3997
|
part({ name: "AdminUsersTable", parent: "AdminUsers", folder: "admin", capability: "auth" }),
|
|
@@ -3472,6 +4027,13 @@ const UI_ENTRIES = [
|
|
|
3472
4027
|
part({ name: "AccountMenu", parent: "AppShell", folder: "shell", capability: "auth" }),
|
|
3473
4028
|
part({ name: "WorkspaceSwitcher", parent: "AppShell", folder: "shell", capability: "auth" }),
|
|
3474
4029
|
component({ name: "AiLabel", folder: "shell", capability: "auth" }),
|
|
4030
|
+
// The legal pages' public parts, for a Content page of the app's: the tables read src/convex/legal.ts, styled by LegalDocument.css.
|
|
4031
|
+
component({ name: "LegalProcessors", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
4032
|
+
component({ name: "LegalStorage", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
4033
|
+
component({ name: "LegalDetail", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
4034
|
+
component({ name: "LegalVersion", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
4035
|
+
component({ name: "LegalContactPoints", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
4036
|
+
component({ name: "LegalModeration", folder: "shell", capability: "auth", unstyled: true, global: true }),
|
|
3475
4037
|
internal("ErrorPage", "shell", "auth", { unstyled: true }),
|
|
3476
4038
|
internal("PageFrame", "shell", "auth")
|
|
3477
4039
|
];
|
|
@@ -3490,7 +4052,6 @@ const UI_INTERNALS = [
|
|
|
3490
4052
|
internal("NoticeGift", "shell", "billing"),
|
|
3491
4053
|
internal("NoticeAnnouncement", "shell", "auth"),
|
|
3492
4054
|
internal("NoticePastDue", "shell", "billing"),
|
|
3493
|
-
internal("GiftList", "billing", "billing"),
|
|
3494
4055
|
internal("GiftReceived", "billing", "billing", { unstyled: true }),
|
|
3495
4056
|
internal("GiftSent", "billing", "billing", { unstyled: true }),
|
|
3496
4057
|
internal("GateQuota", "shell", "billing"),
|
|
@@ -3499,6 +4060,9 @@ const UI_INTERNALS = [
|
|
|
3499
4060
|
internal("AccessDeniedPage", "shell", "auth"),
|
|
3500
4061
|
internal("FrameConnectionStatus", "shell", "auth"),
|
|
3501
4062
|
internal("CancelConfirmGroup", "billing", "billing"),
|
|
4063
|
+
internal("PlanChangeConfirmGroup", "billing", "billing"),
|
|
4064
|
+
internal("WorkspaceBillingSwitch", "workspaces", "billing"),
|
|
4065
|
+
internal("WorkspaceBillingPause", "workspaces", "billing"),
|
|
3502
4066
|
internal("PricingPromotion", "billing", "billing"),
|
|
3503
4067
|
internal("PagedList", "shell", "auth"),
|
|
3504
4068
|
internal("FrameMain", "shell", "auth"),
|
|
@@ -3514,8 +4078,7 @@ const UI_INTERNALS = [
|
|
|
3514
4078
|
internal("ReportAppeal", "shell", "auth"),
|
|
3515
4079
|
internal("LegalDocument", "shell", "auth"),
|
|
3516
4080
|
internal("LegalDataMap", "shell", "auth", { unstyled: true }),
|
|
3517
|
-
internal("
|
|
3518
|
-
internal("LegalStorage", "shell", "auth", { unstyled: true }),
|
|
4081
|
+
internal("LegalCompany", "shell", "auth", { unstyled: true }),
|
|
3519
4082
|
internal("ReferralLanding", "billing", "billing"),
|
|
3520
4083
|
internal("ConsentPromptDialog", "account", "auth"),
|
|
3521
4084
|
internal("ConsentPromptItem", "account", "auth"),
|
|
@@ -3559,4 +4122,4 @@ const UI_SHARED_STYLES = [
|
|
|
3559
4122
|
{ file: "admin/admin.css", capability: "auth" }
|
|
3560
4123
|
];
|
|
3561
4124
|
|
|
3562
|
-
export {
|
|
4125
|
+
export { runEnvPush as $, syncBrandFile as A, BACKEND_ENV_NAMES as B, CAPABILITY_STATES as C, DERIVED_DEPLOYMENT_ENV as D, brandFileLocation as E, appLabelsOf as F, syncLabelsFile as G, labelsFileLocation as H, isDevDeploymentId as I, computeDeployment as J, appMonitoringDsn as K, monitoringSdkInstalled as L, MCP_SDK as M, detectCapabilities as N, DEPLOYMENT_KIND_LABEL as O, CAPABILITY_NAMES as P, REGISTERED_UI as Q, RESYNC_ENTITLEMENTS_FUNCTION as R, uiPath as S, BACKEND_PAGE_DEFS as T, installedVersion as U, packageDir as V, uiEntry as W, agentsMdVersion as X, packageVersion as Y, doctorReport as Z, formatPreflightSummary as _, deploymentEnvNames as a, finding as a$, devPushRefusal as a0, pagePathShape as a1, collectPreflightFindings as a2, OPTIONAL_DEPLOYMENT_ENV as a3, REQUIRED_DEPLOYMENT_ENV as a4, deriveDeploymentUrls as a5, provisionedEnvNames as a6, appComponentIsStarter as a7, resolveSiteUrl as a8, needsSetup as a9, maskableIcons as aA, MANIFEST_ROUTE as aB, APPLE_TOUCH_ICON as aC, themeColorMeta as aD, UI_SHARED_STYLES as aE, UI_ENTRIES as aF, UI_INTERNALS as aG, moduleDir as aH, VISITOR_IP_ROUTE as aI, resolvePagePath as aJ, dependencyRange as aK, runsFromSource as aL, resolveConvexCli as aM, RECENT_SIGN_IN_SECONDS as aN, BACKEND_ENV as aO, capabilityOfEnv as aP, REMOVED_DEPLOYMENT_ENV as aQ, mountPagesInAppComponent as aR, ensureDefaultLayout as aS, writeAgentFiles as aT, isDevDeployment as aU, RPC_NAMESPACE as aV, DEVTOOLS_UI_ROUTE as aW, DEVTOOLS_UI_LOCAL_PORT as aX, envNames as aY, DEV_ONLY_DEPLOYMENT_ENV as aZ, DEV_SITE_URL as a_, AGENT_HINT as aa, HEALTH_ROUTE as ab, LOCAL_LOG_ROUTE as ac, monitoringSdkVersion as ad, MONITORING_SDK as ae, TUNNEL_SDK_VERSION as af, SOURCE_MAP_ENV as ag, sdkServesTunnel as ah, installableProblems as ai, pagesOptionProblems as aj, resolvedBackendPages as ak, DEFAULT_AUTH_ROUTE as al, publishedBackendPages as am, isPageOff as an, privatePagePaths as ao, collectExistingPagePaths as ap, adoptChildPages as aq, pageRouteRules as ar, cachingRulesOver as as, PUSH_WORKER_URL as at, ownsManifest as au, MANIFEST_MODULES as av, namedIconWarnings as aw, installableGaps as ax, installIcons as ay, webAppManifest as az, deploymentBackendEnvironment as b, parseBackendEnvironment as b0, proofKeys as b1, TEST_CHALLENGE_SITE_KEYS as b2, deploymentEnvId as b3, protectionTakes as b4, TEST_CHALLENGE_SECRET_KEYS as b5, PROTECTED_AUTH_ROUTES as b6, PROOF_HEADER as b7, signProof as b8, proofAudience as b9, installableFinding as bA, gatewayKeyIsTheFix as bB, DEFAULT_MODERATION_MODEL as bC, mountsComponent as bD, GATEWAY_KEY_FIX as bE, CAPABILITIES as bF, isEnvProvisioned as bG, markEnvProvisioned as bH, readSource as bI, parse as bJ, keyOf$1 as bK, writeSource as bL, REMOVED_ENV as bM, applyEdits as bN, walk as bO, BACKEND_FILE_TEMPLATES as bP, deploymentSiteOrigin as ba, isLocalDeploymentId as bb, capabilityOfGroup as bc, agentFilesFinding as bd, chosenRoutes as be, chosenGateways as bf, pinnedRegion as bg, namedModels as bh, usesProvenance as bi, moderationProviders as bj, monitoringDsnFinding as bk, monitoringFindings as bl, usageAlertsFinding as bm, readUsageLimits as bn, applyProductionPosture as bo, billingWebhookSecretHint as bp, BACKEND_PATH_KEYS as bq, pathOption as br, aiFeatures as bs, pathsFileFinding as bt, brandFileFinding as bu, labelsFileFinding as bv, checksImages as bw, namesModerationModel as bx, GATEWAY_ORDER_UNREAD as by, routeKeyFor as bz, billingEnvironment as c, deploymentFunctionSpec as d, deployKeyType as e, runConvex as f, deploymentFlags as g, ConvexCliError as h, isHttpUrl as i, resolveFunctionsDir as j, readTextIfPresent as k, executeEnvPush as l, generateAuthSecret as m, nonProductionDeployKey as n, setDeploymentEnv as o, isLoopbackUrl as p, configuredDeployment as q, readEnvFiles as r, siteFromCloudUrl as s, spawnConvex as t, scaffoldBackendFiles as u, pathsSourceOf as v, syncPathsFile as w, backendPathsOf as x, pathsFileLocation as y, appBrandOf as z };
|