nuxt-users 1.8.1 → 1.8.3
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 +35 -0
- package/dist/cli.mjs +2 -3
- package/dist/module.json +1 -1
- package/dist/runtime/composables/usePasswordValidation.js +1 -1
- package/dist/runtime/server/api/auth/reset-password.post.js +1 -1
- package/dist/runtime/server/api/auth/update-password.post.js +1 -1
- package/dist/runtime/server/utils/user.js +1 -1
- package/dist/utils.js +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.8.3
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.8.2...v1.8.3)
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **cli:** Module resolution for CLI and package exports ([697efa2](https://github.com/rrd108/nuxt-users/commit/697efa2))
|
|
11
|
+
- Lint errors ([7713acf](https://github.com/rrd108/nuxt-users/commit/7713acf))
|
|
12
|
+
- Adds post-build script execution ([73a4c76](https://github.com/rrd108/nuxt-users/commit/73a4c76))
|
|
13
|
+
|
|
14
|
+
### 🏡 Chore
|
|
15
|
+
|
|
16
|
+
- **release:** V1.8.2 ([02aa056](https://github.com/rrd108/nuxt-users/commit/02aa056))
|
|
17
|
+
|
|
18
|
+
### ❤️ Contributors
|
|
19
|
+
|
|
20
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
21
|
+
|
|
22
|
+
## v1.8.2
|
|
23
|
+
|
|
24
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.8.1...v1.8.2)
|
|
25
|
+
|
|
26
|
+
### 🩹 Fixes
|
|
27
|
+
|
|
28
|
+
- **cli:** Module resolution for CLI and package exports ([697efa2](https://github.com/rrd108/nuxt-users/commit/697efa2))
|
|
29
|
+
- Lint errors ([7713acf](https://github.com/rrd108/nuxt-users/commit/7713acf))
|
|
30
|
+
|
|
31
|
+
### 🏡 Chore
|
|
32
|
+
|
|
33
|
+
- **release:** V1.8.1 ([698c6cc](https://github.com/rrd108/nuxt-users/commit/698c6cc))
|
|
34
|
+
|
|
35
|
+
### ❤️ Contributors
|
|
36
|
+
|
|
37
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
38
|
+
|
|
4
39
|
## v1.8.1
|
|
5
40
|
|
|
6
41
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.8.0...v1.8.1)
|
package/dist/cli.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { defineCommand, runMain } from 'citty';
|
|
3
|
-
import { runMigrations, createUser as createUser$1, createUsersTable as createUsersTable$1, createPersonalAccessTokensTable as createPersonalAccessTokensTable$1, createPasswordResetTokensTable as createPasswordResetTokensTable$1, createMigrationsTable as createMigrationsTable$1 } from 'nuxt-users';
|
|
4
3
|
import { defaultOptions } from './module.mjs';
|
|
5
4
|
import { loadNuxt } from '@nuxt/kit';
|
|
5
|
+
import { runMigrations, createUser as createUser$1, createUsersTable as createUsersTable$1, createPersonalAccessTokensTable as createPersonalAccessTokensTable$1, createPasswordResetTokensTable as createPasswordResetTokensTable$1, createMigrationsTable as createMigrationsTable$1 } from '../dist/runtime/server/utils/index.js';
|
|
6
6
|
import { getPasswordValidationOptions, validatePassword } from './utils.mjs';
|
|
7
7
|
import 'defu';
|
|
8
|
-
import '../dist/runtime/server/utils/index.js';
|
|
9
8
|
|
|
10
9
|
const getOptionsFromEnv = () => {
|
|
11
10
|
const connectorName = process.env.DB_CONNECTOR || "sqlite";
|
|
@@ -248,7 +247,7 @@ const main = defineCommand({
|
|
|
248
247
|
meta: {
|
|
249
248
|
name: "nuxt-users",
|
|
250
249
|
description: "CLI for Nuxt Users Module - Manage users, migrations, and database operations",
|
|
251
|
-
version: "1.8.
|
|
250
|
+
version: "1.8.2"
|
|
252
251
|
},
|
|
253
252
|
subCommands: {
|
|
254
253
|
migrate,
|
package/dist/module.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, computed } from "vue";
|
|
2
|
-
import { validatePassword, getPasswordValidationOptions, getPasswordStrengthColor, getPasswordStrengthText } from "../../utils";
|
|
2
|
+
import { validatePassword, getPasswordValidationOptions, getPasswordStrengthColor, getPasswordStrengthText } from "../../utils.js";
|
|
3
3
|
export const usePasswordValidation = (moduleOptions, options) => {
|
|
4
4
|
const passwordOptions = getPasswordValidationOptions(moduleOptions);
|
|
5
5
|
const finalOptions = { ...passwordOptions, ...options };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineEventHandler, readBody, createError, H3Error } from "h3";
|
|
2
2
|
import { resetPassword } from "../../services/password.js";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
|
-
import { validatePassword, getPasswordValidationOptions } from "../../../../utils";
|
|
4
|
+
import { validatePassword, getPasswordValidationOptions } from "../../../../utils.js";
|
|
5
5
|
export default defineEventHandler(async (event) => {
|
|
6
6
|
const body = await readBody(event);
|
|
7
7
|
const { token, email, password, password_confirmation } = body;
|
|
@@ -2,7 +2,7 @@ import { createError, defineEventHandler, getCookie, readBody } from "h3";
|
|
|
2
2
|
import bcrypt from "bcrypt";
|
|
3
3
|
import { useRuntimeConfig } from "#imports";
|
|
4
4
|
import { getCurrentUserFromToken, updateUserPassword } from "../../utils/index.js";
|
|
5
|
-
import { validatePassword, getPasswordValidationOptions } from "../../../../utils";
|
|
5
|
+
import { validatePassword, getPasswordValidationOptions } from "../../../../utils.js";
|
|
6
6
|
export default defineEventHandler(async (event) => {
|
|
7
7
|
const { nuxtUsers } = useRuntimeConfig();
|
|
8
8
|
const options = nuxtUsers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useDb } from "./db.js";
|
|
2
2
|
import bcrypt from "bcrypt";
|
|
3
|
-
import { validatePassword, getPasswordValidationOptions } from "../../../utils";
|
|
3
|
+
import { validatePassword, getPasswordValidationOptions } from "../../../utils.js";
|
|
4
4
|
export const createUser = async (userData, options) => {
|
|
5
5
|
const db = await useDb(options);
|
|
6
6
|
const usersTable = options.tables.users;
|
package/dist/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './utils.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuxt-users",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
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",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"nuxt-users": "./dist/cli.mjs"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
|
-
"prepack": "nuxt-module-build build",
|
|
56
|
+
"prepack": "nuxt-module-build build && node scripts/post-build.js",
|
|
57
57
|
"postinstall": "node -e \"try { require('fs').chmodSync('./dist/cli.mjs', '755') } catch(e) {}\"",
|
|
58
58
|
"predev": "node -v | grep -q 'v22' || (echo 'Please use Node.js v22 for development' && exit 1)",
|
|
59
59
|
"dev": "yarn dev:prepare && nuxi dev playground",
|