nuxt-backend 0.5.0 → 0.6.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 +8 -4
- package/dist/capabilities/registry.js +1 -1
- package/dist/chunks/catalog.mjs +1 -1
- package/dist/chunks/{index.mjs → devtools.mjs} +2 -2
- package/dist/chunks/doctor.mjs +14 -6
- package/dist/chunks/email-previews.mjs +1 -1
- package/dist/chunks/health.mjs +2 -2
- package/dist/chunks/install.mjs +4 -4
- package/dist/chunks/run.mjs +1 -1
- package/dist/chunks/server.mjs +15 -4
- package/dist/cli.mjs +28 -8
- package/dist/convex/access-tickets.d.ts +17 -2
- package/dist/convex/access-tickets.d.ts.map +1 -1
- package/dist/convex/account-data.d.ts +4 -4
- package/dist/convex/account-data.d.ts.map +1 -1
- package/dist/convex/account-data.js +5 -4
- package/dist/convex/account-data.js.map +1 -1
- package/dist/convex/app.d.ts +1 -0
- package/dist/convex/app.d.ts.map +1 -1
- package/dist/convex/app.js +2 -1
- package/dist/convex/app.js.map +1 -1
- package/dist/convex/client/better-auth-options.d.ts.map +1 -1
- package/dist/convex/client/better-auth-options.js +12 -3
- package/dist/convex/client/better-auth-options.js.map +1 -1
- package/dist/convex/client/component.d.ts +4 -0
- package/dist/convex/client/component.d.ts.map +1 -1
- package/dist/convex/client/index.d.ts +5 -0
- package/dist/convex/client/index.d.ts.map +1 -1
- package/dist/convex/client/launch-gate.d.ts.map +1 -1
- package/dist/convex/client/launch-gate.js +30 -1
- package/dist/convex/client/launch-gate.js.map +1 -1
- package/dist/convex/client/plugins.d.ts.map +1 -1
- package/dist/convex/client/plugins.js +3 -0
- package/dist/convex/client/plugins.js.map +1 -1
- package/dist/convex/client/two-factor.d.ts +7 -0
- package/dist/convex/client/two-factor.d.ts.map +1 -0
- package/dist/convex/client/two-factor.js +57 -0
- package/dist/convex/client/two-factor.js.map +1 -0
- 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 +292 -10
- package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
- package/dist/convex/components/backend/account.d.ts +63 -17
- package/dist/convex/components/backend/account.d.ts.map +1 -1
- package/dist/convex/components/backend/account.js +24 -1
- package/dist/convex/components/backend/account.js.map +1 -1
- package/dist/convex/components/backend/adapter.d.ts.map +1 -1
- package/dist/convex/components/backend/adapter.js +7 -2
- package/dist/convex/components/backend/adapter.js.map +1 -1
- package/dist/convex/components/backend/ai.d.ts +1 -1
- package/dist/convex/components/backend/billing.d.ts +10 -0
- package/dist/convex/components/backend/billing.d.ts.map +1 -1
- package/dist/convex/components/backend/billing.js +2 -1
- package/dist/convex/components/backend/billing.js.map +1 -1
- package/dist/convex/components/backend/commerce.d.ts +229 -0
- package/dist/convex/components/backend/commerce.d.ts.map +1 -0
- package/dist/convex/components/backend/commerce.js +392 -0
- package/dist/convex/components/backend/commerce.js.map +1 -0
- package/dist/convex/components/backend/funnel.d.ts +6 -6
- package/dist/convex/components/backend/jobs.d.ts +1 -1
- package/dist/convex/components/backend/referrals.d.ts +2 -2
- package/dist/convex/components/backend/schema.d.ts +327 -21
- package/dist/convex/components/backend/schema.d.ts.map +1 -1
- package/dist/convex/components/backend/schema.js +108 -1
- package/dist/convex/components/backend/schema.js.map +1 -1
- package/dist/convex/components/backend/waitlist.d.ts +42 -6
- package/dist/convex/components/backend/waitlist.d.ts.map +1 -1
- package/dist/convex/components/backend/waitlist.js +142 -39
- package/dist/convex/components/backend/waitlist.js.map +1 -1
- package/dist/convex/email-templates.d.ts +12 -0
- package/dist/convex/email-templates.d.ts.map +1 -1
- package/dist/convex/email-templates.js +3 -0
- package/dist/convex/email-templates.js.map +1 -1
- package/dist/convex/emails/waitlist-friend-joined.d.ts +9 -0
- package/dist/convex/emails/waitlist-friend-joined.d.ts.map +1 -0
- package/dist/convex/emails/waitlist-friend-joined.js +22 -0
- package/dist/convex/emails/waitlist-friend-joined.js.map +1 -0
- package/dist/convex/errors.d.ts +6 -6
- package/dist/convex/errors.d.ts.map +1 -1
- package/dist/convex/errors.js +14 -2
- package/dist/convex/errors.js.map +1 -1
- package/dist/convex/events.d.ts +19 -0
- package/dist/convex/events.d.ts.map +1 -1
- package/dist/convex/events.js +14 -0
- package/dist/convex/events.js.map +1 -1
- package/dist/convex/integrations/billing/checkout.d.ts +2 -2
- package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
- package/dist/convex/integrations/billing/checkout.js +79 -11
- package/dist/convex/integrations/billing/checkout.js.map +1 -1
- package/dist/convex/integrations/billing/commerce-entitlements.d.ts +12 -0
- package/dist/convex/integrations/billing/commerce-entitlements.d.ts.map +1 -0
- package/dist/convex/integrations/billing/commerce-entitlements.js +78 -0
- package/dist/convex/integrations/billing/commerce-entitlements.js.map +1 -0
- package/dist/convex/integrations/billing/commerce-events.d.ts +15 -0
- package/dist/convex/integrations/billing/commerce-events.d.ts.map +1 -0
- package/dist/convex/integrations/billing/commerce-events.js +433 -0
- package/dist/convex/integrations/billing/commerce-events.js.map +1 -0
- package/dist/convex/integrations/billing/commerce-history.d.ts +20 -0
- package/dist/convex/integrations/billing/commerce-history.d.ts.map +1 -0
- package/dist/convex/integrations/billing/commerce-history.js +106 -0
- package/dist/convex/integrations/billing/commerce-history.js.map +1 -0
- package/dist/convex/integrations/billing/commerce-webhooks.d.ts +23 -0
- package/dist/convex/integrations/billing/commerce-webhooks.d.ts.map +1 -0
- package/dist/convex/integrations/billing/commerce-webhooks.js +49 -0
- package/dist/convex/integrations/billing/commerce-webhooks.js.map +1 -0
- package/dist/convex/integrations/billing/commerce.d.ts +100 -0
- package/dist/convex/integrations/billing/commerce.d.ts.map +1 -0
- package/dist/convex/integrations/billing/commerce.js +323 -0
- package/dist/convex/integrations/billing/commerce.js.map +1 -0
- 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 +14 -2
- package/dist/convex/integrations/billing/context.js.map +1 -1
- package/dist/convex/integrations/billing/credits.d.ts +1 -1
- package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
- package/dist/convex/integrations/billing/credits.js +49 -28
- package/dist/convex/integrations/billing/credits.js.map +1 -1
- package/dist/convex/integrations/billing/customers.d.ts +1 -1
- package/dist/convex/integrations/billing/customers.d.ts.map +1 -1
- package/dist/convex/integrations/billing/customers.js +15 -1
- package/dist/convex/integrations/billing/customers.js.map +1 -1
- package/dist/convex/integrations/billing/entitlements.d.ts +1 -1
- package/dist/convex/integrations/billing/entitlements.d.ts.map +1 -1
- package/dist/convex/integrations/billing/entitlements.js +6 -1
- package/dist/convex/integrations/billing/entitlements.js.map +1 -1
- package/dist/convex/integrations/billing/erasure.d.ts +1 -1
- package/dist/convex/integrations/billing/erasure.d.ts.map +1 -1
- package/dist/convex/integrations/billing/erasure.js +10 -5
- package/dist/convex/integrations/billing/erasure.js.map +1 -1
- package/dist/convex/integrations/billing/free-plan.d.ts +6 -1
- package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
- package/dist/convex/integrations/billing/free-plan.js +22 -4
- package/dist/convex/integrations/billing/free-plan.js.map +1 -1
- package/dist/convex/integrations/billing/functions.d.ts +1 -1
- package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
- package/dist/convex/integrations/billing/functions.js +3 -2
- package/dist/convex/integrations/billing/functions.js.map +1 -1
- package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
- package/dist/convex/integrations/billing/gifts.js +3 -0
- package/dist/convex/integrations/billing/gifts.js.map +1 -1
- package/dist/convex/integrations/billing/history.d.ts +1 -1
- package/dist/convex/integrations/billing/history.d.ts.map +1 -1
- package/dist/convex/integrations/billing/history.js +6 -1
- package/dist/convex/integrations/billing/history.js.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts +1 -1
- package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
- package/dist/convex/integrations/billing/lifecycle.js +4 -1
- package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
- package/dist/convex/integrations/billing/providers/capabilities.d.ts +17 -0
- package/dist/convex/integrations/billing/providers/capabilities.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/capabilities.js +77 -0
- package/dist/convex/integrations/billing/providers/capabilities.js.map +1 -0
- package/dist/convex/integrations/billing/providers/consent.d.ts +52 -0
- package/dist/convex/integrations/billing/providers/consent.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/consent.js +79 -0
- package/dist/convex/integrations/billing/providers/consent.js.map +1 -0
- package/dist/convex/integrations/billing/providers/creem.d.ts +22 -0
- package/dist/convex/integrations/billing/providers/creem.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/creem.js +208 -0
- package/dist/convex/integrations/billing/providers/creem.js.map +1 -0
- package/dist/convex/integrations/billing/providers/dodo.d.ts +15 -0
- package/dist/convex/integrations/billing/providers/dodo.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/dodo.js +197 -0
- package/dist/convex/integrations/billing/providers/dodo.js.map +1 -0
- package/dist/convex/integrations/billing/providers/http.d.ts +41 -0
- package/dist/convex/integrations/billing/providers/http.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/http.js +146 -0
- package/dist/convex/integrations/billing/providers/http.js.map +1 -0
- package/dist/convex/integrations/billing/providers/index.d.ts +35 -0
- package/dist/convex/integrations/billing/providers/index.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/index.js +62 -0
- package/dist/convex/integrations/billing/providers/index.js.map +1 -0
- package/dist/convex/integrations/billing/providers/stripe.d.ts +28 -0
- package/dist/convex/integrations/billing/providers/stripe.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/stripe.js +327 -0
- package/dist/convex/integrations/billing/providers/stripe.js.map +1 -0
- package/dist/convex/integrations/billing/providers/types.d.ts +263 -0
- package/dist/convex/integrations/billing/providers/types.d.ts.map +1 -0
- package/dist/convex/integrations/billing/providers/types.js +48 -0
- package/dist/convex/integrations/billing/providers/types.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 +20 -6
- package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
- package/dist/convex/integrations/billing/types/setup.d.ts +64 -1
- package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
- package/dist/convex/integrations/billing.d.ts +4 -1
- package/dist/convex/integrations/billing.d.ts.map +1 -1
- package/dist/convex/integrations/billing.js +12 -2
- package/dist/convex/integrations/billing.js.map +1 -1
- package/dist/convex/integrations/email.d.ts +1 -1
- package/dist/convex/integrations/email.d.ts.map +1 -1
- package/dist/convex/integrations/email.js.map +1 -1
- package/dist/convex/integrations/launch.d.ts +27 -2
- package/dist/convex/integrations/launch.d.ts.map +1 -1
- package/dist/convex/integrations/launch.js +15 -3
- package/dist/convex/integrations/launch.js.map +1 -1
- package/dist/convex/integrations/presence.d.ts +110 -0
- package/dist/convex/integrations/presence.d.ts.map +1 -0
- package/dist/convex/integrations/presence.js +92 -0
- package/dist/convex/integrations/presence.js.map +1 -0
- package/dist/convex/integrations/waitlist.d.ts +41 -7
- package/dist/convex/integrations/waitlist.d.ts.map +1 -1
- package/dist/convex/integrations/waitlist.js +45 -6
- package/dist/convex/integrations/waitlist.js.map +1 -1
- package/dist/convex/integrations/webhook-guard.d.ts +8 -0
- package/dist/convex/integrations/webhook-guard.d.ts.map +1 -1
- package/dist/convex/integrations/webhook-guard.js +11 -4
- package/dist/convex/integrations/webhook-guard.js.map +1 -1
- package/dist/convex/label-groups/admin.d.ts +9 -0
- package/dist/convex/label-groups/admin.d.ts.map +1 -1
- package/dist/convex/label-groups/admin.js +9 -0
- package/dist/convex/label-groups/admin.js.map +1 -1
- package/dist/convex/label-groups/audit.d.ts +2 -0
- package/dist/convex/label-groups/audit.d.ts.map +1 -1
- package/dist/convex/label-groups/audit.js +2 -0
- package/dist/convex/label-groups/audit.js.map +1 -1
- package/dist/convex/label-groups/auth.d.ts +9 -0
- package/dist/convex/label-groups/auth.d.ts.map +1 -1
- package/dist/convex/label-groups/auth.js +10 -0
- package/dist/convex/label-groups/auth.js.map +1 -1
- package/dist/convex/label-groups/email.d.ts +6 -0
- package/dist/convex/label-groups/email.d.ts.map +1 -1
- package/dist/convex/label-groups/email.js +7 -0
- package/dist/convex/label-groups/email.js.map +1 -1
- package/dist/convex/label-groups/errors.d.ts +4 -0
- package/dist/convex/label-groups/errors.d.ts.map +1 -1
- package/dist/convex/label-groups/errors.js +4 -0
- package/dist/convex/label-groups/errors.js.map +1 -1
- package/dist/convex/label-groups/security.d.ts +19 -0
- package/dist/convex/label-groups/security.d.ts.map +1 -1
- package/dist/convex/label-groups/security.js +20 -0
- package/dist/convex/label-groups/security.js.map +1 -1
- package/dist/convex/label-groups/waitlist.d.ts +8 -0
- package/dist/convex/label-groups/waitlist.d.ts.map +1 -1
- package/dist/convex/label-groups/waitlist.js +9 -0
- package/dist/convex/label-groups/waitlist.js.map +1 -1
- package/dist/convex/label-translations.d.ts.map +1 -1
- package/dist/convex/label-translations.js +24 -0
- package/dist/convex/label-translations.js.map +1 -1
- package/dist/convex/labels.d.ts +57 -0
- package/dist/convex/labels.d.ts.map +1 -1
- package/dist/convex/log.js +2 -0
- package/dist/convex/log.js.map +1 -1
- package/dist/convex/sensitive-actions.d.ts.map +1 -1
- package/dist/convex/sensitive-actions.js +11 -0
- package/dist/convex/sensitive-actions.js.map +1 -1
- package/dist/convex/waitlist-rules.d.ts +63 -9
- package/dist/convex/waitlist-rules.d.ts.map +1 -1
- package/dist/convex/waitlist-rules.js +38 -7
- package/dist/convex/waitlist-rules.js.map +1 -1
- package/dist/devtools-client/_nuxt/DHNi4uhO.js +6 -0
- package/dist/devtools-client/index.html +1 -1
- package/dist/env-registry.js +9 -0
- package/dist/module.d.ts +14 -2
- package/dist/module.js +2 -2
- package/dist/module.json +2 -2
- package/dist/runtime/locales/de.json +58 -1
- package/dist/runtime/locales/en.json +60 -3
- package/dist/runtime/locales/es.json +58 -1
- package/dist/runtime/locales/fr.json +58 -1
- package/dist/runtime/locales/ru.json +58 -1
- package/dist/runtime/server/monitoring/backend-calls.d.ts +3 -3
- package/dist/runtime/server/monitoring/backend-calls.js +2 -2
- package/dist/runtime/server/monitoring/health.js +2 -2
- package/dist/runtime/vue/auth-client.d.ts +3 -2
- package/dist/runtime/vue/auth-client.js +2 -1
- package/dist/runtime/vue/components/account/SecuritySettings.d.vue.ts +25 -2
- package/dist/runtime/vue/components/account/SecuritySettings.vue +52 -2
- package/dist/runtime/vue/components/account/SecuritySettings.vue.d.ts +25 -2
- package/dist/runtime/vue/components/account/SecurityTwoFactor.css +1 -0
- package/dist/runtime/vue/components/account/SecurityTwoFactor.d.vue.ts +4 -0
- package/dist/runtime/vue/components/account/SecurityTwoFactor.vue +107 -0
- package/dist/runtime/vue/components/account/SecurityTwoFactor.vue.d.ts +4 -0
- package/dist/runtime/vue/components/account/security-settings.d.ts +18 -1
- package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +11 -2
- package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +11 -2
- package/dist/runtime/vue/components/admin/AdminWaitlist.css +1 -1
- package/dist/runtime/vue/components/admin/AdminWaitlistActions.vue +41 -1
- package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +9 -0
- package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +9 -0
- package/dist/runtime/vue/components/admin/admin-waitlist-tab.js +28 -0
- package/dist/runtime/vue/components/auth/AuthForm.d.vue.ts +9 -0
- package/dist/runtime/vue/components/auth/AuthForm.vue +8 -0
- package/dist/runtime/vue/components/auth/AuthForm.vue.d.ts +9 -0
- package/dist/runtime/vue/components/auth/AuthFormTwoFactor.css +1 -0
- package/dist/runtime/vue/components/auth/AuthFormTwoFactor.d.vue.ts +3 -0
- package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue +70 -0
- package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue.d.ts +3 -0
- package/dist/runtime/vue/components/auth/AuthFormWaitlisted.vue +7 -2
- package/dist/runtime/vue/components/auth/WaitlistForm.d.vue.ts +8 -0
- package/dist/runtime/vue/components/auth/WaitlistForm.vue.d.ts +8 -0
- package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
- package/dist/runtime/vue/components/auth/WaitlistPlace.vue +37 -0
- package/dist/runtime/vue/components/auth/WaitlistShare.vue +2 -2
- package/dist/runtime/vue/components/auth/auth-form.d.ts +2 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.d.vue.ts +2 -0
- package/dist/runtime/vue/components/workspaces/AuditLog.vue.d.ts +2 -0
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
- package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
- package/dist/runtime/vue/composables/use-login-flow.d.ts +19 -4
- package/dist/runtime/vue/composables/use-login-flow.js +31 -0
- package/dist/runtime/vue/composables/use-room-presence.d.ts +63 -0
- package/dist/runtime/vue/composables/use-room-presence.js +31 -0
- package/dist/runtime/vue/composables/use-two-factor.d.ts +58 -0
- package/dist/runtime/vue/composables/use-two-factor.js +49 -0
- package/dist/runtime/vue/composables/use-waitlist-admin.d.ts +5 -0
- package/dist/runtime/vue/composables/use-waitlist-admin.js +5 -1
- package/dist/runtime/vue/composables/use-waitlist.d.ts +4 -0
- package/dist/runtime/vue/composables/use-waitlist.js +1 -1
- package/dist/runtime/vue/parts.d.ts +8 -1
- package/dist/runtime/vue/two-factor-client.d.ts +15 -0
- package/dist/runtime/vue/two-factor-client.js +19 -0
- package/dist/runtime/vue/utils/auth-session.js +10 -1
- package/dist/runtime/vue/utils/login-bindings.js +1 -0
- package/dist/runtime/vue/utils/page-guard.d.ts +2 -2
- package/dist/runtime/vue/utils/page-guard.js +2 -2
- package/dist/shared/{nuxt-backend.CBvrM7pG.mjs → nuxt-backend.CM_p0XQE.mjs} +1 -1
- package/dist/shared/{nuxt-backend.Dikfaocl.mjs → nuxt-backend.C_Y_BtBs.mjs} +128 -5
- package/dist/shared/{nuxt-backend.DbaXvH__.mjs → nuxt-backend.ChvlbHQq.mjs} +203 -9
- package/dist/shared/{nuxt-backend.BqXAZChe.mjs → nuxt-backend.D16peTIt.mjs} +57 -35
- package/dist/shared/{nuxt-backend.DH1Ya3uB.mjs → nuxt-backend.D4JXvCP6.mjs} +3 -2
- package/dist/types.d.ts +1 -1
- package/package.json +19 -10
- package/skills/nuxt-backend/SKILL.md +18 -18
- package/skills/nuxt-backend/references/api.md +31 -6
- package/skills/nuxt-backend/references/install.md +9 -6
- package/skills/nuxt-backend/references/renames.json +8 -0
- package/skills/nuxt-backend/references/surface.json +62 -2
- package/skills/nuxt-backend-auth/SKILL.md +8 -2
- package/skills/nuxt-backend-auth/references/api.md +3 -1
- package/skills/nuxt-backend-billing/SKILL.md +15 -0
- package/skills/nuxt-backend-billing/references/api.md +14 -1
- package/skills/nuxt-backend-data/SKILL.md +1 -0
- package/skills/nuxt-backend-data/references/api.md +10 -1
- package/skills/nuxt-backend-email/references/api.md +1 -1
- package/skills/nuxt-backend-ship/SKILL.md +2 -1
- package/skills/nuxt-backend-upgrade/references/upgrade.md +6 -0
- package/src/convex/access-tickets.ts +10 -2
- package/src/convex/account-data.ts +5 -4
- package/src/convex/app.ts +2 -1
- package/src/convex/client/better-auth-options.ts +12 -3
- package/src/convex/client/launch-gate.ts +28 -1
- package/src/convex/client/plugins.ts +3 -0
- package/src/convex/client/two-factor.ts +66 -0
- package/src/convex/components/backend/_generated/api.ts +2 -0
- package/src/convex/components/backend/_generated/component.ts +500 -2
- package/src/convex/components/backend/account.ts +25 -1
- package/src/convex/components/backend/adapter.ts +7 -2
- package/src/convex/components/backend/billing.ts +2 -1
- package/src/convex/components/backend/commerce.ts +408 -0
- package/src/convex/components/backend/schema.ts +110 -1
- package/src/convex/components/backend/waitlist.ts +144 -40
- package/src/convex/email-templates.ts +16 -0
- package/src/convex/emails/waitlist-friend-joined.ts +23 -0
- package/src/convex/errors.ts +15 -2
- package/src/convex/events.ts +14 -0
- package/src/convex/integrations/billing/checkout.ts +78 -11
- package/src/convex/integrations/billing/commerce-entitlements.ts +92 -0
- package/src/convex/integrations/billing/commerce-events.ts +487 -0
- package/src/convex/integrations/billing/commerce-history.ts +110 -0
- package/src/convex/integrations/billing/commerce-webhooks.ts +69 -0
- package/src/convex/integrations/billing/commerce.ts +366 -0
- package/src/convex/integrations/billing/context.ts +19 -2
- package/src/convex/integrations/billing/credits.ts +47 -27
- package/src/convex/integrations/billing/customers.ts +15 -1
- package/src/convex/integrations/billing/entitlements.ts +5 -1
- package/src/convex/integrations/billing/erasure.ts +11 -6
- package/src/convex/integrations/billing/free-plan.ts +30 -5
- package/src/convex/integrations/billing/functions.ts +3 -2
- package/src/convex/integrations/billing/gifts.ts +2 -0
- package/src/convex/integrations/billing/history.ts +9 -0
- package/src/convex/integrations/billing/lifecycle.ts +3 -1
- package/src/convex/integrations/billing/providers/capabilities.ts +78 -0
- package/src/convex/integrations/billing/providers/consent.ts +94 -0
- package/src/convex/integrations/billing/providers/creem.ts +225 -0
- package/src/convex/integrations/billing/providers/dodo.ts +214 -0
- package/src/convex/integrations/billing/providers/http.ts +168 -0
- package/src/convex/integrations/billing/providers/index.ts +65 -0
- package/src/convex/integrations/billing/providers/stripe.ts +345 -0
- package/src/convex/integrations/billing/providers/types.ts +281 -0
- package/src/convex/integrations/billing/subscriptions.ts +20 -6
- package/src/convex/integrations/billing/types/setup.ts +63 -1
- package/src/convex/integrations/billing.ts +46 -3
- package/src/convex/integrations/email.ts +1 -0
- package/src/convex/integrations/launch.ts +45 -7
- package/src/convex/integrations/presence.ts +160 -0
- package/src/convex/integrations/waitlist.ts +84 -12
- package/src/convex/integrations/webhook-guard.ts +20 -4
- package/src/convex/label-groups/admin.ts +9 -0
- package/src/convex/label-groups/audit.ts +2 -0
- package/src/convex/label-groups/auth.ts +10 -0
- package/src/convex/label-groups/email.ts +7 -0
- package/src/convex/label-groups/errors.ts +4 -0
- package/src/convex/label-groups/security.ts +20 -0
- package/src/convex/label-groups/waitlist.ts +9 -0
- package/src/convex/label-translations.ts +24 -0
- package/src/convex/log.ts +2 -0
- package/src/convex/sensitive-actions.ts +11 -0
- package/src/convex/waitlist-rules.ts +84 -8
- package/src/runtime/vue/components/account/SecuritySettings.vue +58 -4
- package/src/runtime/vue/components/account/SecurityTwoFactor.css +68 -0
- package/src/runtime/vue/components/account/SecurityTwoFactor.vue +113 -0
- package/src/runtime/vue/components/admin/AdminWaitlist.css +1 -0
- package/src/runtime/vue/components/admin/AdminWaitlistActions.vue +44 -2
- package/src/runtime/vue/components/auth/AuthForm.vue +8 -0
- package/src/runtime/vue/components/auth/AuthFormTwoFactor.css +40 -0
- package/src/runtime/vue/components/auth/AuthFormTwoFactor.vue +75 -0
- package/src/runtime/vue/components/auth/AuthFormWaitlisted.vue +11 -4
- package/src/runtime/vue/components/auth/WaitlistPlace.css +16 -0
- package/src/runtime/vue/components/auth/WaitlistPlace.vue +49 -2
- package/src/runtime/vue/components/auth/WaitlistShare.vue +4 -3
- package/dist/devtools-client/_nuxt/CiCAOwUc.js +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLogger, addPlugin, hasNuxtModule, addVitePlugin, addServerHandler, addNitroPlugin, extendRouteRules, extendPages, addTypeTemplate, addPluginTemplate, updateTemplates, addImports, addComponent, addServerImports, addRouteMiddleware, addTemplate, resolveModule, defineNuxtModule, createResolver } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
|
-
import { j as resolveFunctionsDir, T as BACKEND_PAGE_DEFS, a1 as pagePathShape, J as computeDeployment, a2 as collectPreflightFindings, N as detectCapabilities, K as appMonitoringDsn, L as monitoringSdkInstalled, a3 as OPTIONAL_DEPLOYMENT_ENV, a4 as REQUIRED_DEPLOYMENT_ENV, a5 as deriveDeploymentUrls, a6 as provisionedEnvNames, a7 as appComponentIsStarter, r as readEnvFiles, a8 as resolveSiteUrl, _ as formatPreflightSummary, a9 as needsSetup, aa as AGENT_HINT, ab as HEALTH_ROUTE, ac as LOCAL_LOG_ROUTE, ad as monitoringSdkVersion, ae as MONITORING_SDK, af as TUNNEL_SDK_VERSION, ag as SOURCE_MAP_ENV, ah as sdkServesTunnel, ai as installableProblems, aj as
|
|
3
|
+
import { j as resolveFunctionsDir, T as BACKEND_PAGE_DEFS, a1 as pagePathShape, J as computeDeployment, a2 as collectPreflightFindings, N as detectCapabilities, K as appMonitoringDsn, L as monitoringSdkInstalled, a3 as OPTIONAL_DEPLOYMENT_ENV, a4 as REQUIRED_DEPLOYMENT_ENV, a5 as deriveDeploymentUrls, a6 as provisionedEnvNames, a7 as appComponentIsStarter, r as readEnvFiles, a8 as resolveSiteUrl, _ as formatPreflightSummary, a9 as needsSetup, aa as AGENT_HINT, ab as HEALTH_ROUTE, ac as LOCAL_LOG_ROUTE, ad as monitoringSdkVersion, ae as MONITORING_SDK, af as TUNNEL_SDK_VERSION, ag as SOURCE_MAP_ENV, ah as sdkServesTunnel, ai as installableProblems, aj as authOptionProblems, ak as pagesOptionProblems, al as resolvedBackendPages, am as DEFAULT_AUTH_ROUTE, Q as REGISTERED_UI, an as publishedBackendPages, ao as isPageOff, ap as privatePagePaths, aq as collectExistingPagePaths, ar as adoptChildPages, as as pageRouteRules, at as cachingRulesOver, V as packageDir, z as appBrandOf, A as syncBrandFile, E as brandFileLocation, F as appLabelsOf, G as syncLabelsFile, H as labelsFileLocation, au as PUSH_WORKER_URL, av as ownsManifest, aw as MANIFEST_MODULES, ax as namedIconWarnings, ay as installableGaps, az as installIcons, aA as webAppManifest, aB as maskableIcons, aC as MANIFEST_ROUTE, aD as APPLE_TOUCH_ICON, aE as themeColorMeta, w as syncPathsFile, x as backendPathsOf, y as pathsFileLocation, S as uiPath, aF as UI_SHARED_STYLES, aG as UI_ENTRIES, aH as UI_INTERNALS, aI as moduleDir, aJ as authProviderOf, aK as configuredAuthOption, aL as pagesOff, aM as VISITOR_IP_ROUTE, aN as CONVEX_AUTH_NOTICE, aO as resolvePagePath, aP as baseAuthOverrides, aQ as dependencyRange, aR as runsFromSource, Y as packageVersion } from './nuxt-backend.ChvlbHQq.mjs';
|
|
4
4
|
import { backendAppConfigDefaults } from '../../dist/runtime/config.js';
|
|
5
5
|
import { readFileSync, existsSync, readdirSync, realpathSync } from 'node:fs';
|
|
6
6
|
import { join, resolve, extname, dirname } from 'node:path';
|
|
@@ -204,7 +204,7 @@ function runPreflight(options, nuxt) {
|
|
|
204
204
|
});
|
|
205
205
|
if (appComponentIsStarter(nuxt.options.rootDir)) {
|
|
206
206
|
logger.warn(
|
|
207
|
-
"app.vue still renders <NuxtWelcome /> and no <NuxtPage />, so the pages this module registers (/login, /pricing, \u2026) will not render. Replace <NuxtWelcome /> with <NuxtLayout><NuxtPage /></NuxtLayout> \u2014 `npx nuxt-backend init` does it for you, and adds the app shell as the default layout
|
|
207
|
+
"app.vue still renders <NuxtWelcome /> and no <NuxtPage />, so the pages this module registers (/login, /pricing, \u2026) will not render. Replace <NuxtWelcome /> with <NuxtLayout><NuxtPage /></NuxtLayout> \u2014 `npx nuxt-backend init` does it for you, and adds the app shell as the default layout and a home page at /."
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
210
|
reportPreflight(findings);
|
|
@@ -226,7 +226,7 @@ function reportPreflight(findings) {
|
|
|
226
226
|
}
|
|
227
227
|
async function registerDevtoolsPanel(options, resolver, nuxt, pagesInfo) {
|
|
228
228
|
if (nuxt.options.dev && !nuxt.options.test && options.devtools !== false && isDevtoolsUiEnabled(nuxt)) {
|
|
229
|
-
const { setupDevtools } = await import('../chunks/
|
|
229
|
+
const { setupDevtools } = await import('../chunks/devtools.mjs');
|
|
230
230
|
const functionsDir = resolveFunctionsDir(nuxt.options.rootDir);
|
|
231
231
|
const siteUrlConfigured = isSiteUrlConfigured(options, nuxt);
|
|
232
232
|
const versions = readPackageVersions(nuxt.options.rootDir);
|
|
@@ -528,6 +528,12 @@ See https://nuxt-backend.dev/docs/build/email/notifications/installable#colours-
|
|
|
528
528
|
throw error2;
|
|
529
529
|
}
|
|
530
530
|
const removed = Object.entries(REMOVED_OPTIONS).filter(([key]) => values[key] !== void 0);
|
|
531
|
+
const auth = authOptionProblems(values.auth);
|
|
532
|
+
if (auth.length > 0) {
|
|
533
|
+
const error2 = new Error(`nuxt-backend: ${auth.join(" ")}`);
|
|
534
|
+
error2.name = "BackendOptionsError";
|
|
535
|
+
throw error2;
|
|
536
|
+
}
|
|
531
537
|
const problems = [
|
|
532
538
|
...pagesOptionProblems(values.pages),
|
|
533
539
|
...removed.map(([key, instead]) => `\`${key}\` is gone. ${instead}`)
|
|
@@ -858,11 +864,13 @@ function registerPathsFile(options, nuxt) {
|
|
|
858
864
|
}
|
|
859
865
|
}
|
|
860
866
|
|
|
861
|
-
function registerSaasComposables(resolver) {
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
867
|
+
function registerSaasComposables(resolver, { betterAuth = true } = {}) {
|
|
868
|
+
if (betterAuth) {
|
|
869
|
+
addImports({
|
|
870
|
+
name: "useAuth",
|
|
871
|
+
from: resolver.resolve("./runtime/vue/composables/use-auth")
|
|
872
|
+
});
|
|
873
|
+
}
|
|
866
874
|
for (const entry of REGISTERED_UI) {
|
|
867
875
|
const component = { name: entry.name, export: "default", filePath: resolver.resolve(`./runtime/vue/components/${uiPath(entry)}.vue`), ...entry.global ? { global: true } : {} };
|
|
868
876
|
addComponent(entry.lazy ? lazily(component) : component);
|
|
@@ -892,6 +900,8 @@ function registerSaasComposables(resolver) {
|
|
|
892
900
|
{ name: "useReferralInvite", from: resolver.resolve("./runtime/vue/composables/use-referral-invite") },
|
|
893
901
|
{ name: "useReferralAdmin", from: resolver.resolve("./runtime/vue/composables/use-referral-admin") },
|
|
894
902
|
{ name: "usePasskeys", from: resolver.resolve("./runtime/vue/composables/use-passkeys") },
|
|
903
|
+
{ name: "useTwoFactor", from: resolver.resolve("./runtime/vue/composables/use-two-factor") },
|
|
904
|
+
{ name: "useRoomPresence", from: resolver.resolve("./runtime/vue/composables/use-room-presence") },
|
|
895
905
|
{ name: "useSessions", from: resolver.resolve("./runtime/vue/composables/use-sessions") },
|
|
896
906
|
{ name: "useSignInAlerts", from: resolver.resolve("./runtime/vue/composables/use-sign-in-alerts") },
|
|
897
907
|
{ name: "useReauthentication", from: resolver.resolve("./runtime/vue/composables/use-reauthentication") },
|
|
@@ -946,6 +956,7 @@ function registerSaasComposables(resolver) {
|
|
|
946
956
|
for (const composable of composables) {
|
|
947
957
|
addImports(composable);
|
|
948
958
|
}
|
|
959
|
+
if (!betterAuth) return;
|
|
949
960
|
const serverRuntime = resolveBaseServerRuntime();
|
|
950
961
|
if (serverRuntime) {
|
|
951
962
|
addServerImports([
|
|
@@ -953,7 +964,7 @@ function registerSaasComposables(resolver) {
|
|
|
953
964
|
]);
|
|
954
965
|
} else {
|
|
955
966
|
logger.warn(
|
|
956
|
-
"`backendAuth` auto-import unavailable \u2014 could not locate the nuxt-convex-module server runtime (neither its `./better-auth/server` export nor a stub-linked src/). Reinstall nuxt-convex-module, or import `
|
|
967
|
+
"`backendAuth` auto-import unavailable \u2014 could not locate the nuxt-convex-module server runtime (neither its `./better-auth/server` export nor a stub-linked src/). Reinstall nuxt-convex-module, or import `convexBetterAuthNuxt` from `nuxt-convex-module/better-auth/server` directly."
|
|
957
968
|
);
|
|
958
969
|
}
|
|
959
970
|
}
|
|
@@ -1013,9 +1024,9 @@ function baseModuleRoots() {
|
|
|
1013
1024
|
}
|
|
1014
1025
|
const BRAND_NAME = /convex|betterauth|polar|resend/i;
|
|
1015
1026
|
const PROVIDER_WORDED_COMPONENTS = /* @__PURE__ */ new Set(["CheckoutLink", "CustomerPortalLink"]);
|
|
1016
|
-
function hideBaseBrandNames(nuxt) {
|
|
1027
|
+
function hideBaseBrandNames(nuxt, { convexAuth = false } = {}) {
|
|
1017
1028
|
const roots = baseModuleRoots();
|
|
1018
|
-
const fromBaseModule = (path) => typeof path === "string" && roots.some((root) => slashed(path).startsWith(root));
|
|
1029
|
+
const fromBaseModule = (path) => typeof path === "string" && roots.some((root) => slashed(path).startsWith(root)) && !(convexAuth && slashed(path).includes("/convex-auth/"));
|
|
1019
1030
|
const hiddenImport = (entry) => fromBaseModule(entry?.from) && BRAND_NAME.test(entry?.as ?? entry?.name ?? "");
|
|
1020
1031
|
const hiddenComponent = (component) => fromBaseModule(component?.filePath) && (BRAND_NAME.test(component?.pascalName ?? "") || PROVIDER_WORDED_COMPONENTS.has(component?.pascalName ?? ""));
|
|
1021
1032
|
nuxt.hooks.afterEach(({ name, args }) => {
|
|
@@ -1335,12 +1346,13 @@ const module$1 = defineNuxtModule({
|
|
|
1335
1346
|
// Surfaced by Nuxt DevTools and the nuxt/modules registry (which reads it
|
|
1336
1347
|
// from dist/module.json and uses it as the listing's website).
|
|
1337
1348
|
docs: "https://nuxt-backend.dev",
|
|
1338
|
-
// From 4.
|
|
1339
|
-
// ships in 4.6, and nuxt-convex-module 0.12 needs 4.6 too
|
|
1349
|
+
// From 4.7.0: the server code is written against `nuxt/server`, which
|
|
1350
|
+
// ships in 4.6, and nuxt-convex-module 0.12 needs 4.6 too, but 4.6 no
|
|
1351
|
+
// longer builds with Vite 8.4 (rolldown refuses Nuxt's `unctx` import). Not Nuxt 5
|
|
1340
1352
|
// yet: the package's server code and nuxt-security still run on h3 1, and on Nuxt 5 Nuxt disables
|
|
1341
1353
|
// the module with its own incompatibility warning instead of letting it
|
|
1342
1354
|
// fail at runtime.
|
|
1343
|
-
compatibility: { nuxt: "^4.
|
|
1355
|
+
compatibility: { nuxt: "^4.7.0" }
|
|
1344
1356
|
},
|
|
1345
1357
|
defaults: {
|
|
1346
1358
|
devtools: true
|
|
@@ -1423,16 +1435,21 @@ const module$1 = defineNuxtModule({
|
|
|
1423
1435
|
// over the package's seed, so its fields win (a custom `authClient`
|
|
1424
1436
|
// replaces ours) while an object that only sets other options
|
|
1425
1437
|
// (`crossDomainCallbackRoute`, …) keeps the bundled client. Only a
|
|
1426
|
-
// disable is overridden outright.
|
|
1427
|
-
|
|
1428
|
-
|
|
1438
|
+
// disable is overridden outright. Better Auth is this package's auth:
|
|
1439
|
+
// the base module's Convex Auth stays off, even where
|
|
1440
|
+
// @convex-dev/auth is installed, unless `backend.auth` names it
|
|
1441
|
+
// (src/nuxt/auth-provider.ts).
|
|
1442
|
+
...baseAuthOverrides(authProviderOf(configuredAuthOption(rawOptions)), {
|
|
1429
1443
|
loginPath,
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1444
|
+
betterAuth: {
|
|
1445
|
+
authClient: resolver.resolve("./runtime/vue/auth-client"),
|
|
1446
|
+
loginPath,
|
|
1447
|
+
// The same-origin proxy route (`betterAuth.authRoute` in the base
|
|
1448
|
+
// module since 0.12). Unset, the base module mounts it at /api/auth.
|
|
1449
|
+
...backend.authRoute !== void 0 ? { authRoute: backend.authRoute } : {},
|
|
1450
|
+
...typeof convex.betterAuth === "object" && convex.betterAuth !== null ? convex.betterAuth : {}
|
|
1451
|
+
}
|
|
1452
|
+
}),
|
|
1436
1453
|
// This package's auth story is Better Auth — don't let auto-detect
|
|
1437
1454
|
// enable a second auth provider just because its SDK is resolvable.
|
|
1438
1455
|
clerk: false,
|
|
@@ -1444,6 +1461,7 @@ const module$1 = defineNuxtModule({
|
|
|
1444
1461
|
async setup(options, nuxt) {
|
|
1445
1462
|
assertModuleOptions(options);
|
|
1446
1463
|
const resolver = createResolver(moduleDir);
|
|
1464
|
+
const betterAuth = authProviderOf(configuredAuthOption(nuxt.options) ?? options.auth) === "better-auth";
|
|
1447
1465
|
registerBackendAliases(nuxt, resolver.resolve("./runtime"));
|
|
1448
1466
|
registerBackendApi(resolver, nuxt);
|
|
1449
1467
|
keepDevModulesUncached(nuxt);
|
|
@@ -1453,18 +1471,13 @@ const module$1 = defineNuxtModule({
|
|
|
1453
1471
|
);
|
|
1454
1472
|
const backendUrl = resolver.resolve("./runtime/server/backend-url");
|
|
1455
1473
|
addNitroPlugin({ nitro2: backendUrl, nitro3: backendUrl });
|
|
1456
|
-
registerSaasComposables(resolver);
|
|
1474
|
+
registerSaasComposables(resolver, { betterAuth });
|
|
1457
1475
|
registerLabels(resolver);
|
|
1458
1476
|
registerI18nMessages(resolver, nuxt);
|
|
1459
1477
|
registerStyles(options.css, resolver, nuxt);
|
|
1460
|
-
registerPageAccess(resolver, nuxt);
|
|
1478
|
+
if (betterAuth) registerPageAccess(resolver, nuxt);
|
|
1461
1479
|
registerSearchIndexing(resolver, nuxt);
|
|
1462
|
-
|
|
1463
|
-
if (options.pages?.welcome !== false) addPlugin({ src: resolver.resolve("./runtime/vue/plugins/onboarding-redirect"), mode: "client" });
|
|
1464
|
-
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/checkout-return"), mode: "client" });
|
|
1465
|
-
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/first-touch"), mode: "client" });
|
|
1466
|
-
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/email-presence"), mode: "client" });
|
|
1467
|
-
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/passkey-ceremony"), mode: "client" });
|
|
1480
|
+
if (betterAuth) registerAccountPlugins(options, resolver);
|
|
1468
1481
|
if (!securityDisabled(nuxt)) addPlugin({ src: resolver.resolve("./runtime/vue/plugins/trusted-types.client"), mode: "client" });
|
|
1469
1482
|
registerSecurityRules(resolver, nuxt);
|
|
1470
1483
|
if (!nuxt.options.dev && options.chunkRecovery !== false) {
|
|
@@ -1473,20 +1486,29 @@ const module$1 = defineNuxtModule({
|
|
|
1473
1486
|
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/chunk-recovery.client"), mode: "client" });
|
|
1474
1487
|
}
|
|
1475
1488
|
registerBaseComponentAliases(resolver, nuxt);
|
|
1476
|
-
hideBaseBrandNames(nuxt);
|
|
1477
|
-
const pagesInfo = registerModulePages(options, resolver, nuxt);
|
|
1489
|
+
hideBaseBrandNames(nuxt, { convexAuth: !betterAuth });
|
|
1490
|
+
const pagesInfo = registerModulePages(betterAuth ? options : { ...options, pages: pagesOff() }, resolver, nuxt);
|
|
1478
1491
|
registerPathsFile(options, nuxt);
|
|
1479
1492
|
registerAppConfigFiles(nuxt);
|
|
1480
1493
|
registerInstallable(resolver, nuxt, options.installable);
|
|
1481
1494
|
registerProtection(resolver, nuxt);
|
|
1482
1495
|
registerPhotoDecoder(resolver, nuxt);
|
|
1483
1496
|
registerMonitoring(resolver, nuxt);
|
|
1484
|
-
addServerHandler({ route: VISITOR_IP_ROUTE, method: "get", handler: { nuxt: resolver.resolve("./runtime/server/visitor-ip") } });
|
|
1497
|
+
if (betterAuth) addServerHandler({ route: VISITOR_IP_ROUTE, method: "get", handler: { nuxt: resolver.resolve("./runtime/server/visitor-ip") } });
|
|
1485
1498
|
registerJobs(nuxt);
|
|
1486
1499
|
registerReports(nuxt);
|
|
1487
|
-
runPreflight(options, nuxt);
|
|
1500
|
+
if (betterAuth) runPreflight(options, nuxt);
|
|
1501
|
+
else if (nuxt.options.dev && !nuxt.options._prepare && !nuxt.options.test) logger.info(CONVEX_AUTH_NOTICE);
|
|
1488
1502
|
await registerDevtoolsPanel(options, resolver, nuxt, pagesInfo);
|
|
1489
1503
|
}
|
|
1490
1504
|
});
|
|
1505
|
+
function registerAccountPlugins(options, resolver) {
|
|
1506
|
+
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/session-ended"), mode: "client" });
|
|
1507
|
+
if (options.pages?.welcome !== false) addPlugin({ src: resolver.resolve("./runtime/vue/plugins/onboarding-redirect"), mode: "client" });
|
|
1508
|
+
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/checkout-return"), mode: "client" });
|
|
1509
|
+
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/first-touch"), mode: "client" });
|
|
1510
|
+
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/email-presence"), mode: "client" });
|
|
1511
|
+
addPlugin({ src: resolver.resolve("./runtime/vue/plugins/passkey-ceremony"), mode: "client" });
|
|
1512
|
+
}
|
|
1491
1513
|
|
|
1492
1514
|
export { envTier as e, logger as l, module$1 as m, resolveBackendSource as r };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { existsSync, readFileSync, readdirSync } from 'node:fs';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { b8 as finding, j as resolveFunctionsDir, bS as readSource, bT as parse, bU as keyOf, bV as writeSource, bW as REMOVED_ENV, bX as applyEdits, bY as walk, bZ as BACKEND_FILE_TEMPLATES } from './nuxt-backend.ChvlbHQq.mjs';
|
|
5
5
|
|
|
6
6
|
const LAST_SCAFFOLD_MOUNT = "@convex-dev/workpool/convex.config";
|
|
7
7
|
const OPTIONAL_MOUNTS = [
|
|
8
8
|
{ from: "@convex-dev/action-cache/convex.config", local: "actionCache", neededBy: "@convex-dev/action-cache:ActionCache", requires: "@convex-dev/action-cache", after: LAST_SCAFFOLD_MOUNT },
|
|
9
9
|
{ from: "@convex-dev/aggregate/convex.config", local: "aggregate", neededBy: "@convex-dev/aggregate:TableAggregate", requires: "@convex-dev/aggregate", after: LAST_SCAFFOLD_MOUNT },
|
|
10
10
|
{ from: "@convex-dev/migrations/convex.config", local: "migrations", neededBy: "@convex-dev/migrations:Migrations", requires: "@convex-dev/migrations", after: LAST_SCAFFOLD_MOUNT },
|
|
11
|
-
{ from: "@convex-dev/crons/convex.config", local: "crons", neededBy: "@convex-dev/crons:Crons", requires: "@convex-dev/crons", after: LAST_SCAFFOLD_MOUNT }
|
|
11
|
+
{ from: "@convex-dev/crons/convex.config", local: "crons", neededBy: "@convex-dev/crons:Crons", requires: "@convex-dev/crons", after: LAST_SCAFFOLD_MOUNT },
|
|
12
|
+
{ from: "@convex-dev/presence/convex.config", local: "presence", neededBy: "nuxt-backend/presence:setupPresence", requires: "@convex-dev/presence", after: LAST_SCAFFOLD_MOUNT }
|
|
12
13
|
];
|
|
13
14
|
const HELPER_MOUNTS = {
|
|
14
15
|
"nuxt-backend/ai:setupAi": ["backend", "persistentTextStreaming"],
|
package/dist/types.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export { type AdminTabMeta } from '../dist/runtime/vue/components/admin/admin-ta
|
|
|
6
6
|
|
|
7
7
|
export { default } from './module.js'
|
|
8
8
|
|
|
9
|
-
export { type InstallableOptions, type ModuleOptions, type ModuleRedirectsOptions } from './module.js'
|
|
9
|
+
export { type AuthProvider, type InstallableOptions, type ModuleOptions, type ModuleRedirectsOptions } from './module.js'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "nuxt-backend",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.0",
|
|
5
5
|
"description": "The complete backend for a Nuxt app on Convex: passwordless sign-in with passkeys, workspaces, plans and credits, email, notifications and metered AI, with the pages that use them, in one module.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
"types": "./dist/convex/integrations/email.d.ts",
|
|
74
74
|
"default": "./dist/convex/integrations/email.js"
|
|
75
75
|
},
|
|
76
|
+
"./presence": {
|
|
77
|
+
"types": "./dist/convex/integrations/presence.d.ts",
|
|
78
|
+
"default": "./dist/convex/integrations/presence.js"
|
|
79
|
+
},
|
|
76
80
|
"./rate-limit": {
|
|
77
81
|
"types": "./dist/convex/integrations/rate-limit.d.ts",
|
|
78
82
|
"default": "./dist/convex/integrations/rate-limit.js"
|
|
@@ -163,8 +167,8 @@
|
|
|
163
167
|
"node": ">=24.11.0"
|
|
164
168
|
},
|
|
165
169
|
"dependencies": {
|
|
166
|
-
"@better-auth/core": ">=1.7.
|
|
167
|
-
"@better-auth/passkey": ">=1.7.
|
|
170
|
+
"@better-auth/core": ">=1.7.17 <1.8.0",
|
|
171
|
+
"@better-auth/passkey": ">=1.7.17 <1.8.0",
|
|
168
172
|
"@convex-dev/action-cache": "^0.3.1",
|
|
169
173
|
"@convex-dev/aggregate": "^0.3.4",
|
|
170
174
|
"@convex-dev/batch-worker": "0.3.6",
|
|
@@ -177,21 +181,21 @@
|
|
|
177
181
|
"@convex-dev/sharded-counter": "^0.2.3",
|
|
178
182
|
"@convex-dev/workflow": "^0.4.10",
|
|
179
183
|
"@convex-dev/workpool": "^0.4.15",
|
|
180
|
-
"@nuxt/kit": "^4.
|
|
184
|
+
"@nuxt/kit": "^4.7.0",
|
|
181
185
|
"@polar-sh/checkout": "^0.6.0",
|
|
182
186
|
"@polar-sh/sdk": "^0.49.0",
|
|
183
187
|
"@vue/devtools-api": "^8.2.1",
|
|
184
188
|
"@vueuse/core": "^15.0.0",
|
|
185
|
-
"better-auth": ">=1.7.
|
|
189
|
+
"better-auth": ">=1.7.17 <1.8.0",
|
|
186
190
|
"buffer": "^6.0.3",
|
|
187
191
|
"citty": "^0.2.2",
|
|
188
|
-
"convex-helpers": "^0.1.
|
|
192
|
+
"convex-helpers": "^0.1.136",
|
|
189
193
|
"dedent": "^1.7.2",
|
|
190
194
|
"defu": "^6.1.4",
|
|
191
195
|
"fflate": "^0.8.3",
|
|
192
196
|
"magicast": "^0.5.4",
|
|
193
197
|
"nanostores": "^1.5.5",
|
|
194
|
-
"nuxt-convex-module": "^0.
|
|
198
|
+
"nuxt-convex-module": "^0.15.2",
|
|
195
199
|
"nuxt-security": "^2.7.0",
|
|
196
200
|
"resend": "^6.35.0",
|
|
197
201
|
"standardwebhooks": "^1.1.1",
|
|
@@ -204,6 +208,7 @@
|
|
|
204
208
|
"@convex-dev/bundle-analyzer": "0.1.0",
|
|
205
209
|
"@convex-dev/crons": "^0.2.3",
|
|
206
210
|
"@convex-dev/eslint-plugin": "^5.0.0",
|
|
211
|
+
"@convex-dev/presence": "^0.4.0",
|
|
207
212
|
"@convex-dev/rag": "^0.7.8",
|
|
208
213
|
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
209
214
|
"@sentry/nuxt": "^11.10.0",
|
|
@@ -224,6 +229,7 @@
|
|
|
224
229
|
"@convex-dev/bundle-analyzer": "0.1.0",
|
|
225
230
|
"@convex-dev/crons": "^0.2.3",
|
|
226
231
|
"@convex-dev/eslint-plugin": "^5.0.0",
|
|
232
|
+
"@convex-dev/presence": "^0.4.1",
|
|
227
233
|
"@convex-dev/rag": "^0.7.8",
|
|
228
234
|
"@edge-runtime/vm": "^5.0.0",
|
|
229
235
|
"@intlify/message-compiler": "^11.4.16",
|
|
@@ -232,7 +238,7 @@
|
|
|
232
238
|
"@nuxt/devtools-kit": "^3.4.4",
|
|
233
239
|
"@nuxt/eslint-config": "^1.17.0",
|
|
234
240
|
"@nuxt/module-builder": "^1.0.3",
|
|
235
|
-
"@nuxt/schema": "^4.
|
|
241
|
+
"@nuxt/schema": "^4.7.0",
|
|
236
242
|
"@nuxt/test-utils": "^4.3.4",
|
|
237
243
|
"@nuxtjs/i18n": "^10.6.0",
|
|
238
244
|
"@nuxtjs/mcp-toolkit": "^0.24.3",
|
|
@@ -246,7 +252,7 @@
|
|
|
246
252
|
"botid": "^1.5.12",
|
|
247
253
|
"changelogen": "^0.6.2",
|
|
248
254
|
"chokidar-cli": "^3.0.0",
|
|
249
|
-
"convex": "^1.
|
|
255
|
+
"convex": "^1.51.0",
|
|
250
256
|
"convex-test": "^0.0.67",
|
|
251
257
|
"eslint": "^10.13.0",
|
|
252
258
|
"fallow": "3.38.1",
|
|
@@ -257,7 +263,7 @@
|
|
|
257
263
|
"installed-check": "^11.0.0",
|
|
258
264
|
"lightningcss": "^1.33.0",
|
|
259
265
|
"npm-run-all2": "^9.0.4",
|
|
260
|
-
"nuxt": "^4.
|
|
266
|
+
"nuxt": "^4.7.0",
|
|
261
267
|
"oxc-parser": "^0.157.0",
|
|
262
268
|
"pkg-pr-new": "^0.0.93",
|
|
263
269
|
"playwright-core": "^1.64.1",
|
|
@@ -317,6 +323,9 @@
|
|
|
317
323
|
"@convex-dev/agent": {
|
|
318
324
|
"optional": true
|
|
319
325
|
},
|
|
326
|
+
"@convex-dev/presence": {
|
|
327
|
+
"optional": true
|
|
328
|
+
},
|
|
320
329
|
"heic-to": {
|
|
321
330
|
"optional": true
|
|
322
331
|
}
|
|
@@ -12,27 +12,26 @@ description: The core skill for Nuxt apps on nuxt-backend, the all-in-one SaaS b
|
|
|
12
12
|
gifts, AI metering and the webhook log.
|
|
13
13
|
|
|
14
14
|
The app's own Convex functions live in `backend/`, and each scaffolded file there re-exports the
|
|
15
|
-
package's setup. Docs: https://nuxt-backend.dev
|
|
15
|
+
package's setup. Docs: https://nuxt-backend.dev (agents: https://nuxt-backend.dev/llms.txt);
|
|
16
16
|
any docs page answers as Markdown with `.md` added to its URL. The docs MCP server (read-only,
|
|
17
17
|
no sign-in): https://mcp.nuxt-backend.dev/mcp.
|
|
18
18
|
|
|
19
19
|
## Install and version
|
|
20
20
|
|
|
21
|
-
- **Not installed yet?** No `nuxt-backend` in `package.json`, or no Nuxt app
|
|
22
|
-
[references/install.md](references/install.md)
|
|
21
|
+
- **Not installed yet?** No `nuxt-backend` in `package.json`, or no Nuxt app: follow
|
|
22
|
+
[references/install.md](references/install.md).
|
|
23
23
|
- **Which version.** `version` in `node_modules/nuxt-backend/package.json` is the one the app
|
|
24
|
-
runs. The skills in `node_modules/nuxt-backend/skills/` match it; a copy from the site
|
|
25
|
-
`npx skills add` can be ahead.
|
|
24
|
+
runs. The skills in `node_modules/nuxt-backend/skills/` match it; a copy from the site can be ahead.
|
|
26
25
|
`npx nuxt-backend init --agents` copies the installed version's skills into `.agents/skills/`,
|
|
27
26
|
and `npx nuxt-backend doctor` warns (`agent-files`) while those copies or the `AGENTS.md`
|
|
28
27
|
section belong to another version.
|
|
29
28
|
- **After an upgrade**, run `npx nuxt-backend upgrade` first; the `nuxt-backend-upgrade`
|
|
30
|
-
skill has the steps
|
|
29
|
+
skill has the steps.
|
|
31
30
|
|
|
32
31
|
## Ground rules
|
|
33
32
|
|
|
34
33
|
- **Neutral names.** The public API says `auth`, `billing`, `email`, `backend`, never a provider
|
|
35
|
-
name. Keep provider names out of app code, UI labels and env
|
|
34
|
+
name. Keep provider names out of app code, UI labels and env names.
|
|
36
35
|
- **Never edit `backend/_generated/`.** `convex dev` rewrites it. Import from `#backend/api`,
|
|
37
36
|
`#backend/dataModel` and `#backend/server` in the app, and from `./_generated/*` inside `backend/`.
|
|
38
37
|
- **Keep the scaffolded exports.** The composables call functions by name (`getAuthUser` in
|
|
@@ -43,7 +42,8 @@ no sign-in): https://mcp.nuxt-backend.dev/mcp.
|
|
|
43
42
|
`.filter()`, no `process.env` outside the env contract. `npx convex ai-files install` writes
|
|
44
43
|
Convex's own guidelines.
|
|
45
44
|
- **User-scoped functions use the builders** `backend/functions.ts` exports (`authed`, `workspace`,
|
|
46
|
-
`admin`), never the bare `query` and `mutation`.
|
|
45
|
+
`admin`), never the bare `query` and `mutation`. With `backend.auth:
|
|
46
|
+
'convex-auth'`, read the caller with `getAuthUserId(ctx)` instead.
|
|
47
47
|
- **Refusals are codes:** a `ConvexError` with a stable code. Read it with `getBackendError(error)`;
|
|
48
48
|
refuse from your own functions with `backendError(code, data)` from `nuxt-backend/functions`.
|
|
49
49
|
- **App data goes in app tables**, keyed by user id; the component owns its own schema.
|
|
@@ -54,14 +54,14 @@ Each feature has a task skill in `node_modules/nuxt-backend/skills/<name>/`, and
|
|
|
54
54
|
`.agents/skills/<name>/` once `init` copies them. Read the one a task needs first.
|
|
55
55
|
|
|
56
56
|
<!-- generated:router -->
|
|
57
|
-
- `nuxt-backend-auth`: 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.
|
|
57
|
+
- `nuxt-backend-auth`: 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. 23 tasks; reach for `useLoginFlow()`, `nuxt-backend/auth`, `useHumanCheck()`.
|
|
58
58
|
- `nuxt-backend-billing`: the catalog, plans, checkout, the portal, feature gates, plan quotas and credits. 11 tasks; reach for `nuxt-backend/billing`, `usePricing()`, `useBilling()`.
|
|
59
59
|
- `nuxt-backend-growth`: launch phases, offers, referrals, gifts, lifecycle email and the funnel. 14 tasks; reach for `useBilling()`, `useCampaign()`, `useGifts()`.
|
|
60
60
|
- `nuxt-backend-email`: transactional email, templates, delivery tracking, the dev inbox and notifications. 15 tasks; reach for `useSandboxInbox()`, `nuxt-backend/email`, `useEmailStatus()`.
|
|
61
61
|
- `nuxt-backend-ai`: metered AI actions, streams and the job queue. 13 tasks; reach for `nuxt-backend/ai`, `useAiStream()`.
|
|
62
|
-
- `nuxt-backend-data`: 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.
|
|
62
|
+
- `nuxt-backend-data`: the function tiers, queries and mutations, errors, search, workflows, uploads, share links, presence, retention, tokens and the Convex components for counts, queues, cached actions, crons and migrations. 13 tasks; reach for `nuxt-backend/functions`, `nuxt-backend/search`, `nuxt-backend/presence`.
|
|
63
63
|
- `nuxt-backend-ui`: the packaged pages and components, their parts, theming, labels, translation, slots, the headless composables and eject. 10 tasks; reach for `useLabels()`.
|
|
64
|
-
- `nuxt-backend-ship`: provider setup, tests, deploying, production checks, monitoring, flags and kill switches, webhooks and rate limits.
|
|
64
|
+
- `nuxt-backend-ship`: provider setup, tests, deploying, production checks, monitoring, flags and kill switches, webhooks and rate limits. 41 tasks; reach for `billingProviderName()`, `commerceProviderFromEnv()`, `nuxt-backend/rate-limit`.
|
|
65
65
|
- `nuxt-backend-upgrade`: moving an app to a new version, and every name a release renamed or removed. 2 tasks.
|
|
66
66
|
<!-- /generated:router -->
|
|
67
67
|
|
|
@@ -72,7 +72,7 @@ This skill's own tasks:
|
|
|
72
72
|
|
|
73
73
|
## Names that don't exist
|
|
74
74
|
|
|
75
|
-
Common guesses that don't exist here; write the name after the arrow.
|
|
75
|
+
Common guesses that don't exist here; write the name after the arrow. Older names: the
|
|
76
76
|
`nuxt-backend-upgrade` skill.
|
|
77
77
|
|
|
78
78
|
<!-- generated:wrong-names -->
|
|
@@ -96,15 +96,14 @@ Common guesses that don't exist here; write the name after the arrow. For older
|
|
|
96
96
|
| `npx nuxt-backend inbox [address]` | Prints the codes a dev deployment sent to a test address |
|
|
97
97
|
| `npx nuxt-backend mcp` | The MCP server `.mcp.json` runs: project state, docs, provider consoles; writes ask first |
|
|
98
98
|
|
|
99
|
-
No command prompts. `--json` prints one JSON document
|
|
100
|
-
means refused or failed,
|
|
99
|
+
No command prompts. `--json` prints one JSON document (progress on stderr), exit code `1`
|
|
100
|
+
means refused or failed, `--help` ends with what the command may change. Run a command that
|
|
101
101
|
writes production only when the user asks for it.
|
|
102
102
|
|
|
103
103
|
## Environment
|
|
104
104
|
|
|
105
|
-
The deployment holds the env, not Nuxt. `AUTH_SECRET` and `SITE_URL` are required.
|
|
106
|
-
feature
|
|
107
|
-
name: set it once the backend names a `provider/model` id. `BACKEND_ENVIRONMENT` decides every provider's mode: `env push` derives it. The Nuxt side reads `NUXT_PUBLIC_BACKEND_URL`, usually derived for you. `CONVEX_DEPLOYMENT`, `CONVEX_SITE_URL` and `CONVEX_SELF_HOSTED_URL` belong
|
|
105
|
+
The deployment holds the env, not Nuxt. `AUTH_SECRET` and `SITE_URL` are required. `EMAIL_*` and `BILLING_*` are optional: a missing one degrades a
|
|
106
|
+
feature. Set `AI_GATEWAY_API_KEY` once the backend names a `provider/model` id. `BACKEND_ENVIRONMENT` decides every provider's mode: `env push` derives it. The Nuxt side reads `NUXT_PUBLIC_BACKEND_URL`, usually derived for you. `CONVEX_DEPLOYMENT`, `CONVEX_SITE_URL` and `CONVEX_SELF_HOSTED_URL` belong
|
|
108
107
|
to the Convex CLI: read them, never write or rename them. `MONITORING_DSN` receives
|
|
109
108
|
errors and cron check-ins; the `NEXT_PUBLIC_SENTRY_DSN` Sentry's Vercel integration sets fills it. Put
|
|
110
109
|
values in `.env.local`, then run `npx nuxt-backend env push`. Never print or set `AUTH_SECRET`: `env rotate AUTH_SECRET` replaces it.
|
|
@@ -120,8 +119,9 @@ name, [references/surface.json](references/surface.json) the same as data.
|
|
|
120
119
|
- `nuxt-backend/http`: `registerBackendRoutes`
|
|
121
120
|
- `nuxt-backend/functions`: `backendError`, `getBackendError`
|
|
122
121
|
- `nuxt-backend/app`: `backendEnvironment`
|
|
123
|
-
- `nuxt-backend/billing`: `defineBillingCatalog`, `
|
|
122
|
+
- `nuxt-backend/billing`: `defineBillingCatalog`, `billingProviderName`
|
|
124
123
|
- `nuxt-backend/email`: `setupEmail`, `escapeHtml`
|
|
124
|
+
- `nuxt-backend/presence`: `setupPresence`
|
|
125
125
|
- `nuxt-backend/rate-limit`: `setupRateLimiter`
|
|
126
126
|
- `nuxt-backend/search`: `search`, `defineSearch`
|
|
127
127
|
- `nuxt-backend/audit`: `defineActivation`, `setupAudit`
|
|
@@ -36,6 +36,8 @@ skill's own `references/api.md` has the part it covers. The docs: https://nuxt-b
|
|
|
36
36
|
| `useReferralInvite()` | The state of the page a referral link (`/r/<code>`) opens, headless: what the link offers, the sign-in that returns to the page, and the claim. |
|
|
37
37
|
| `useReferralAdmin()` | The admin console's Referrals tab, as data: the program's totals, the top referrers, the flagged queue and one referrer's history, through `backend/referrals.ts`, and the decision an administrator makes on a flagged referral. |
|
|
38
38
|
| `usePasskeys()` | Passkey management over the auth client — list, register, rename, remove. |
|
|
39
|
+
| `useTwoFactor()` | The authenticator app as a second step after a sign-in code (TOTP), for the signed-in account: turn it on (`start`, then `confirm` with the app's first code), off, and new backup codes. |
|
|
40
|
+
| `useRoomPresence()` | Who is here: keep the signed-in person in a room (a page, a document, `workspace:<id>`) while the page is open and visible, and list who else is there, live. |
|
|
39
41
|
| `useSessions()` | Device-session management: list, revoke one, revoke the rest. |
|
|
40
42
|
| `useSignInAlerts()` | What an account shows around its sign-ins, without the markup: the latest sign-ins from a device it had not used before, and with its recovery code (the ones the person is also emailed about), each with its device and time, and a button that signs that session out while it is still signed in and is not this browser's. |
|
|
41
43
|
| `useReauthentication()` | Asking the person to confirm it is them before a sensitive action: the client half of `requireRecentSignIn` and of the routes that take a recent sign-in. |
|
|
@@ -176,7 +178,7 @@ The base module's, under neutral names: `<Authenticated>`, `<Unauthenticated>`,
|
|
|
176
178
|
|---|---|
|
|
177
179
|
| `default` | The Nuxt module: list `'nuxt-backend'` in `modules`. |
|
|
178
180
|
|
|
179
|
-
Types: `BackendAuthOptions`, `BackendAuthService`, `AccessDeniedData`, `AccessDeniedReason`, `PageAccessRules`, `AdminTabMeta`, `InstallableOptions`, `ModuleRedirectsOptions`, `ModuleOptions`.
|
|
181
|
+
Types: `BackendAuthOptions`, `BackendAuthService`, `AccessDeniedData`, `AccessDeniedReason`, `PageAccessRules`, `AdminTabMeta`, `InstallableOptions`, `AuthProvider`, `ModuleRedirectsOptions`, `ModuleOptions`.
|
|
180
182
|
|
|
181
183
|
### `nuxt-backend/auth`
|
|
182
184
|
|
|
@@ -231,10 +233,23 @@ Types: `BackendEnv`, `BackendEnvironment`.
|
|
|
231
233
|
|---|---|
|
|
232
234
|
| `defineBillingCatalog()` | Declare the billing catalog (typed identity: its keys stay literal, so `keyof typeof catalog.discounts` names its promotions). |
|
|
233
235
|
| `ALL_BILLING_EVENTS` | The provider's full webhook catalog. |
|
|
236
|
+
| `billingProviderName()` | The provider `BILLING_PROVIDER` names, `polar` when it is unset. |
|
|
237
|
+
| `commerceProviderFromEnv()` | The adapter the deployment's env names: `BILLING_PROVIDER`, the key in `BILLING_ACCESS_TOKEN`, and the provider's sandbox everywhere but production. |
|
|
238
|
+
| `consentFromMetadata()` | The proof an order's metadata carries back in a webhook, or `null` when the checkout had none. |
|
|
239
|
+
| `consentMetadata()` | The proof as checkout metadata. |
|
|
240
|
+
| `createCommerceProvider()` | The adapter for `name`. |
|
|
241
|
+
| `DIGITAL_CONTENT_CONSENT_TEXT` | The checkbox's text, in English. |
|
|
242
|
+
| `DIGITAL_CONTENT_CONSENT_VERSION` | The version of the wording below: bump it whenever the text changes, so a record names what was shown. |
|
|
243
|
+
| `PROVIDER_CAPABILITIES` | What each provider's API offers, checked against its docs on 2026-11-24. |
|
|
244
|
+
| `ProviderHttpError` | A provider's HTTP answer that was not a success. |
|
|
245
|
+
| `ProviderUnsupportedError` | A call a provider's API does not offer: the app shows the dashboard or the portal instead. |
|
|
246
|
+
| `recordDigitalContentConsent()` | The proof for a checkout of digital content, from what the page sent: it refuses unless `accepted` is the literal `true` (a pre-ticked box or a missing field is no consent), and hashes the text the page showed. |
|
|
247
|
+
| `webhookSecretsFromEnv()` | The webhook secrets the env accepts: a rotation list, first entry primary. |
|
|
248
|
+
| `createCommerceWebhookHandler()` | The handler an app passes as `billing.webhookHandler` to `registerBackendRoutes` for an adapter provider. |
|
|
234
249
|
| `setupReferrals()` | Set the referral program up in its own backend file (`backend/referrals.ts`). |
|
|
235
250
|
| `setupBilling()` | Configure billing for subscriptions, discounts, prepaid credits, and gift purchases — linked to your auth users and cached reactively inside the `backend` component (so consumers add nothing to their own schema). |
|
|
236
251
|
|
|
237
|
-
Types: `BillingRateLimiter`, `DiscountInput`, `ProrationBehavior`, `ClientProrationBehavior`, `CancellationReason`, `RefundReason`, `SubscriptionTarget`, `UpdateSubscriptionOptions`, `CancelSubscriptionOptions`, `PauseSubscriptionOptions`, `CurrentSubscriptions`, `OrdersOptions`, `BillingOrder`, `BillingPage`, `UsageHistoryOptions`, `UsageEvent`, `RefundOrderOptions`, `RefundRecord`, `DiscountListOptions`, `BillingDiscounts`, `ApplyDiscountOptions`, `CheckoutPrefill`, `CampaignAttribution`, `CheckoutTrial`, `CheckoutOptions`, `ServerCheckoutOptions`, `FeatureCheckOptions`, `BenefitKind`, `EntitlementBenefit`, `EntitlementMeter`, `CustomerEntitlements`, `CreditMeterConfig`, `BillingCatalogIds`, `CatalogPassIds`, `BillingCatalogDiscount`, `SpendCreditsEvent`, `SpendReservation`, `RefundCreditsEvent`, `CostReport`, `GiftRecord`, `GiftTask`, `PricedCredits`, `PricedTrial`, `PricedPlanPrice`, `PricedPlan`, `PricedPlanGift`, `PricedGiftLength`, `PricedPack`, `PricedOffer`, `PricedPromotion`, `Pricing`, `QuotaUsage`, `BillingWebhookEventHandlers`, `SaveOfferTerms`, `BillingComponents`, `BillingEmail`, `BillingEntity`, `BillingAccessRule`, `BillingEntityCtx`, `EntityProfile`, `SetupBillingConfig`, `AccountBillingErasure`, `AccountBillingErasureInput`, `AccountBillingExport`, `AccountBillingRecord`, `Billing`, `BillingAudit`, `BillingLifecycle`, `CancelFlowState`, `CancelOutcome`, `BillingConsole`, `SaveOffer`, `SaveOfferRule`, `WithdrawalPeriod`, `MeterUsage`, `RevenueCancellations`, `RevenueInterval`, `RevenueMetric`, `RevenueOptions`, `RevenuePeriod`, `RevenueReport`, `RevenueValues`, `BillingCatalog`, `CatalogCreditGrant`, `CatalogCurrencyPrices`, `CatalogDiscount`, `CatalogDiscountDuration`, `CatalogDiscountProducts`, `CatalogDiscountTerms`, `CatalogFeature`, `CatalogInterval`, `CatalogMeter`, `CatalogPack`, `CatalogPackPrices`, `CatalogPlan`, `CatalogPlanCreditGrant`, `CatalogPlanGift`, `CatalogPlanPrices`, `CatalogQuota`, `MeterUnit`, `BillingLaunch`, `BillingLaunchReason`, `ClaimRefusal`, `DueReferral`, `ReferralCodeView`, `ReferralComponents`, `ReferralRefs`, `ReferralConsole`, `ReferralConsoleRow`, `ReferralConsoleRows`, `ReferralEntry`, `ReferralPreview`, `ReferralProgram`, `Referrals`, `ReferralsApi`, `ReferralsView`, `ReferredOffer`, `ReferrerOffer`, `SetupReferralsOptions`, `StoredTerms`, `ReferralCaps`, `ReferralRewards`, `ReferralState`, `ReferralTerms`, `ReferredReward`, `ReferrerReward`.
|
|
252
|
+
Types: `BillingRateLimiter`, `DiscountInput`, `ProrationBehavior`, `ClientProrationBehavior`, `CancellationReason`, `RefundReason`, `SubscriptionTarget`, `UpdateSubscriptionOptions`, `CancelSubscriptionOptions`, `PauseSubscriptionOptions`, `CurrentSubscriptions`, `OrdersOptions`, `BillingOrder`, `BillingPage`, `UsageHistoryOptions`, `UsageEvent`, `RefundOrderOptions`, `RefundRecord`, `DiscountListOptions`, `BillingDiscounts`, `ApplyDiscountOptions`, `CheckoutPrefill`, `CampaignAttribution`, `CheckoutTrial`, `CheckoutOptions`, `ServerCheckoutOptions`, `FeatureCheckOptions`, `BenefitKind`, `EntitlementBenefit`, `EntitlementMeter`, `CustomerEntitlements`, `CreditMeterConfig`, `BillingCatalogIds`, `CatalogPassIds`, `BillingCatalogDiscount`, `SpendCreditsEvent`, `SpendReservation`, `RefundCreditsEvent`, `CostReport`, `GiftRecord`, `GiftTask`, `PricedCredits`, `PricedTrial`, `PricedPlanPrice`, `PricedPlan`, `PricedPlanGift`, `PricedGiftLength`, `PricedPack`, `PricedOffer`, `PricedPromotion`, `Pricing`, `QuotaUsage`, `BillingWebhookEventHandlers`, `SaveOfferTerms`, `BillingComponents`, `BillingEmail`, `BillingEntity`, `BillingAccessRule`, `BillingEntityCtx`, `EntityProfile`, `SetupBillingConfig`, `CommerceConfig`, `AccountBillingErasure`, `AccountBillingErasureInput`, `AccountBillingExport`, `AccountBillingRecord`, `Billing`, `BillingAudit`, `BillingLifecycle`, `CancelFlowState`, `CancelOutcome`, `BillingConsole`, `SaveOffer`, `SaveOfferRule`, `WithdrawalPeriod`, `MeterUsage`, `RevenueCancellations`, `RevenueInterval`, `RevenueMetric`, `RevenueOptions`, `RevenuePeriod`, `RevenueReport`, `RevenueValues`, `BillingCatalog`, `CatalogCreditGrant`, `CatalogCurrencyPrices`, `CatalogDiscount`, `CatalogDiscountDuration`, `CatalogDiscountProducts`, `CatalogDiscountTerms`, `CatalogFeature`, `CatalogInterval`, `CatalogMeter`, `CatalogPack`, `CatalogPackPrices`, `CatalogPlan`, `CatalogPlanCreditGrant`, `CatalogPlanGift`, `CatalogPlanPrices`, `CatalogQuota`, `MeterUnit`, `BillingProviderName`, `ChangePlanRequest`, `CheckoutCustomer`, `CheckoutRequest`, `CheckoutSession`, `CommerceProvider`, `DigitalContentConsent`, `InvoiceAnswer`, `NeutralBillingEvent`, `NeutralOrder`, `NeutralRefund`, `NeutralSubscription`, `NeutralSubscriptionStatus`, `ProviderCapabilities`, `ProviderEnvironment`, `ProviderOptions`, `RefundRequest`, `VerifiedDelivery`, `CommerceEventHandler`, `CommerceWebhookOptions`, `BillingLaunch`, `BillingLaunchReason`, `ClaimRefusal`, `DueReferral`, `ReferralCodeView`, `ReferralComponents`, `ReferralRefs`, `ReferralConsole`, `ReferralConsoleRow`, `ReferralConsoleRows`, `ReferralEntry`, `ReferralPreview`, `ReferralProgram`, `Referrals`, `ReferralsApi`, `ReferralsView`, `ReferredOffer`, `ReferrerOffer`, `SetupReferralsOptions`, `StoredTerms`, `ReferralCaps`, `ReferralRewards`, `ReferralState`, `ReferralTerms`, `ReferredReward`, `ReferrerReward`.
|
|
238
253
|
|
|
239
254
|
### `nuxt-backend/email`
|
|
240
255
|
|
|
@@ -250,7 +265,15 @@ Types: `BillingRateLimiter`, `DiscountInput`, `ProrationBehavior`, `ClientProrat
|
|
|
250
265
|
| `linkBlocks()` | The blocks of an email's one link: a button, then the link written out for a mail app that shows no button (the `email.link.fallback` label). |
|
|
251
266
|
| `plainName()` | A name someone typed as an email shows it: every link and bare domain taken out, whitespace collapsed, at most `max` characters; `undefined` when nothing is left. |
|
|
252
267
|
|
|
253
|
-
Types: `EmailBlock`, `DeletionCanceledEmailData`, `DeletionScheduledEmailData`, `EmailBrand`, `EmailChangedEmailData`, `EmailColors`, `EmailFonts`, `EmailLocalePaths`, `EmailMessage`, `EmailMessages`, `EmailPreview`, `EmailRenderContext`, `EmailScheme`, `EmailTemplateData`, `EmailTemplateName`, `EmailTemplateOverrides`, `EmailTemplates`, `EmailTheme`, `GiftEmailData`, `GiftPassEndingEmailData`, `RenewalReminderEmailData`, `WithdrawalReceiptEmailData`, `InviteEmailData`, `OtpEmailData`, `OtpPurpose`, `ResolvedEmailTheme`, `PasskeyRecoveredEmailData`, `NewDeviceEmailData`, `RequestOrigin`, `TopicConfirmationEmailData`, `TrustedHtml`, `WaitlistAdmittedEmailData`, `WaitlistConfirmationEmailData`, `WelcomeEmailData`, `NoticeReceivedEmailData`, `NoticeDecidedEmailData`, `ContentRestrictedEmailData`, `AppealDecidedEmailData`, `NotificationEmailData`, `AppLabels`, `AppNotificationLabels`, `LabelParams`, `Translate`, `ClockTime`, `EmailCaps`, `EmailTopic`, `EmailTopics`, `TopicSource`, `TopicState`, `EmailLinkView`, `EmailPreferencesApi`, `EmailTopicPreference`, `EmailContactProperty`, `EmailSyncAction`, `EmailSyncLogEntry`, `EmailSyncReport`, `EmailAutomations`, `EmailLifecycle`, `EmailRunCtx`, `LifecycleFlow`, `LifecycleFlowOptions`, `LifecycleKind`, `Suppression`, `SuppressionOrigin`, `SuppressionsApi`, `SuppressionsPage`, `AnnouncementAudience`, `AnnouncementBroadcastState`, `AnnouncementRow`, `AnnouncementsApi`, `AnnouncementsConsole`, `LiveAnnouncement`, `PublishAnnouncementInput`, `ContactOptions`, `InboundMessage`, `InboundOptions`, `InboundRateLimiter`, `InboundSyncReport`, `InboxConsole`, `InboxRow`, `EmailComponents`, `SandboxMessage`, `EmailStatus`, `EmailRecord`, `SendEmailOptions`, `EmailWebhookEventType`, `EmailEventData`, `InboxEmailEventData`, `ContactEventData`, `ContactTopicsEventData`, `SuppressionEventData`, `TopicEventData`, `DomainEventData`, `EmailWebhookEvent`, `EmailWebhookEventHandlers`, `EmailRetention`, `SetupEmailOptions`, `Email`.
|
|
268
|
+
Types: `EmailBlock`, `DeletionCanceledEmailData`, `DeletionScheduledEmailData`, `EmailBrand`, `EmailChangedEmailData`, `EmailColors`, `EmailFonts`, `EmailLocalePaths`, `EmailMessage`, `EmailMessages`, `EmailPreview`, `EmailRenderContext`, `EmailScheme`, `EmailTemplateData`, `EmailTemplateName`, `EmailTemplateOverrides`, `EmailTemplates`, `EmailTheme`, `GiftEmailData`, `GiftPassEndingEmailData`, `RenewalReminderEmailData`, `WithdrawalReceiptEmailData`, `InviteEmailData`, `OtpEmailData`, `OtpPurpose`, `ResolvedEmailTheme`, `PasskeyRecoveredEmailData`, `NewDeviceEmailData`, `RequestOrigin`, `TopicConfirmationEmailData`, `TrustedHtml`, `WaitlistAdmittedEmailData`, `WaitlistConfirmationEmailData`, `WaitlistFriendJoinedEmailData`, `WelcomeEmailData`, `NoticeReceivedEmailData`, `NoticeDecidedEmailData`, `ContentRestrictedEmailData`, `AppealDecidedEmailData`, `NotificationEmailData`, `AppLabels`, `AppNotificationLabels`, `LabelParams`, `Translate`, `ClockTime`, `EmailCaps`, `EmailTopic`, `EmailTopics`, `TopicSource`, `TopicState`, `EmailLinkView`, `EmailPreferencesApi`, `EmailTopicPreference`, `EmailContactProperty`, `EmailSyncAction`, `EmailSyncLogEntry`, `EmailSyncReport`, `EmailAutomations`, `EmailLifecycle`, `EmailRunCtx`, `LifecycleFlow`, `LifecycleFlowOptions`, `LifecycleKind`, `Suppression`, `SuppressionOrigin`, `SuppressionsApi`, `SuppressionsPage`, `AnnouncementAudience`, `AnnouncementBroadcastState`, `AnnouncementRow`, `AnnouncementsApi`, `AnnouncementsConsole`, `LiveAnnouncement`, `PublishAnnouncementInput`, `ContactOptions`, `InboundMessage`, `InboundOptions`, `InboundRateLimiter`, `InboundSyncReport`, `InboxConsole`, `InboxRow`, `EmailComponents`, `SandboxMessage`, `EmailStatus`, `EmailRecord`, `SendEmailOptions`, `EmailWebhookEventType`, `EmailEventData`, `InboxEmailEventData`, `ContactEventData`, `ContactTopicsEventData`, `SuppressionEventData`, `TopicEventData`, `DomainEventData`, `EmailWebhookEvent`, `EmailWebhookEventHandlers`, `EmailRetention`, `SetupEmailOptions`, `Email`.
|
|
269
|
+
|
|
270
|
+
### `nuxt-backend/presence`
|
|
271
|
+
|
|
272
|
+
| Export | What it is |
|
|
273
|
+
|---|---|
|
|
274
|
+
| `setupPresence()` | Who is here, for a page, a document or a workspace: Convex's presence component (`@convex-dev/presence`, mounted as `presence` in `convex.config.ts`) behind the backend's sign-in. |
|
|
275
|
+
|
|
276
|
+
Types: `PresenceComponents`, `PresenceRoomCheck`, `SetupPresenceOptions`, `RoomMember`, `PresenceSetup`.
|
|
254
277
|
|
|
255
278
|
### `nuxt-backend/rate-limit`
|
|
256
279
|
|
|
@@ -293,7 +316,7 @@ Types: `CampaignTouch`, `Activation`, `ActivationScope`, `ActivationTask`, `Acti
|
|
|
293
316
|
| `setupWaitlist()` | Run a waitlist for early access: joins proven by the sign-in code (the double opt-in), a place for everyone waiting, a boost for each friend who joins through their link, waves an administrator admits from the console's Waitlist tab, and a mirror of the people who asked for launch news to the email provider. |
|
|
294
317
|
| `ACCESS_PHASES` | Every launch phase, in order: an app lists the ones it goes through. |
|
|
295
318
|
|
|
296
|
-
Types: `AccessCtx`, `AccessWriteCtx`, `AccessPhaseState`, `AccessInvite`, `AccessMemberTicket`, `AccessAdmission`, `AccessConsole`, `AdmitResult`, `AccessApi`, `MemberTicket`, `MemberTicketsOptions`, `MemberTicketsApi`, `MemberTickets`, `Access`, `SetupAccessOptions`, `AccessEmail`, `AccessComponents`, `SetupWaitlistOptions`, `Waitlist`, `WaitlistApi`, `WaitlistCaps`, `WaitlistConsole`, `WaitlistEntryRow`, `WaitlistPlace`, `WaitlistStatusView`, `WaitlistQuestions`, `WaitlistStatus`, `AccessPhase`, `AccessTicket`, `InviteKind`, `InviteStatus`.
|
|
319
|
+
Types: `AccessCtx`, `AccessWriteCtx`, `AccessPhaseState`, `AccessInvite`, `AccessMemberTicket`, `AccessAdmission`, `AccessConsole`, `AdmitResult`, `AccessApi`, `MemberTicket`, `MemberTicketsOptions`, `MemberTicketsApi`, `MemberTickets`, `Access`, `SetupAccessOptions`, `AccessEmail`, `AccessComponents`, `SetupWaitlistOptions`, `Waitlist`, `WaitlistApi`, `WaitlistCaps`, `WaitlistConsole`, `WaitlistEntryRow`, `WaitlistPlace`, `WaitlistStatusView`, `WaitlistWaveStanding`, `WaitlistBoostOptions`, `WaitlistBoostRule`, `WaitlistOptions`, `WaitlistQuestions`, `WaitlistRule`, `WaitlistStatus`, `AccessPhase`, `AccessTicket`, `InviteKind`, `InviteStatus`.
|
|
297
320
|
|
|
298
321
|
### `nuxt-backend/account`
|
|
299
322
|
|
|
@@ -467,7 +490,7 @@ Scaffold the backend files, .env.example, and nuxt.config wiring (re-run to rest
|
|
|
467
490
|
- `--no-agents`: Coding-agent files: --agents rewrites only AGENTS.md's nuxt-backend section, .mcp.json and the agent skills in .agents/skills for the installed version, and adds the MCP SDK to devDependencies when missing; --no-agents skips them all
|
|
468
491
|
- `--json`: Machine-readable output
|
|
469
492
|
|
|
470
|
-
`--json`: `{ created, agentsMd, mcpJson, skills, appComponent, devScript, convexDependency, mcpSdkDependency, nuxtConfig, next }`, or `{ agentsMd, mcpJson, skills, mcpSdkDependency }` with `--agents`, where `skills` is `{ installed, refreshed, removed, stale }`, each a list of skill names; progress goes to stderr.
|
|
493
|
+
`--json`: `{ created, agentsMd, mcpJson, skills, pnpmWorkspace, appComponent, devScript, convexDependency, mcpSdkDependency, nuxtConfig, next }`, or `{ agentsMd, mcpJson, skills, mcpSdkDependency, pnpmWorkspace }` with `--agents`, where `skills` is `{ installed, refreshed, removed, stale }`, each a list of skill names, and `pnpmWorkspace` is `created`, `added`, `unchanged`, `manual` or null; progress goes to stderr.
|
|
471
494
|
|
|
472
495
|
### `npx nuxt-backend dev`
|
|
473
496
|
|
|
@@ -685,7 +708,7 @@ The app's parts, each detected as `live`, `test`, `missing` or `failing`: `npx n
|
|
|
685
708
|
| `auth` | Sign-in by email code and passkey, sessions, workspaces with roles and invitations, the admin console with impersonation, the activity trail, and each account's data export and complete erasure. | `AUTH_SECRET`, `SITE_URL` |
|
|
686
709
|
| `data` | The database with realtime queries, server rendering, full-text search, aggregates, counters and file storage. | `NUXT_PUBLIC_BACKEND_URL`, `BACKEND_ENVIRONMENT` |
|
|
687
710
|
| `jobs` | Scheduled jobs, durable workflows, queued work, cached action results, migrations and the backend's own hourly maintenance. | |
|
|
688
|
-
| `billing` | Plans with monthly and yearly prices, prepaid credits, a server-rendered pricing page, feature gates, gifts and the customer portal, from a catalog in code. | `BILLING_ACCESS_TOKEN`, `BILLING_WEBHOOK_SECRET` |
|
|
711
|
+
| `billing` | Plans with monthly and yearly prices, prepaid credits, a server-rendered pricing page, feature gates, gifts and the customer portal, from a catalog in code. | `BILLING_PROVIDER`, `BILLING_ACCESS_TOKEN`, `BILLING_WEBHOOK_SECRET` |
|
|
689
712
|
| `email` | Transactional and marketing mail from one template registry, with delivery tracking and the dev inbox. | `EMAIL_API_KEY`, `EMAIL_FROM`, `EMAIL_MARKETING_FROM`, `EMAIL_REGION`, `EMAIL_WEBHOOK_SECRET`, `EMAIL_DEV_INBOX` |
|
|
690
713
|
| `notifications` | An in-app inbox for every event the backend records about a person and for events of your own, live and in each person's language, with the unread count and marking read; the kinds that allow it by email, and as web push to each device a person allowed, under their channel choices. | `PUSH_PUBLIC_KEY`, `PUSH_PRIVATE_KEY` |
|
|
691
714
|
| `ai` | 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. | `AI_GATEWAY_API_KEY`, `PROVENANCE_PRIVATE_KEY`, `PROVENANCE_CERTIFICATE`, `CONTENT_SAFETY_ENDPOINT`, `CONTENT_SAFETY_KEY`, `SECOND_OPINION_KEY`, `KNOWN_ABUSE_KEY` |
|
|
@@ -711,6 +734,7 @@ The app's parts, each detected as `live`, `test`, `missing` or `failing`: `npx n
|
|
|
711
734
|
| `consent-urls` | auth | Consent documents |
|
|
712
735
|
| `admin-bootstrap` | auth | First administrator |
|
|
713
736
|
| `page-paths` | auth | Page paths |
|
|
737
|
+
| `auth-provider` | auth | Auth provider |
|
|
714
738
|
| `backend-site-url` | data | Backend site URL |
|
|
715
739
|
| `deployment-env` | data | Deployment env |
|
|
716
740
|
| `deployment-backend-environment` | data | Deployment BACKEND_ENVIRONMENT |
|
|
@@ -824,6 +848,7 @@ The app's parts, each detected as `live`, `test`, `missing` or `failing`: `npx n
|
|
|
824
848
|
| `EMAIL_REGION` | email | deployment | optional | the provider's default region |
|
|
825
849
|
| `EMAIL_WEBHOOK_SECRET` | email | deployment | optional | delivery events are rejected — useEmailStatus stays at "sent" |
|
|
826
850
|
| `EMAIL_DEV_INBOX` | email | deployment | dev-only | the dev inbox's page reader (getSandboxInbox, behind useSandboxInbox) answers nothing; the CLI's inbox still reads |
|
|
851
|
+
| `BILLING_PROVIDER` | billing | deployment | optional | billing sells through Polar, on the Convex component setupBilling is built on |
|
|
827
852
|
| `BILLING_ACCESS_TOKEN` | billing | deployment | optional | 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 |
|
|
828
853
|
| `BILLING_WEBHOOK_SECRET` | billing | deployment | optional | billing events are rejected — entitlements refresh only on demand (syncEntitlements) |
|
|
829
854
|
| `AI_GATEWAY_API_KEY` | ai | deployment | optional | 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 |
|
|
@@ -23,7 +23,7 @@ signs everybody out. `npx nuxt-backend dev` generates it on a dev deployment; le
|
|
|
23
23
|
`npx nuxt-backend` below is the project's own copy. Run it as that column says, not with
|
|
24
24
|
`dlx`, which fetches a separate one.
|
|
25
25
|
|
|
26
|
-
2. **Versions.** The package needs Nuxt 4 from 4.
|
|
26
|
+
2. **Versions.** The package needs Nuxt 4 from 4.7.0 (not Nuxt 5 yet) and Node ≥ 24.11.0. Check
|
|
27
27
|
`node -v` and the `nuxt` version in `package.json`. If either is out of range, stop and tell
|
|
28
28
|
the user; don't upgrade or downgrade Nuxt on your own.
|
|
29
29
|
|
|
@@ -70,8 +70,9 @@ npx nuxt-backend init
|
|
|
70
70
|
and the CLI that runs them. `init` writes the backend files (`backend/`, or into the existing
|
|
71
71
|
functions folder), `convex.json` when that folder is not `convex/`, `.env.example`, an
|
|
72
72
|
`AGENTS.md` section, `.mcp.json` and the agent skills in `.agents/skills/` for agents, adds `'nuxt-backend'` to `modules`, points the
|
|
73
|
-
`dev` script at `nuxt-backend dev`,
|
|
74
|
-
`app/app.vue` so the module's pages render
|
|
73
|
+
`dev` script at `nuxt-backend dev`, swaps `<NuxtWelcome />` for `<NuxtPage />` in an untouched
|
|
74
|
+
`app/app.vue` so the module's pages render, and writes `app/pages/index.vue` when no page answers
|
|
75
|
+
`/` and the app extends no layer. It never replaces a file that exists.
|
|
75
76
|
|
|
76
77
|
Check what `init` printed:
|
|
77
78
|
|
|
@@ -110,9 +111,11 @@ pnpm notes:
|
|
|
110
111
|
- pnpm's default layout hides the Convex components nuxt-backend brings, and Convex needs to
|
|
111
112
|
resolve them: add `publicHoistPattern: ['@convex-dev/*']` to `pnpm-workspace.yaml`, then install
|
|
112
113
|
again. (Apps made from the starter carry both settings in `.pnpmfile.mjs`.)
|
|
113
|
-
- pnpm 12 lists nuxt-backend under "Agent skills awaiting approval"
|
|
114
|
-
those skills in `.agents/skills`, and approving links a
|
|
115
|
-
|
|
114
|
+
- pnpm 12 lists nuxt-backend under "Agent skills awaiting approval" until its skills are approved
|
|
115
|
+
or denied. `init` already installed those skills in `.agents/skills`, and approving links a
|
|
116
|
+
second copy of each, so under pnpm 12.11 or later `init` denies them in `pnpm-workspace.yaml`
|
|
117
|
+
(`skills: false` under `permissions`). When pnpm still lists nuxt-backend (an app set up under
|
|
118
|
+
pnpm 11), run `npx nuxt-backend init --agents`, or suggest `pnpm approve '!nuxt-backend'`.
|
|
116
119
|
|
|
117
120
|
## 2. Start it: the deployment, its env, the generated code
|
|
118
121
|
|