nuxt-users 1.1.5 → 1.1.6
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 +26 -0
- package/dist/cli.mjs +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +4 -10
- package/dist/runtime/plugin.js +1 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.1.6
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.1.5...v1.1.6)
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **deps:** Exclude bcrypt from client-side bundle ([a678a96](https://github.com/rrd108/nuxt-users/commit/a678a96))
|
|
11
|
+
- **cli:** Exits process after successful user creation ([d71b779](https://github.com/rrd108/nuxt-users/commit/d71b779))
|
|
12
|
+
- Remove db releated code from client code ([114d360](https://github.com/rrd108/nuxt-users/commit/114d360))
|
|
13
|
+
|
|
14
|
+
### 💅 Refactors
|
|
15
|
+
|
|
16
|
+
- **cli:** Commands to load options ([403a281](https://github.com/rrd108/nuxt-users/commit/403a281))
|
|
17
|
+
|
|
18
|
+
### 🏡 Chore
|
|
19
|
+
|
|
20
|
+
- **release:** V1.1.5 ([98ab3d1](https://github.com/rrd108/nuxt-users/commit/98ab3d1))
|
|
21
|
+
|
|
22
|
+
### 🤖 CI
|
|
23
|
+
|
|
24
|
+
- Adds Nuxt 4 compatibility tests ([4132d86](https://github.com/rrd108/nuxt-users/commit/4132d86))
|
|
25
|
+
|
|
26
|
+
### ❤️ Contributors
|
|
27
|
+
|
|
28
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
29
|
+
|
|
4
30
|
## v1.1.5
|
|
5
31
|
|
|
6
32
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.1.4...v1.1.5)
|
package/dist/cli.mjs
CHANGED
|
@@ -140,6 +140,7 @@ const createUser = defineCommand({
|
|
|
140
140
|
try {
|
|
141
141
|
const user = await createUser$1({ email, name, password }, options);
|
|
142
142
|
console.log(`[DB:Create User] User created successfully: ${user.email}`);
|
|
143
|
+
process.exit(0);
|
|
143
144
|
} catch (error) {
|
|
144
145
|
console.error("[DB:Create User] Error:", error);
|
|
145
146
|
process.exit(1);
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -49,16 +49,10 @@ const module = defineNuxtModule({
|
|
|
49
49
|
passwordResetTokens: options.tables?.passwordResetTokens || "password_reset_tokens"
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
users: options.tables?.users,
|
|
57
|
-
personalAccessTokens: options.tables?.personalAccessTokens,
|
|
58
|
-
passwordResetTokens: options.tables?.passwordResetTokens
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
52
|
+
addPlugin({
|
|
53
|
+
src: resolver.resolve("./runtime/plugin"),
|
|
54
|
+
mode: "server"
|
|
55
|
+
});
|
|
62
56
|
addServerHandler({
|
|
63
57
|
route: "/api/login",
|
|
64
58
|
method: "post",
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { defineNuxtPlugin, useRuntimeConfig } from "#app";
|
|
2
2
|
import { checkTableExists } from "../utils";
|
|
3
3
|
export default defineNuxtPlugin(async (_nuxtApp) => {
|
|
4
|
-
if (import.meta.client) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
4
|
const { nuxtUsers } = useRuntimeConfig();
|
|
8
5
|
const options = nuxtUsers;
|
|
6
|
+
console.log({ nuxtUsers });
|
|
9
7
|
const hasMigrationsTable = await checkTableExists(options, options.tables.migrations);
|
|
10
8
|
if (!hasMigrationsTable) {
|
|
11
|
-
useRuntimeConfig().public.nuxtUsers.tables.migrations = "";
|
|
12
9
|
console.warn("[Nuxt Users] \u26A0\uFE0F Migrations table does not exist, you should run the migration script to create it by running: npx nuxt-users migrate");
|
|
13
10
|
}
|
|
14
11
|
});
|