@frigear-nu/account 0.2.0 → 0.2.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/dist/module.json +1 -1
- package/dist/module.mjs +6 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, hasNuxtModule, addImports, addTypeTemplate, addRouteMiddleware, addPlugin, addComponentsDir } from '@nuxt/kit';
|
|
2
2
|
import { registerModule, inlineModuleRuntime, registerTailwindSource, registerLocales, addOptionalImports, resolvePagePath, addModulePages, defineVirtualRegistry, getBootstrapProviders, addOptionalMenuSource } from '@frigear-nu/module-kit/utils';
|
|
3
3
|
|
|
4
|
+
function withAppMiddleware(existing, name) {
|
|
5
|
+
const entries = typeof existing === "string" ? { [existing]: true } : Array.isArray(existing) ? Object.fromEntries(existing.map((middleware) => [middleware, true])) : existing;
|
|
6
|
+
return { [name]: true, ...entries };
|
|
7
|
+
}
|
|
8
|
+
|
|
4
9
|
const module$1 = defineNuxtModule({
|
|
5
10
|
meta: { name: "@frigear-nu/account", configKey: "account" },
|
|
6
11
|
defaults: {
|
|
@@ -111,7 +116,7 @@ export {}
|
|
|
111
116
|
const areaRules = nuxt.options.routeRules ||= {};
|
|
112
117
|
for (const pattern of areaPatterns) {
|
|
113
118
|
const rule = areaRules[pattern] ?? {};
|
|
114
|
-
areaRules[pattern] = { ...rule, appMiddleware:
|
|
119
|
+
areaRules[pattern] = { ...rule, appMiddleware: withAppMiddleware(rule.appMiddleware, "account-bootstrap") };
|
|
115
120
|
}
|
|
116
121
|
addOptionalMenuSource(nuxt, { file: resolver.resolve("./runtime/menus"), menu: "account" });
|
|
117
122
|
addComponentsDir({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frigear-nu/account",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A module for managing the account area (profile, email, password, security) in the main frigear app.",
|
|
5
5
|
"homepage": "https://docs.frigear.dev/modules/account",
|
|
6
6
|
"repository": {
|