nuxt-users 1.29.0 → 1.29.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,30 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v1.29.1
5
+
6
+ [compare changes](https://github.com/rrd108/nuxt-users/compare/v1.29.0...v1.29.1)
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - Missing server middleware ([50e22d5](https://github.com/rrd108/nuxt-users/commit/50e22d5))
11
+ - Auto whitelist urls on register ([8a05dab](https://github.com/rrd108/nuxt-users/commit/8a05dab))
12
+ - Add missing endpoint ([a0a371c](https://github.com/rrd108/nuxt-users/commit/a0a371c))
13
+ - Auto whitelist /me endpoint ([5453da9](https://github.com/rrd108/nuxt-users/commit/5453da9))
14
+
15
+ ### 🏡 Chore
16
+
17
+ - Lint fixes ([bf5786f](https://github.com/rrd108/nuxt-users/commit/bf5786f))
18
+ - **release:** V1.29.0 ([b468e52](https://github.com/rrd108/nuxt-users/commit/b468e52))
19
+
20
+ ### ✅ Tests
21
+
22
+ - Add integration tests runner ([e6cfbfb](https://github.com/rrd108/nuxt-users/commit/e6cfbfb))
23
+
24
+ ### ❤️ Contributors
25
+
26
+ - Rrd108 ([@rrd108](https://github.com/rrd108))
27
+
4
28
  ## v1.29.0
5
29
 
6
30
  [compare changes](https://github.com/rrd108/nuxt-users/compare/v1.28.2...v1.29.0)
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-users",
3
3
  "configKey": "nuxtUsers",
4
- "version": "1.29.0",
4
+ "version": "1.29.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
@@ -47,6 +47,10 @@ export default defineEventHandler(async (event) => {
47
47
  return;
48
48
  }
49
49
  }
50
+ if (event.path === `${base}/me`) {
51
+ console.log(`[Nuxt Users] server.middleware.auth.global: Auto-whitelisted /me endpoint for authenticated user ${user.id}`);
52
+ return;
53
+ }
50
54
  if (!hasPermission(user.role, event.path, event.method, options.auth.permissions)) {
51
55
  if (event.path.startsWith("/api/")) {
52
56
  console.log(`[Nuxt Users] server.middleware.auth.global: ${event.path} User ${user.id} with role ${user.role} denied access - API request rejected`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-users",
3
- "version": "1.29.0",
3
+ "version": "1.29.1",
4
4
  "description": "A comprehensive user management module for Nuxt 3 and Nuxt 4 applications with authentication, authorization, database support, and CLI tools",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -66,13 +66,14 @@
66
66
  "lint": "eslint .",
67
67
  "lint:fix": "eslint . --fix",
68
68
  "pretest": "node -v | grep -q 'v22' || (echo 'Please use Node.js v22 for testing' && exit 1)",
69
- "test:release": "yarn test:types && yarn test:unit && yarn test:sqlite && yarn build && yarn lint:fix",
69
+ "test:release": "yarn test:types && yarn test:unit && yarn test:integration && yarn test:sqlite && yarn build && yarn lint:fix",
70
70
  "test:types": "yarn dev:prepare && vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
71
71
  "test:unit": "./scripts/test-unit.sh",
72
+ "test:integration": "./scripts/test-integration.sh",
72
73
  "test:sqlite": "./scripts/test-sqlite.sh",
73
74
  "test:mysql": "./scripts/test-mysql.sh",
74
75
  "test:postgresql": "./scripts/test-postgresql.sh",
75
- "test": "yarn test:types && yarn test:unit && yarn test:sqlite && yarn test:mysql && yarn test:postgresql",
76
+ "test": "yarn test:types && yarn test:unit && yarn test:integration && yarn test:sqlite && yarn test:mysql && yarn test:postgresql",
76
77
  "test:watch": "vitest watch",
77
78
  "db:create-users-table": "tsx src/cli/create-users-table.ts",
78
79
  "db:create-user": "tsx src/cli/create-user.ts",