use-convex 0.0.2 → 1.0.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 (52) hide show
  1. package/README.md +84 -27
  2. package/dist/module.d.mts +5 -3
  3. package/dist/module.mjs +35 -1
  4. package/dist/runtime/composables/useAuth.d.ts +5 -5
  5. package/dist/runtime/composables/useAuth.js +11 -24
  6. package/dist/runtime/composables/useAuthToken.d.ts +1 -1
  7. package/dist/runtime/composables/useAuthToken.js +2 -10
  8. package/dist/runtime/composables/useConvex.js +1 -1
  9. package/dist/runtime/composables/useConvexAction.js +6 -18
  10. package/dist/runtime/composables/useConvexAuth.js +4 -13
  11. package/dist/runtime/composables/useConvexFileUpload.d.ts +43 -0
  12. package/dist/runtime/composables/useConvexFileUpload.js +102 -0
  13. package/dist/runtime/composables/useConvexGate.js +3 -9
  14. package/dist/runtime/composables/useConvexMutation.js +7 -17
  15. package/dist/runtime/composables/useConvexPaginatedQuery.d.ts +1 -1
  16. package/dist/runtime/composables/useConvexPaginatedQuery.js +7 -29
  17. package/dist/runtime/composables/useConvexQueries.d.ts +12 -7
  18. package/dist/runtime/composables/useConvexQueries.js +1 -3
  19. package/dist/runtime/composables/useConvexQuery.js +6 -12
  20. package/dist/runtime/composables/useConvexR2Upload.d.ts +40 -0
  21. package/dist/runtime/composables/useConvexR2Upload.js +86 -0
  22. package/dist/runtime/plugin.client.js +3 -7
  23. package/dist/runtime/plugin.devtools.client.d.ts +15 -2
  24. package/dist/runtime/plugin.devtools.client.js +18 -4
  25. package/dist/runtime/plugin.server.js +3 -7
  26. package/dist/runtime/server/api/convex/auth/session.js +7 -12
  27. package/dist/runtime/server/auth.js +1 -9
  28. package/dist/runtime/server/authCookies.js +8 -30
  29. package/dist/runtime/server/convexConfig.d.ts +12 -0
  30. package/dist/runtime/server/convexConfig.js +9 -0
  31. package/dist/runtime/server/fetch.d.ts +2 -4
  32. package/dist/runtime/server/fetch.js +3 -13
  33. package/dist/runtime/server/routes/__convex_devtools.get.d.ts +6 -2
  34. package/dist/runtime/server/routes/__convex_devtools.get.js +184 -16
  35. package/dist/runtime/server/sameOrigin.js +1 -5
  36. package/dist/runtime/utils/authCookie.d.ts +0 -2
  37. package/dist/runtime/utils/authCookie.js +0 -1
  38. package/dist/runtime/utils/authState.js +1 -6
  39. package/dist/runtime/utils/authStorage.js +1 -1
  40. package/dist/runtime/utils/context.js +3 -2
  41. package/dist/runtime/utils/convexDashboard.d.ts +44 -0
  42. package/dist/runtime/utils/convexDashboard.js +77 -0
  43. package/dist/runtime/utils/errors.d.ts +14 -0
  44. package/dist/runtime/utils/errors.js +25 -0
  45. package/dist/runtime/utils/oauthRedirect.js +3 -2
  46. package/dist/runtime/utils/paginatedOptimistic.js +4 -22
  47. package/dist/runtime/utils/payloadCache.d.ts +6 -0
  48. package/dist/runtime/utils/payloadCache.js +7 -0
  49. package/dist/runtime/utils/pendingError.d.ts +9 -0
  50. package/dist/runtime/utils/pendingError.js +23 -0
  51. package/dist/types.d.mts +7 -3
  52. package/package.json +36 -20
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "use-convex",
3
- "version": "0.0.2",
3
+ "version": "1.0.0",
4
4
  "description": "First-class Convex integration for Nuxt",
5
- "type": "module",
6
5
  "license": "MIT",
7
6
  "repository": {
8
7
  "type": "git",
9
8
  "url": "https://github.com/jrmybtlr/convex-nuxt.git"
10
9
  },
11
- "publishConfig": {
12
- "access": "public"
13
- },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "type": "module",
14
14
  "exports": {
15
15
  ".": {
16
16
  "types": "./dist/module.d.mts",
@@ -18,26 +18,26 @@
18
18
  },
19
19
  "./runtime/*": "./dist/runtime/*"
20
20
  },
21
- "files": [
22
- "dist"
23
- ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
24
  "scripts": {
25
25
  "build": "nuxt-module-build build",
26
26
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
27
- "dev": "nuxi dev playground --dotenv .env.local",
27
+ "dev": "nuxi dev playground --dotenv playground/.env.local",
28
28
  "dev:backend": "cd playground && convex dev",
29
29
  "build:playground": "nuxi build playground",
30
+ "lint": "vp lint",
31
+ "fmt": "vp fmt",
32
+ "fmt:check": "vp fmt --check",
33
+ "check": "vp check",
30
34
  "typecheck": "vue-tsc --noEmit",
31
- "test": "vitest run",
32
- "test:watch": "vitest",
33
- "test:e2e": "E2E_CONVEX=1 vitest run playground/e2e test/e2e",
35
+ "typecheck:playground": "nuxi typecheck playground",
36
+ "test": "vp test",
37
+ "test:watch": "vp test --watch",
38
+ "test:e2e": "E2E_CONVEX=1 vp test playground/e2e test/e2e",
34
39
  "release": "semantic-release"
35
40
  },
36
- "peerDependencies": {
37
- "convex": "^1.21.0",
38
- "nuxt": "^4.0.0",
39
- "vue": "^3.5.0"
40
- },
41
41
  "dependencies": {
42
42
  "@nuxt/kit": "^4.0.0",
43
43
  "defu": "^6.1.4",
@@ -51,16 +51,32 @@
51
51
  "@nuxt/test-utils": "^3.23.0",
52
52
  "@types/node": "^26.5.0",
53
53
  "convex": "^1.45.0",
54
- "convex-helpers": "^0.1.124",
55
54
  "convex-test": "^0.0.56",
56
55
  "happy-dom": "^20.14.0",
57
56
  "nitropack": "^2.13.0",
58
57
  "nuxt": "^4.5.2",
59
58
  "semantic-release": "^25.0.9",
60
59
  "typescript": "^5.9.0",
61
- "vitest": "^3.2.0",
60
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
61
+ "vite-plus": "0.3.1",
62
62
  "vue": "^3.5.0",
63
63
  "vue-tsc": "^3.0.0"
64
64
  },
65
- "packageManager": "pnpm@10.0.0"
65
+ "peerDependencies": {
66
+ "convex": "^1.21.0",
67
+ "nuxt": "^4.0.0",
68
+ "vue": "^3.5.0"
69
+ },
70
+ "packageManager": "pnpm@10.0.0",
71
+ "pnpm": {
72
+ "overrides": {
73
+ "vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
74
+ "vitest": "4.1.11"
75
+ },
76
+ "peerDependencyRules": {
77
+ "allowedVersions": {
78
+ "vitest": "4"
79
+ }
80
+ }
81
+ }
66
82
  }