nuxt-users 1.34.2 → 1.34.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 +23 -0
- package/dist/cli.mjs +22 -5
- package/dist/module.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
## v1.34.3
|
|
5
|
+
|
|
6
|
+
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.34.2...v1.34.3)
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- Remember me closes #3 ([#3](https://github.com/rrd108/nuxt-users/issues/3))
|
|
11
|
+
- Hard reload ([187c828](https://github.com/rrd108/nuxt-users/commit/187c828))
|
|
12
|
+
- Conflicting runtimeconfig ([563dcca](https://github.com/rrd108/nuxt-users/commit/563dcca))
|
|
13
|
+
- Lint errors ([b590e6d](https://github.com/rrd108/nuxt-users/commit/b590e6d))
|
|
14
|
+
|
|
15
|
+
### 🏡 Chore
|
|
16
|
+
|
|
17
|
+
- **release:** V1.34.2 ([60d87dc](https://github.com/rrd108/nuxt-users/commit/60d87dc))
|
|
18
|
+
|
|
19
|
+
### ✅ Tests
|
|
20
|
+
|
|
21
|
+
- Add for config conflict ([59271e3](https://github.com/rrd108/nuxt-users/commit/59271e3))
|
|
22
|
+
|
|
23
|
+
### ❤️ Contributors
|
|
24
|
+
|
|
25
|
+
- Rrd108 ([@rrd108](https://github.com/rrd108))
|
|
26
|
+
|
|
4
27
|
## v1.34.2
|
|
5
28
|
|
|
6
29
|
[compare changes](https://github.com/rrd108/nuxt-users/compare/v1.34.1...v1.34.2)
|
package/dist/cli.mjs
CHANGED
|
@@ -50,12 +50,29 @@ const getOptionsFromEnv = () => {
|
|
|
50
50
|
const loadOptions = async () => {
|
|
51
51
|
try {
|
|
52
52
|
console.log("[Nuxt Users] Loading Nuxt project...");
|
|
53
|
-
const nuxt = await loadNuxt({ cwd: process.cwd() });
|
|
54
|
-
const
|
|
53
|
+
const nuxt = await loadNuxt({ cwd: process.cwd(), ready: false });
|
|
54
|
+
const topLevelConfig = nuxt.options.nuxtUsers;
|
|
55
|
+
const originalRuntimeConfig = await (async () => {
|
|
56
|
+
try {
|
|
57
|
+
const configPath = await import('node:path').then((p) => p.resolve(process.cwd(), "nuxt.config.ts"));
|
|
58
|
+
const config = await import(configPath).then((m) => m.default);
|
|
59
|
+
return config?.runtimeConfig?.nuxtUsers;
|
|
60
|
+
} catch {
|
|
61
|
+
return nuxt.options.runtimeConfig?.nuxtUsers;
|
|
62
|
+
}
|
|
63
|
+
})();
|
|
55
64
|
await nuxt.close();
|
|
56
|
-
if (
|
|
57
|
-
console.log("[Nuxt Users] Using configuration from
|
|
58
|
-
|
|
65
|
+
if (topLevelConfig || originalRuntimeConfig) {
|
|
66
|
+
console.log("[Nuxt Users] Using configuration from nuxt.config");
|
|
67
|
+
let mergedConfig = defu(topLevelConfig, originalRuntimeConfig, defaultOptions);
|
|
68
|
+
const configuredConnector = topLevelConfig?.connector || originalRuntimeConfig?.connector;
|
|
69
|
+
if (configuredConnector) {
|
|
70
|
+
mergedConfig = {
|
|
71
|
+
...mergedConfig,
|
|
72
|
+
connector: configuredConnector
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return mergedConfig;
|
|
59
76
|
} else {
|
|
60
77
|
console.log("[Nuxt Users] No nuxt-users configuration found, using environment variables");
|
|
61
78
|
return getOptionsFromEnv();
|
package/dist/module.json
CHANGED
package/package.json
CHANGED