nuxt-backend 0.5.1 → 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.
Files changed (414) hide show
  1. package/README.md +5 -2
  2. package/dist/capabilities/registry.js +1 -1
  3. package/dist/chunks/catalog.mjs +1 -1
  4. package/dist/chunks/{index.mjs → devtools.mjs} +2 -2
  5. package/dist/chunks/doctor.mjs +14 -6
  6. package/dist/chunks/email-previews.mjs +1 -1
  7. package/dist/chunks/health.mjs +2 -2
  8. package/dist/chunks/install.mjs +4 -4
  9. package/dist/chunks/run.mjs +1 -1
  10. package/dist/chunks/server.mjs +15 -4
  11. package/dist/cli.mjs +24 -4
  12. package/dist/convex/access-tickets.d.ts +17 -2
  13. package/dist/convex/access-tickets.d.ts.map +1 -1
  14. package/dist/convex/account-data.d.ts +4 -4
  15. package/dist/convex/account-data.d.ts.map +1 -1
  16. package/dist/convex/account-data.js +5 -4
  17. package/dist/convex/account-data.js.map +1 -1
  18. package/dist/convex/app.d.ts +1 -0
  19. package/dist/convex/app.d.ts.map +1 -1
  20. package/dist/convex/app.js +2 -1
  21. package/dist/convex/app.js.map +1 -1
  22. package/dist/convex/client/better-auth-options.d.ts.map +1 -1
  23. package/dist/convex/client/better-auth-options.js +12 -3
  24. package/dist/convex/client/better-auth-options.js.map +1 -1
  25. package/dist/convex/client/component.d.ts +4 -0
  26. package/dist/convex/client/component.d.ts.map +1 -1
  27. package/dist/convex/client/index.d.ts +5 -0
  28. package/dist/convex/client/index.d.ts.map +1 -1
  29. package/dist/convex/client/launch-gate.d.ts.map +1 -1
  30. package/dist/convex/client/launch-gate.js +30 -1
  31. package/dist/convex/client/launch-gate.js.map +1 -1
  32. package/dist/convex/client/plugins.d.ts.map +1 -1
  33. package/dist/convex/client/plugins.js +3 -0
  34. package/dist/convex/client/plugins.js.map +1 -1
  35. package/dist/convex/client/two-factor.d.ts +7 -0
  36. package/dist/convex/client/two-factor.d.ts.map +1 -0
  37. package/dist/convex/client/two-factor.js +57 -0
  38. package/dist/convex/client/two-factor.js.map +1 -0
  39. package/dist/convex/components/backend/_generated/api.d.ts +2 -0
  40. package/dist/convex/components/backend/_generated/api.d.ts.map +1 -1
  41. package/dist/convex/components/backend/_generated/api.js.map +1 -1
  42. package/dist/convex/components/backend/_generated/component.d.ts +292 -10
  43. package/dist/convex/components/backend/_generated/component.d.ts.map +1 -1
  44. package/dist/convex/components/backend/account.d.ts +63 -17
  45. package/dist/convex/components/backend/account.d.ts.map +1 -1
  46. package/dist/convex/components/backend/account.js +24 -1
  47. package/dist/convex/components/backend/account.js.map +1 -1
  48. package/dist/convex/components/backend/adapter.d.ts.map +1 -1
  49. package/dist/convex/components/backend/adapter.js +7 -2
  50. package/dist/convex/components/backend/adapter.js.map +1 -1
  51. package/dist/convex/components/backend/ai.d.ts +1 -1
  52. package/dist/convex/components/backend/billing.d.ts +10 -0
  53. package/dist/convex/components/backend/billing.d.ts.map +1 -1
  54. package/dist/convex/components/backend/billing.js +2 -1
  55. package/dist/convex/components/backend/billing.js.map +1 -1
  56. package/dist/convex/components/backend/commerce.d.ts +229 -0
  57. package/dist/convex/components/backend/commerce.d.ts.map +1 -0
  58. package/dist/convex/components/backend/commerce.js +392 -0
  59. package/dist/convex/components/backend/commerce.js.map +1 -0
  60. package/dist/convex/components/backend/funnel.d.ts +6 -6
  61. package/dist/convex/components/backend/jobs.d.ts +1 -1
  62. package/dist/convex/components/backend/referrals.d.ts +2 -2
  63. package/dist/convex/components/backend/schema.d.ts +327 -21
  64. package/dist/convex/components/backend/schema.d.ts.map +1 -1
  65. package/dist/convex/components/backend/schema.js +108 -1
  66. package/dist/convex/components/backend/schema.js.map +1 -1
  67. package/dist/convex/components/backend/waitlist.d.ts +42 -6
  68. package/dist/convex/components/backend/waitlist.d.ts.map +1 -1
  69. package/dist/convex/components/backend/waitlist.js +142 -39
  70. package/dist/convex/components/backend/waitlist.js.map +1 -1
  71. package/dist/convex/email-templates.d.ts +12 -0
  72. package/dist/convex/email-templates.d.ts.map +1 -1
  73. package/dist/convex/email-templates.js +3 -0
  74. package/dist/convex/email-templates.js.map +1 -1
  75. package/dist/convex/emails/waitlist-friend-joined.d.ts +9 -0
  76. package/dist/convex/emails/waitlist-friend-joined.d.ts.map +1 -0
  77. package/dist/convex/emails/waitlist-friend-joined.js +22 -0
  78. package/dist/convex/emails/waitlist-friend-joined.js.map +1 -0
  79. package/dist/convex/errors.d.ts +6 -6
  80. package/dist/convex/errors.d.ts.map +1 -1
  81. package/dist/convex/errors.js +14 -2
  82. package/dist/convex/errors.js.map +1 -1
  83. package/dist/convex/events.d.ts +19 -0
  84. package/dist/convex/events.d.ts.map +1 -1
  85. package/dist/convex/events.js +14 -0
  86. package/dist/convex/events.js.map +1 -1
  87. package/dist/convex/integrations/billing/checkout.d.ts +2 -2
  88. package/dist/convex/integrations/billing/checkout.d.ts.map +1 -1
  89. package/dist/convex/integrations/billing/checkout.js +79 -11
  90. package/dist/convex/integrations/billing/checkout.js.map +1 -1
  91. package/dist/convex/integrations/billing/commerce-entitlements.d.ts +12 -0
  92. package/dist/convex/integrations/billing/commerce-entitlements.d.ts.map +1 -0
  93. package/dist/convex/integrations/billing/commerce-entitlements.js +78 -0
  94. package/dist/convex/integrations/billing/commerce-entitlements.js.map +1 -0
  95. package/dist/convex/integrations/billing/commerce-events.d.ts +15 -0
  96. package/dist/convex/integrations/billing/commerce-events.d.ts.map +1 -0
  97. package/dist/convex/integrations/billing/commerce-events.js +433 -0
  98. package/dist/convex/integrations/billing/commerce-events.js.map +1 -0
  99. package/dist/convex/integrations/billing/commerce-history.d.ts +20 -0
  100. package/dist/convex/integrations/billing/commerce-history.d.ts.map +1 -0
  101. package/dist/convex/integrations/billing/commerce-history.js +106 -0
  102. package/dist/convex/integrations/billing/commerce-history.js.map +1 -0
  103. package/dist/convex/integrations/billing/commerce-webhooks.d.ts +23 -0
  104. package/dist/convex/integrations/billing/commerce-webhooks.d.ts.map +1 -0
  105. package/dist/convex/integrations/billing/commerce-webhooks.js +49 -0
  106. package/dist/convex/integrations/billing/commerce-webhooks.js.map +1 -0
  107. package/dist/convex/integrations/billing/commerce.d.ts +100 -0
  108. package/dist/convex/integrations/billing/commerce.d.ts.map +1 -0
  109. package/dist/convex/integrations/billing/commerce.js +323 -0
  110. package/dist/convex/integrations/billing/commerce.js.map +1 -0
  111. package/dist/convex/integrations/billing/context.d.ts +8 -0
  112. package/dist/convex/integrations/billing/context.d.ts.map +1 -1
  113. package/dist/convex/integrations/billing/context.js +14 -2
  114. package/dist/convex/integrations/billing/context.js.map +1 -1
  115. package/dist/convex/integrations/billing/credits.d.ts +1 -1
  116. package/dist/convex/integrations/billing/credits.d.ts.map +1 -1
  117. package/dist/convex/integrations/billing/credits.js +49 -28
  118. package/dist/convex/integrations/billing/credits.js.map +1 -1
  119. package/dist/convex/integrations/billing/customers.d.ts +1 -1
  120. package/dist/convex/integrations/billing/customers.d.ts.map +1 -1
  121. package/dist/convex/integrations/billing/customers.js +15 -1
  122. package/dist/convex/integrations/billing/customers.js.map +1 -1
  123. package/dist/convex/integrations/billing/entitlements.d.ts +1 -1
  124. package/dist/convex/integrations/billing/entitlements.d.ts.map +1 -1
  125. package/dist/convex/integrations/billing/entitlements.js +6 -1
  126. package/dist/convex/integrations/billing/entitlements.js.map +1 -1
  127. package/dist/convex/integrations/billing/erasure.d.ts +1 -1
  128. package/dist/convex/integrations/billing/erasure.d.ts.map +1 -1
  129. package/dist/convex/integrations/billing/erasure.js +10 -5
  130. package/dist/convex/integrations/billing/erasure.js.map +1 -1
  131. package/dist/convex/integrations/billing/free-plan.d.ts +6 -1
  132. package/dist/convex/integrations/billing/free-plan.d.ts.map +1 -1
  133. package/dist/convex/integrations/billing/free-plan.js +22 -4
  134. package/dist/convex/integrations/billing/free-plan.js.map +1 -1
  135. package/dist/convex/integrations/billing/functions.d.ts +1 -1
  136. package/dist/convex/integrations/billing/functions.d.ts.map +1 -1
  137. package/dist/convex/integrations/billing/functions.js +3 -2
  138. package/dist/convex/integrations/billing/functions.js.map +1 -1
  139. package/dist/convex/integrations/billing/gifts.d.ts.map +1 -1
  140. package/dist/convex/integrations/billing/gifts.js +3 -0
  141. package/dist/convex/integrations/billing/gifts.js.map +1 -1
  142. package/dist/convex/integrations/billing/history.d.ts +1 -1
  143. package/dist/convex/integrations/billing/history.d.ts.map +1 -1
  144. package/dist/convex/integrations/billing/history.js +6 -1
  145. package/dist/convex/integrations/billing/history.js.map +1 -1
  146. package/dist/convex/integrations/billing/lifecycle.d.ts +1 -1
  147. package/dist/convex/integrations/billing/lifecycle.d.ts.map +1 -1
  148. package/dist/convex/integrations/billing/lifecycle.js +4 -1
  149. package/dist/convex/integrations/billing/lifecycle.js.map +1 -1
  150. package/dist/convex/integrations/billing/providers/capabilities.d.ts +17 -0
  151. package/dist/convex/integrations/billing/providers/capabilities.d.ts.map +1 -0
  152. package/dist/convex/integrations/billing/providers/capabilities.js +77 -0
  153. package/dist/convex/integrations/billing/providers/capabilities.js.map +1 -0
  154. package/dist/convex/integrations/billing/providers/consent.d.ts +52 -0
  155. package/dist/convex/integrations/billing/providers/consent.d.ts.map +1 -0
  156. package/dist/convex/integrations/billing/providers/consent.js +79 -0
  157. package/dist/convex/integrations/billing/providers/consent.js.map +1 -0
  158. package/dist/convex/integrations/billing/providers/creem.d.ts +22 -0
  159. package/dist/convex/integrations/billing/providers/creem.d.ts.map +1 -0
  160. package/dist/convex/integrations/billing/providers/creem.js +208 -0
  161. package/dist/convex/integrations/billing/providers/creem.js.map +1 -0
  162. package/dist/convex/integrations/billing/providers/dodo.d.ts +15 -0
  163. package/dist/convex/integrations/billing/providers/dodo.d.ts.map +1 -0
  164. package/dist/convex/integrations/billing/providers/dodo.js +197 -0
  165. package/dist/convex/integrations/billing/providers/dodo.js.map +1 -0
  166. package/dist/convex/integrations/billing/providers/http.d.ts +41 -0
  167. package/dist/convex/integrations/billing/providers/http.d.ts.map +1 -0
  168. package/dist/convex/integrations/billing/providers/http.js +146 -0
  169. package/dist/convex/integrations/billing/providers/http.js.map +1 -0
  170. package/dist/convex/integrations/billing/providers/index.d.ts +35 -0
  171. package/dist/convex/integrations/billing/providers/index.d.ts.map +1 -0
  172. package/dist/convex/integrations/billing/providers/index.js +62 -0
  173. package/dist/convex/integrations/billing/providers/index.js.map +1 -0
  174. package/dist/convex/integrations/billing/providers/stripe.d.ts +28 -0
  175. package/dist/convex/integrations/billing/providers/stripe.d.ts.map +1 -0
  176. package/dist/convex/integrations/billing/providers/stripe.js +327 -0
  177. package/dist/convex/integrations/billing/providers/stripe.js.map +1 -0
  178. package/dist/convex/integrations/billing/providers/types.d.ts +263 -0
  179. package/dist/convex/integrations/billing/providers/types.d.ts.map +1 -0
  180. package/dist/convex/integrations/billing/providers/types.js +48 -0
  181. package/dist/convex/integrations/billing/providers/types.js.map +1 -0
  182. package/dist/convex/integrations/billing/subscriptions.d.ts +1 -1
  183. package/dist/convex/integrations/billing/subscriptions.d.ts.map +1 -1
  184. package/dist/convex/integrations/billing/subscriptions.js +20 -6
  185. package/dist/convex/integrations/billing/subscriptions.js.map +1 -1
  186. package/dist/convex/integrations/billing/types/setup.d.ts +64 -1
  187. package/dist/convex/integrations/billing/types/setup.d.ts.map +1 -1
  188. package/dist/convex/integrations/billing.d.ts +4 -1
  189. package/dist/convex/integrations/billing.d.ts.map +1 -1
  190. package/dist/convex/integrations/billing.js +12 -2
  191. package/dist/convex/integrations/billing.js.map +1 -1
  192. package/dist/convex/integrations/email.d.ts +1 -1
  193. package/dist/convex/integrations/email.d.ts.map +1 -1
  194. package/dist/convex/integrations/email.js.map +1 -1
  195. package/dist/convex/integrations/launch.d.ts +27 -2
  196. package/dist/convex/integrations/launch.d.ts.map +1 -1
  197. package/dist/convex/integrations/launch.js +15 -3
  198. package/dist/convex/integrations/launch.js.map +1 -1
  199. package/dist/convex/integrations/presence.d.ts +110 -0
  200. package/dist/convex/integrations/presence.d.ts.map +1 -0
  201. package/dist/convex/integrations/presence.js +92 -0
  202. package/dist/convex/integrations/presence.js.map +1 -0
  203. package/dist/convex/integrations/waitlist.d.ts +41 -7
  204. package/dist/convex/integrations/waitlist.d.ts.map +1 -1
  205. package/dist/convex/integrations/waitlist.js +45 -6
  206. package/dist/convex/integrations/waitlist.js.map +1 -1
  207. package/dist/convex/integrations/webhook-guard.d.ts +8 -0
  208. package/dist/convex/integrations/webhook-guard.d.ts.map +1 -1
  209. package/dist/convex/integrations/webhook-guard.js +11 -4
  210. package/dist/convex/integrations/webhook-guard.js.map +1 -1
  211. package/dist/convex/label-groups/admin.d.ts +9 -0
  212. package/dist/convex/label-groups/admin.d.ts.map +1 -1
  213. package/dist/convex/label-groups/admin.js +9 -0
  214. package/dist/convex/label-groups/admin.js.map +1 -1
  215. package/dist/convex/label-groups/audit.d.ts +2 -0
  216. package/dist/convex/label-groups/audit.d.ts.map +1 -1
  217. package/dist/convex/label-groups/audit.js +2 -0
  218. package/dist/convex/label-groups/audit.js.map +1 -1
  219. package/dist/convex/label-groups/auth.d.ts +9 -0
  220. package/dist/convex/label-groups/auth.d.ts.map +1 -1
  221. package/dist/convex/label-groups/auth.js +10 -0
  222. package/dist/convex/label-groups/auth.js.map +1 -1
  223. package/dist/convex/label-groups/email.d.ts +6 -0
  224. package/dist/convex/label-groups/email.d.ts.map +1 -1
  225. package/dist/convex/label-groups/email.js +7 -0
  226. package/dist/convex/label-groups/email.js.map +1 -1
  227. package/dist/convex/label-groups/errors.d.ts +4 -0
  228. package/dist/convex/label-groups/errors.d.ts.map +1 -1
  229. package/dist/convex/label-groups/errors.js +4 -0
  230. package/dist/convex/label-groups/errors.js.map +1 -1
  231. package/dist/convex/label-groups/security.d.ts +19 -0
  232. package/dist/convex/label-groups/security.d.ts.map +1 -1
  233. package/dist/convex/label-groups/security.js +20 -0
  234. package/dist/convex/label-groups/security.js.map +1 -1
  235. package/dist/convex/label-groups/waitlist.d.ts +8 -0
  236. package/dist/convex/label-groups/waitlist.d.ts.map +1 -1
  237. package/dist/convex/label-groups/waitlist.js +9 -0
  238. package/dist/convex/label-groups/waitlist.js.map +1 -1
  239. package/dist/convex/label-translations.d.ts.map +1 -1
  240. package/dist/convex/label-translations.js +24 -0
  241. package/dist/convex/label-translations.js.map +1 -1
  242. package/dist/convex/labels.d.ts +57 -0
  243. package/dist/convex/labels.d.ts.map +1 -1
  244. package/dist/convex/log.js +2 -0
  245. package/dist/convex/log.js.map +1 -1
  246. package/dist/convex/sensitive-actions.d.ts.map +1 -1
  247. package/dist/convex/sensitive-actions.js +11 -0
  248. package/dist/convex/sensitive-actions.js.map +1 -1
  249. package/dist/convex/waitlist-rules.d.ts +63 -9
  250. package/dist/convex/waitlist-rules.d.ts.map +1 -1
  251. package/dist/convex/waitlist-rules.js +38 -7
  252. package/dist/convex/waitlist-rules.js.map +1 -1
  253. package/dist/devtools-client/_nuxt/DHNi4uhO.js +6 -0
  254. package/dist/devtools-client/index.html +1 -1
  255. package/dist/env-registry.js +9 -0
  256. package/dist/module.d.ts +14 -2
  257. package/dist/module.js +2 -2
  258. package/dist/module.json +2 -2
  259. package/dist/runtime/locales/de.json +58 -1
  260. package/dist/runtime/locales/en.json +60 -3
  261. package/dist/runtime/locales/es.json +58 -1
  262. package/dist/runtime/locales/fr.json +58 -1
  263. package/dist/runtime/locales/ru.json +58 -1
  264. package/dist/runtime/server/monitoring/backend-calls.d.ts +3 -3
  265. package/dist/runtime/server/monitoring/backend-calls.js +2 -2
  266. package/dist/runtime/server/monitoring/health.js +2 -2
  267. package/dist/runtime/vue/auth-client.d.ts +3 -2
  268. package/dist/runtime/vue/auth-client.js +2 -1
  269. package/dist/runtime/vue/components/account/SecuritySettings.d.vue.ts +25 -2
  270. package/dist/runtime/vue/components/account/SecuritySettings.vue +52 -2
  271. package/dist/runtime/vue/components/account/SecuritySettings.vue.d.ts +25 -2
  272. package/dist/runtime/vue/components/account/SecurityTwoFactor.css +1 -0
  273. package/dist/runtime/vue/components/account/SecurityTwoFactor.d.vue.ts +4 -0
  274. package/dist/runtime/vue/components/account/SecurityTwoFactor.vue +107 -0
  275. package/dist/runtime/vue/components/account/SecurityTwoFactor.vue.d.ts +4 -0
  276. package/dist/runtime/vue/components/account/security-settings.d.ts +18 -1
  277. package/dist/runtime/vue/components/admin/AdminUsers.d.vue.ts +11 -2
  278. package/dist/runtime/vue/components/admin/AdminUsers.vue.d.ts +11 -2
  279. package/dist/runtime/vue/components/admin/AdminWaitlist.css +1 -1
  280. package/dist/runtime/vue/components/admin/AdminWaitlistActions.vue +41 -1
  281. package/dist/runtime/vue/components/admin/AdminWorkspaces.d.vue.ts +9 -0
  282. package/dist/runtime/vue/components/admin/AdminWorkspaces.vue.d.ts +9 -0
  283. package/dist/runtime/vue/components/admin/admin-waitlist-tab.js +28 -0
  284. package/dist/runtime/vue/components/auth/AuthForm.d.vue.ts +9 -0
  285. package/dist/runtime/vue/components/auth/AuthForm.vue +8 -0
  286. package/dist/runtime/vue/components/auth/AuthForm.vue.d.ts +9 -0
  287. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.css +1 -0
  288. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.d.vue.ts +3 -0
  289. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue +70 -0
  290. package/dist/runtime/vue/components/auth/AuthFormTwoFactor.vue.d.ts +3 -0
  291. package/dist/runtime/vue/components/auth/AuthFormWaitlisted.vue +7 -2
  292. package/dist/runtime/vue/components/auth/WaitlistForm.d.vue.ts +8 -0
  293. package/dist/runtime/vue/components/auth/WaitlistForm.vue.d.ts +8 -0
  294. package/dist/runtime/vue/components/auth/WaitlistPlace.css +1 -1
  295. package/dist/runtime/vue/components/auth/WaitlistPlace.vue +37 -0
  296. package/dist/runtime/vue/components/auth/WaitlistShare.vue +2 -2
  297. package/dist/runtime/vue/components/auth/auth-form.d.ts +2 -0
  298. package/dist/runtime/vue/components/workspaces/AuditLog.d.vue.ts +2 -0
  299. package/dist/runtime/vue/components/workspaces/AuditLog.vue.d.ts +2 -0
  300. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.d.vue.ts +2 -2
  301. package/dist/runtime/vue/components/workspaces/WorkspaceSettings.vue.d.ts +2 -2
  302. package/dist/runtime/vue/composables/use-login-flow.d.ts +19 -4
  303. package/dist/runtime/vue/composables/use-login-flow.js +31 -0
  304. package/dist/runtime/vue/composables/use-room-presence.d.ts +63 -0
  305. package/dist/runtime/vue/composables/use-room-presence.js +31 -0
  306. package/dist/runtime/vue/composables/use-two-factor.d.ts +58 -0
  307. package/dist/runtime/vue/composables/use-two-factor.js +49 -0
  308. package/dist/runtime/vue/composables/use-waitlist-admin.d.ts +5 -0
  309. package/dist/runtime/vue/composables/use-waitlist-admin.js +5 -1
  310. package/dist/runtime/vue/composables/use-waitlist.d.ts +4 -0
  311. package/dist/runtime/vue/composables/use-waitlist.js +1 -1
  312. package/dist/runtime/vue/parts.d.ts +8 -1
  313. package/dist/runtime/vue/two-factor-client.d.ts +15 -0
  314. package/dist/runtime/vue/two-factor-client.js +19 -0
  315. package/dist/runtime/vue/utils/auth-session.js +10 -1
  316. package/dist/runtime/vue/utils/login-bindings.js +1 -0
  317. package/dist/runtime/vue/utils/page-guard.d.ts +2 -2
  318. package/dist/runtime/vue/utils/page-guard.js +2 -2
  319. package/dist/shared/{nuxt-backend.BvKvJ1mo.mjs → nuxt-backend.CM_p0XQE.mjs} +1 -1
  320. package/dist/shared/{nuxt-backend.DRuHg-IQ.mjs → nuxt-backend.C_Y_BtBs.mjs} +2 -2
  321. package/dist/shared/{nuxt-backend.suXOnqOQ.mjs → nuxt-backend.ChvlbHQq.mjs} +42 -7
  322. package/dist/shared/{nuxt-backend.0r1vvS1c.mjs → nuxt-backend.D16peTIt.mjs} +56 -34
  323. package/dist/shared/{nuxt-backend.zY6UDqDu.mjs → nuxt-backend.D4JXvCP6.mjs} +3 -2
  324. package/dist/types.d.ts +1 -1
  325. package/package.json +19 -10
  326. package/skills/nuxt-backend/SKILL.md +18 -18
  327. package/skills/nuxt-backend/references/api.md +30 -5
  328. package/skills/nuxt-backend/references/install.md +1 -1
  329. package/skills/nuxt-backend/references/renames.json +8 -0
  330. package/skills/nuxt-backend/references/surface.json +62 -2
  331. package/skills/nuxt-backend-auth/SKILL.md +8 -2
  332. package/skills/nuxt-backend-auth/references/api.md +3 -1
  333. package/skills/nuxt-backend-billing/SKILL.md +15 -0
  334. package/skills/nuxt-backend-billing/references/api.md +14 -1
  335. package/skills/nuxt-backend-data/SKILL.md +1 -0
  336. package/skills/nuxt-backend-data/references/api.md +10 -1
  337. package/skills/nuxt-backend-email/references/api.md +1 -1
  338. package/skills/nuxt-backend-ship/SKILL.md +2 -1
  339. package/skills/nuxt-backend-upgrade/references/upgrade.md +6 -0
  340. package/src/convex/access-tickets.ts +10 -2
  341. package/src/convex/account-data.ts +5 -4
  342. package/src/convex/app.ts +2 -1
  343. package/src/convex/client/better-auth-options.ts +12 -3
  344. package/src/convex/client/launch-gate.ts +28 -1
  345. package/src/convex/client/plugins.ts +3 -0
  346. package/src/convex/client/two-factor.ts +66 -0
  347. package/src/convex/components/backend/_generated/api.ts +2 -0
  348. package/src/convex/components/backend/_generated/component.ts +500 -2
  349. package/src/convex/components/backend/account.ts +25 -1
  350. package/src/convex/components/backend/adapter.ts +7 -2
  351. package/src/convex/components/backend/billing.ts +2 -1
  352. package/src/convex/components/backend/commerce.ts +408 -0
  353. package/src/convex/components/backend/schema.ts +110 -1
  354. package/src/convex/components/backend/waitlist.ts +144 -40
  355. package/src/convex/email-templates.ts +16 -0
  356. package/src/convex/emails/waitlist-friend-joined.ts +23 -0
  357. package/src/convex/errors.ts +15 -2
  358. package/src/convex/events.ts +14 -0
  359. package/src/convex/integrations/billing/checkout.ts +78 -11
  360. package/src/convex/integrations/billing/commerce-entitlements.ts +92 -0
  361. package/src/convex/integrations/billing/commerce-events.ts +487 -0
  362. package/src/convex/integrations/billing/commerce-history.ts +110 -0
  363. package/src/convex/integrations/billing/commerce-webhooks.ts +69 -0
  364. package/src/convex/integrations/billing/commerce.ts +366 -0
  365. package/src/convex/integrations/billing/context.ts +19 -2
  366. package/src/convex/integrations/billing/credits.ts +47 -27
  367. package/src/convex/integrations/billing/customers.ts +15 -1
  368. package/src/convex/integrations/billing/entitlements.ts +5 -1
  369. package/src/convex/integrations/billing/erasure.ts +11 -6
  370. package/src/convex/integrations/billing/free-plan.ts +30 -5
  371. package/src/convex/integrations/billing/functions.ts +3 -2
  372. package/src/convex/integrations/billing/gifts.ts +2 -0
  373. package/src/convex/integrations/billing/history.ts +9 -0
  374. package/src/convex/integrations/billing/lifecycle.ts +3 -1
  375. package/src/convex/integrations/billing/providers/capabilities.ts +78 -0
  376. package/src/convex/integrations/billing/providers/consent.ts +94 -0
  377. package/src/convex/integrations/billing/providers/creem.ts +225 -0
  378. package/src/convex/integrations/billing/providers/dodo.ts +214 -0
  379. package/src/convex/integrations/billing/providers/http.ts +168 -0
  380. package/src/convex/integrations/billing/providers/index.ts +65 -0
  381. package/src/convex/integrations/billing/providers/stripe.ts +345 -0
  382. package/src/convex/integrations/billing/providers/types.ts +281 -0
  383. package/src/convex/integrations/billing/subscriptions.ts +20 -6
  384. package/src/convex/integrations/billing/types/setup.ts +63 -1
  385. package/src/convex/integrations/billing.ts +46 -3
  386. package/src/convex/integrations/email.ts +1 -0
  387. package/src/convex/integrations/launch.ts +45 -7
  388. package/src/convex/integrations/presence.ts +160 -0
  389. package/src/convex/integrations/waitlist.ts +84 -12
  390. package/src/convex/integrations/webhook-guard.ts +20 -4
  391. package/src/convex/label-groups/admin.ts +9 -0
  392. package/src/convex/label-groups/audit.ts +2 -0
  393. package/src/convex/label-groups/auth.ts +10 -0
  394. package/src/convex/label-groups/email.ts +7 -0
  395. package/src/convex/label-groups/errors.ts +4 -0
  396. package/src/convex/label-groups/security.ts +20 -0
  397. package/src/convex/label-groups/waitlist.ts +9 -0
  398. package/src/convex/label-translations.ts +24 -0
  399. package/src/convex/log.ts +2 -0
  400. package/src/convex/sensitive-actions.ts +11 -0
  401. package/src/convex/waitlist-rules.ts +84 -8
  402. package/src/runtime/vue/components/account/SecuritySettings.vue +58 -4
  403. package/src/runtime/vue/components/account/SecurityTwoFactor.css +68 -0
  404. package/src/runtime/vue/components/account/SecurityTwoFactor.vue +113 -0
  405. package/src/runtime/vue/components/admin/AdminWaitlist.css +1 -0
  406. package/src/runtime/vue/components/admin/AdminWaitlistActions.vue +44 -2
  407. package/src/runtime/vue/components/auth/AuthForm.vue +8 -0
  408. package/src/runtime/vue/components/auth/AuthFormTwoFactor.css +40 -0
  409. package/src/runtime/vue/components/auth/AuthFormTwoFactor.vue +75 -0
  410. package/src/runtime/vue/components/auth/AuthFormWaitlisted.vue +11 -4
  411. package/src/runtime/vue/components/auth/WaitlistPlace.css +16 -0
  412. package/src/runtime/vue/components/auth/WaitlistPlace.vue +49 -2
  413. package/src/runtime/vue/components/auth/WaitlistShare.vue +4 -3
  414. package/dist/devtools-client/_nuxt/CiCAOwUc.js +0 -5
@@ -69,7 +69,9 @@ const AUTH_FINDINGS = {
69
69
  // An account with the admin role, read off the deployment; --fix asks for its address.
70
70
  "admin-bootstrap": { title: "First administrator", fixable: true },
71
71
  // The deployment's paths (auth:authConfig) against nuxt.config's: the auth route and the pages its emails link to.
72
- "page-paths": { title: "Page paths" }
72
+ "page-paths": { title: "Page paths" },
73
+ // `backend.auth: 'convex-auth'`: sign-in only, and what is off with it.
74
+ "auth-provider": { title: "Auth provider" }
73
75
  };
74
76
 
75
77
  const BILLING_FINDINGS = {
@@ -447,7 +449,7 @@ const CAPABILITIES = {
447
449
  purpose: "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.",
448
450
  providers: [{ name: "Polar", gives: "products, checkout, subscriptions, meters and the customer portal" }],
449
451
  development: "the billing provider's sandbox, with a test card",
450
- env: ["BILLING_ACCESS_TOKEN", "BILLING_WEBHOOK_SECRET"],
452
+ env: ["BILLING_PROVIDER", "BILLING_ACCESS_TOKEN", "BILLING_WEBHOOK_SECRET"],
451
453
  findings: ["billing"],
452
454
  docs: "/docs/build/billing",
453
455
  devtools: "billing",
@@ -654,6 +656,15 @@ const BACKEND_ENV = {
654
656
  dotenv: true,
655
657
  findings: ["deployment-email-dev-inbox"]
656
658
  },
659
+ BILLING_PROVIDER: {
660
+ side: "deployment",
661
+ whenFlagged: true,
662
+ without: "billing sells through Polar, on the Convex component setupBilling is built on",
663
+ values: "`polar`, `stripe` (Stripe Managed Payments), `dodo` (Dodo Payments) or `creem`: the merchant of record `setupBilling` sells through. `stripe`, `dodo` and `creem` need `setupBilling({ commerce })`, with the catalog and the provider's product ids. Any other name fails the deploy",
664
+ example: "polar",
665
+ dotenv: true,
666
+ findings: []
667
+ },
657
668
  BILLING_ACCESS_TOKEN: {
658
669
  side: "deployment",
659
670
  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',
@@ -885,7 +896,7 @@ const TASK_SKILLS = [
885
896
  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",
886
897
  docs: ["/docs/build/auth", "/docs/build/growth/launch"],
887
898
  entrypoints: ["nuxt-backend/auth", "nuxt-backend/auth.config", "nuxt-backend/access", "nuxt-backend/audit", "nuxt-backend/account", "nuxt-backend/admin"],
888
- composables: ["useAuth", "useLoginFlow", "useReturnPath", "useEmailChange", "useWorkspace", "usePasskeys", "useSessions", "useSignInAlerts", "useHumanCheck", "useReauthentication", "useAccessPhase", "useInvite", "useMemberTicket", "useAccessAdmin", "useWaitlist", "useWaitlistAdmin", "useAuditLog", "useAccount", "useConsents", "useAdmin"],
899
+ composables: ["useAuth", "useLoginFlow", "useReturnPath", "useEmailChange", "useWorkspace", "usePasskeys", "useTwoFactor", "useSessions", "useSignInAlerts", "useHumanCheck", "useReauthentication", "useAccessPhase", "useInvite", "useMemberTicket", "useAccessAdmin", "useWaitlist", "useWaitlistAdmin", "useAuditLog", "useAccount", "useConsents", "useAdmin"],
889
900
  components: ["AuthForm", "WaitlistForm", "ConsentPrompt", "AccessDenied", "AcceptInvitation", "WorkspaceSettings", "ProfileSettings", "SecuritySettings", "ReauthenticateDialog", "AuditLog", "AccountData", "AdminUsers", "AdminWorkspaces"],
890
901
  server: ["backendAuth"],
891
902
  commands: ["access admit"],
@@ -933,10 +944,10 @@ const TASK_SKILLS = [
933
944
  },
934
945
  {
935
946
  name: "nuxt-backend-data",
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",
947
+ covers: "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",
937
948
  docs: ["/docs/build/data"],
938
- entrypoints: ["nuxt-backend/functions", "nuxt-backend/search", "nuxt-backend/workflows", "nuxt-backend/storage"],
939
- composables: ["getBackendError", "useBackendClient", "useConnectionState", "useSearch", "useWorkflowStatus", "useShareLink", "useUploadField", "preparePhoto", "isPhotoFile", "PhotoPrepError"],
949
+ entrypoints: ["nuxt-backend/functions", "nuxt-backend/search", "nuxt-backend/workflows", "nuxt-backend/storage", "nuxt-backend/presence"],
950
+ composables: ["getBackendError", "useBackendClient", "useConnectionState", "useSearch", "useWorkflowStatus", "useRoomPresence", "useShareLink", "useUploadField", "preparePhoto", "isPhotoFile", "PhotoPrepError"],
940
951
  components: ["ConnectionStatus", "UploadField"]
941
952
  },
942
953
  {
@@ -3843,6 +3854,28 @@ function formatPreflightSummary(findings) {
3843
3854
  return `${problems.length} finding${problems.length === 1 ? "" : "s"}: ${problems.map((f) => f.id).join(", ")}`;
3844
3855
  }
3845
3856
 
3857
+ const CONVEX_AUTH_DOCS_URL = "https://nuxt-backend.dev/docs/build/auth/convex-auth";
3858
+ function authProviderOf(option) {
3859
+ return option === "convex-auth" ? "convex-auth" : "better-auth";
3860
+ }
3861
+ function configuredAuthOption(options) {
3862
+ const modules = Array.isArray(options.modules) ? options.modules : [];
3863
+ const inline = modules.flatMap((entry) => Array.isArray(entry) && entry[0] === "nuxt-backend" && entry[1] && typeof entry[1] === "object" && "auth" in entry[1] ? [entry[1].auth] : []);
3864
+ return inline[0] ?? options.backend?.auth;
3865
+ }
3866
+ function authOptionProblems(option) {
3867
+ if (option === void 0 || option === "better-auth" || option === "convex-auth") return [];
3868
+ return [`\`backend.auth\` is \`${JSON.stringify(option) ?? typeof option}\`. It takes \`'better-auth'\` (the default) or \`'convex-auth'\`.`];
3869
+ }
3870
+ function baseAuthOverrides(provider, { betterAuth, loginPath }) {
3871
+ if (provider === "convex-auth") return { betterAuth: false, convexAuth: { loginPath }, polar: false };
3872
+ return { betterAuth, convexAuth: false, polar: true };
3873
+ }
3874
+ function pagesOff() {
3875
+ return Object.fromEntries(BACKEND_PAGE_DEFS.map((def) => [def.key, false]));
3876
+ }
3877
+ const CONVEX_AUTH_NOTICE = "Convex Auth mode (`backend.auth: 'convex-auth'`): sign-in runs on @convex-dev/auth through the base module (magic links, OAuth, passkeys, passwords). The package's pages, its page guard, workspaces, billing, AI credits and the account features are off, as they run on Better Auth's accounts. Guard a page with `definePageMeta({ middleware: 'convex-auth' })`.";
3878
+
3846
3879
  function pathsFileLocation(rootDir) {
3847
3880
  const functionsDir = resolveFunctionsDir(rootDir);
3848
3881
  return { name: `${functionsDir}/${PATHS_FILE}`, path: join(rootDir, functionsDir, PATHS_FILE) };
@@ -4087,6 +4120,7 @@ const UI_ENTRIES = [
4087
4120
  part({ name: "AuthFormWaitlisted", parent: "AuthForm", folder: "auth", capability: "auth" }),
4088
4121
  part({ name: "AuthFormInviteCode", parent: "AuthForm", folder: "auth", capability: "auth" }),
4089
4122
  part({ name: "AuthFormAge", parent: "AuthForm", folder: "auth", capability: "auth" }),
4123
+ part({ name: "AuthFormTwoFactor", parent: "AuthForm", folder: "auth", capability: "auth" }),
4090
4124
  part({ name: "AuthFormUndeliverable", parent: "AuthForm", folder: "auth", capability: "auth" }),
4091
4125
  part({ name: "AuthFormPasskeyOffer", parent: "AuthForm", folder: "auth", capability: "auth" }),
4092
4126
  part({ name: "AuthFormAgreement", parent: "AuthForm", folder: "auth", capability: "auth" }),
@@ -4107,6 +4141,7 @@ const UI_ENTRIES = [
4107
4141
  part({ name: "ProfilePreferencesSection", parent: "ProfileSettings", folder: "account", capability: "auth" }),
4108
4142
  component({ name: "SecuritySettings", folder: "account", capability: "auth" }),
4109
4143
  part({ name: "SecurityPasskeys", parent: "SecuritySettings", folder: "account", capability: "auth" }),
4144
+ part({ name: "SecurityTwoFactor", parent: "SecuritySettings", folder: "account", capability: "auth" }),
4110
4145
  part({ name: "SecuritySessions", parent: "SecuritySettings", folder: "account", capability: "auth" }),
4111
4146
  part({ name: "SecurityAlerts", parent: "SecuritySettings", folder: "account", capability: "auth" }),
4112
4147
  component({ name: "ConsentPrompt", folder: "account", capability: "auth" }),
@@ -4281,4 +4316,4 @@ const UI_SHARED_STYLES = [
4281
4316
  { file: "admin/admin.css", capability: "auth" }
4282
4317
  ];
4283
4318
 
4284
- 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, envNames 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, PROJECT_SKILLS as aR, CORE_SKILL as aS, mountPagesInAppComponent as aT, ensureDefaultLayout as aU, ensureIndexPage as aV, writeAgentFiles as aW, isDevDeployment as aX, RPC_NAMESPACE as aY, DEVTOOLS_UI_ROUTE as aZ, DEVTOOLS_UI_LOCAL_PORT 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, DEV_ONLY_DEPLOYMENT_ENV as b0, DEV_SITE_URL as b1, finding as b2, parseBackendEnvironment as b3, proofKeys as b4, TEST_CHALLENGE_SITE_KEYS as b5, deploymentEnvId as b6, protectionTakes as b7, TEST_CHALLENGE_SECRET_KEYS as b8, PROTECTED_AUTH_ROUTES as b9, namesModerationModel as bA, GATEWAY_ORDER_UNREAD as bB, routeKeyFor as bC, installableFinding as bD, gatewayKeyIsTheFix as bE, DEFAULT_MODERATION_MODEL as bF, mountsComponent as bG, GATEWAY_KEY_FIX as bH, CAPABILITIES as bI, isEnvProvisioned as bJ, markEnvProvisioned as bK, readSource as bL, parse as bM, keyOf$1 as bN, writeSource as bO, REMOVED_ENV as bP, applyEdits as bQ, walk as bR, BACKEND_FILE_TEMPLATES as bS, PROOF_HEADER as ba, signProof as bb, proofAudience as bc, deploymentSiteOrigin as bd, isLocalDeploymentId as be, capabilityOfGroup as bf, agentFilesFinding as bg, chosenRoutes as bh, chosenGateways as bi, pinnedRegion as bj, namedModels as bk, usesProvenance as bl, moderationProviders as bm, monitoringDsnFinding as bn, monitoringFindings as bo, usageAlertsFinding as bp, readUsageLimits as bq, applyProductionPosture as br, billingWebhookSecretHint as bs, BACKEND_PATH_KEYS as bt, pathOption as bu, aiFeatures as bv, pathsFileFinding as bw, brandFileFinding as bx, labelsFileFinding as by, checksImages 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 };
4319
+ 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, ensureIndexPage 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, webAppManifest as aA, maskableIcons as aB, MANIFEST_ROUTE as aC, APPLE_TOUCH_ICON as aD, themeColorMeta as aE, UI_SHARED_STYLES as aF, UI_ENTRIES as aG, UI_INTERNALS as aH, moduleDir as aI, authProviderOf as aJ, configuredAuthOption as aK, pagesOff as aL, VISITOR_IP_ROUTE as aM, CONVEX_AUTH_NOTICE as aN, resolvePagePath as aO, baseAuthOverrides as aP, dependencyRange as aQ, runsFromSource as aR, resolveConvexCli as aS, RECENT_SIGN_IN_SECONDS as aT, BACKEND_ENV as aU, capabilityOfEnv as aV, REMOVED_DEPLOYMENT_ENV as aW, PROJECT_SKILLS as aX, CORE_SKILL as aY, mountPagesInAppComponent as aZ, ensureDefaultLayout 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, authOptionProblems as aj, pagesOptionProblems as ak, resolvedBackendPages as al, DEFAULT_AUTH_ROUTE as am, publishedBackendPages as an, isPageOff as ao, privatePagePaths as ap, collectExistingPagePaths as aq, adoptChildPages as ar, pageRouteRules as as, cachingRulesOver as at, PUSH_WORKER_URL as au, ownsManifest as av, MANIFEST_MODULES as aw, namedIconWarnings as ax, installableGaps as ay, installIcons as az, deploymentBackendEnvironment as b, writeAgentFiles as b0, isDevDeployment as b1, RPC_NAMESPACE as b2, DEVTOOLS_UI_ROUTE as b3, DEVTOOLS_UI_LOCAL_PORT as b4, envNames as b5, DEV_ONLY_DEPLOYMENT_ENV as b6, DEV_SITE_URL as b7, finding as b8, parseBackendEnvironment as b9, pathOption as bA, aiFeatures as bB, pathsFileFinding as bC, brandFileFinding as bD, labelsFileFinding as bE, checksImages as bF, namesModerationModel as bG, GATEWAY_ORDER_UNREAD as bH, routeKeyFor as bI, installableFinding as bJ, gatewayKeyIsTheFix as bK, DEFAULT_MODERATION_MODEL as bL, mountsComponent as bM, GATEWAY_KEY_FIX as bN, CONVEX_AUTH_DOCS_URL as bO, CAPABILITIES as bP, isEnvProvisioned as bQ, markEnvProvisioned as bR, readSource as bS, parse as bT, keyOf$1 as bU, writeSource as bV, REMOVED_ENV as bW, applyEdits as bX, walk as bY, BACKEND_FILE_TEMPLATES as bZ, proofKeys as ba, TEST_CHALLENGE_SITE_KEYS as bb, deploymentEnvId as bc, protectionTakes as bd, TEST_CHALLENGE_SECRET_KEYS as be, PROTECTED_AUTH_ROUTES as bf, PROOF_HEADER as bg, signProof as bh, proofAudience as bi, deploymentSiteOrigin as bj, isLocalDeploymentId as bk, capabilityOfGroup as bl, agentFilesFinding as bm, chosenRoutes as bn, chosenGateways as bo, pinnedRegion as bp, namedModels as bq, usesProvenance as br, moderationProviders as bs, monitoringDsnFinding as bt, monitoringFindings as bu, usageAlertsFinding as bv, readUsageLimits as bw, applyProductionPosture as bx, billingWebhookSecretHint as by, BACKEND_PATH_KEYS 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 };
@@ -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 pagesOptionProblems, ak as resolvedBackendPages, al as DEFAULT_AUTH_ROUTE, Q as REGISTERED_UI, am as publishedBackendPages, an as isPageOff, ao as privatePagePaths, ap as collectExistingPagePaths, aq as adoptChildPages, ar as pageRouteRules, as as cachingRulesOver, V as packageDir, z as appBrandOf, A as syncBrandFile, E as brandFileLocation, F as appLabelsOf, G as syncLabelsFile, H as labelsFileLocation, at as PUSH_WORKER_URL, au as ownsManifest, av as MANIFEST_MODULES, aw as namedIconWarnings, ax as installableGaps, ay as installIcons, az as webAppManifest, aA as maskableIcons, aB as MANIFEST_ROUTE, aC as APPLE_TOUCH_ICON, aD as themeColorMeta, w as syncPathsFile, x as backendPathsOf, y as pathsFileLocation, S as uiPath, aE as UI_SHARED_STYLES, aF as UI_ENTRIES, aG as UI_INTERNALS, aH as moduleDir, aI as VISITOR_IP_ROUTE, aJ as resolvePagePath, aK as dependencyRange, aL as runsFromSource, Y as packageVersion } from './nuxt-backend.suXOnqOQ.mjs';
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';
@@ -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/index.mjs');
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
- addImports({
863
- name: "useAuth",
864
- from: resolver.resolve("./runtime/vue/composables/use-auth")
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 `convexAuth` from `nuxt-convex-module/better-auth/server` directly."
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.6.2: the server code is written against `nuxt/server`, which
1339
- // ships in 4.6, and nuxt-convex-module 0.12 needs 4.6 too. Not Nuxt 5
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.6.2" }
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
- betterAuth: {
1428
- authClient: resolver.resolve("./runtime/vue/auth-client"),
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
- // The same-origin proxy route (`betterAuth.authRoute` in the base
1431
- // module since 0.12). Unset, the base module mounts it at /api/auth.
1432
- ...backend.authRoute !== void 0 ? { authRoute: backend.authRoute } : {},
1433
- ...typeof convex.betterAuth === "object" && convex.betterAuth !== null ? convex.betterAuth : {}
1434
- },
1435
- polar: true,
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
- addPlugin({ src: resolver.resolve("./runtime/vue/plugins/session-ended"), mode: "client" });
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 { b2 as finding, j as resolveFunctionsDir, bL as readSource, bM as parse, bN as keyOf, bO as writeSource, bP as REMOVED_ENV, bQ as applyEdits, bR as walk, bS as BACKEND_FILE_TEMPLATES } from './nuxt-backend.suXOnqOQ.mjs';
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.5.1",
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.16 <1.8.0",
167
- "@better-auth/passkey": ">=1.7.16 <1.8.0",
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.6.3",
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.16 <1.8.0",
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.133",
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.14.3",
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.6.3",
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.49.0",
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.6.3",
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, and for agents https://nuxt-backend.dev/llms.txt;
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 at all: follow
22
- [references/install.md](references/install.md) first.
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 or
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 and every renamed name.
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 var names.
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. 22 tasks; reach for `useLoginFlow()`, `nuxt-backend/auth`, `useHumanCheck()`.
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. 12 tasks; reach for `nuxt-backend/functions`, `nuxt-backend/search`, `nuxt-backend/workflows`.
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. 40 tasks; reach for `nuxt-backend/rate-limit`, `nuxt-backend/http`, `nuxt-backend/monitoring`.
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. For older names, see the
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 with progress on stderr, exit code `1`
100
- means refused or failed, and `--help` ends with what the command may change. Run a command that
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. The `EMAIL_*` and `BILLING_*` names are optional: each missing one degrades a
106
- feature, as documented. `AI_GATEWAY_API_KEY` keeps the AI Gateway's own
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`, `setupReferrals`
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`