una-nuxt-module 2.1.39 → 2.1.41
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/.nuxt/templates/AppBreadcumbs.vue/AppBreadcumbs.vue +4 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +52 -32
- package/dist/runtime/components/ui/stepper/StepperItem.d.vue.ts +1 -1
- package/dist/runtime/components/ui/stepper/StepperItem.vue.d.ts +1 -1
- package/dist/runtime/utils/banner.d.ts +3 -0
- package/dist/runtime/utils/banner.js +12 -0
- package/package.json +17 -18
|
@@ -17,11 +17,11 @@ const { breadcrumbs } = useBreadcumbs();
|
|
|
17
17
|
<BreadcrumbList>
|
|
18
18
|
<template v-for="(breadcumb, index) in breadcrumbs" :key="index">
|
|
19
19
|
<BreadcrumbItem>
|
|
20
|
-
<BreadcrumbLink v-if="breadcumb.
|
|
21
|
-
<NuxtLink :to="breadcumb.to"> {{ breadcumb.
|
|
20
|
+
<BreadcrumbLink v-if="breadcumb.to" as-child>
|
|
21
|
+
<NuxtLink :to="breadcumb.to"> {{ breadcumb.label }} </NuxtLink>
|
|
22
22
|
</BreadcrumbLink>
|
|
23
|
-
<BreadcrumbPage v-
|
|
24
|
-
{{ breadcumb.
|
|
23
|
+
<BreadcrumbPage v-else>
|
|
24
|
+
{{ breadcumb.label }}
|
|
25
25
|
</BreadcrumbPage>
|
|
26
26
|
</BreadcrumbItem>
|
|
27
27
|
<BreadcrumbSeparator
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { createResolver, addTemplate, defineNuxtModule, useLogger, addImportsDir,
|
|
1
|
+
import { createResolver, addTemplate, defineNuxtModule, useLogger, addImportsDir, addPlugin, addRouteMiddleware, extendPages, addComponentsDir, addVitePlugin, hasNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
|
-
import { bold } from 'colorette';
|
|
3
|
+
import { yellow, bold, cyan, magenta, red, green, gray } from 'colorette';
|
|
4
4
|
import * as fs from 'node:fs';
|
|
5
5
|
import * as path from 'node:path';
|
|
6
|
+
import banner from '../dist/runtime/utils/banner.js';
|
|
6
7
|
|
|
7
8
|
function doesDirectoryExist(directory) {
|
|
8
9
|
return fs.existsSync(directory);
|
|
@@ -173,7 +174,7 @@ function addTemplates() {
|
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
const name = "una-nuxt-module";
|
|
176
|
-
const version = "2.1.
|
|
177
|
+
const version = "2.1.41";
|
|
177
178
|
|
|
178
179
|
const module = defineNuxtModule({
|
|
179
180
|
meta: {
|
|
@@ -193,6 +194,7 @@ const module = defineNuxtModule({
|
|
|
193
194
|
async setup(options, nuxt) {
|
|
194
195
|
const logger = useLogger(name);
|
|
195
196
|
const { resolve } = createResolver(import.meta.url);
|
|
197
|
+
options = defu(nuxt.options.runtimeConfig.public.unaNuxtModule, options);
|
|
196
198
|
nuxt.options.alias["#unaxt"] = resolve("./runtime");
|
|
197
199
|
function setupAutoImports() {
|
|
198
200
|
addImportsDir(
|
|
@@ -200,9 +202,12 @@ const module = defineNuxtModule({
|
|
|
200
202
|
(dir) => resolve(`./runtime/${dir}`)
|
|
201
203
|
)
|
|
202
204
|
);
|
|
203
|
-
logger.
|
|
204
|
-
|
|
205
|
-
);
|
|
205
|
+
logger.ready(green("Autoimportaciones configuradas"));
|
|
206
|
+
logger.ready("\u251C\u2500\u2500 " + gray("composables"));
|
|
207
|
+
logger.ready("\u251C\u2500\u2500 " + gray("constants"));
|
|
208
|
+
logger.ready("\u251C\u2500\u2500 " + gray("enums"));
|
|
209
|
+
logger.ready("\u251C\u2500\u2500 " + gray("types"));
|
|
210
|
+
logger.ready("\u2514\u2500\u2500 " + gray("utils"));
|
|
206
211
|
}
|
|
207
212
|
async function setupTailwindPlugin() {
|
|
208
213
|
if (nuxt.options.builder === "@nuxt/vite-builder") {
|
|
@@ -211,12 +216,14 @@ const module = defineNuxtModule({
|
|
|
211
216
|
} else {
|
|
212
217
|
nuxt.options.postcss.plugins["@tailwindcss/postcss"] = {};
|
|
213
218
|
}
|
|
214
|
-
logger.
|
|
219
|
+
logger.ready(green("Tailwind CSS configurado"));
|
|
215
220
|
}
|
|
216
221
|
function setupI18n() {
|
|
217
222
|
if (!hasNuxtModule("@nuxtjs/i18n", nuxt)) {
|
|
218
223
|
logger.info(
|
|
219
|
-
|
|
224
|
+
yellow(
|
|
225
|
+
"El m\xF3dulo @nuxtjs/i18n no est\xE1 instalado, hook para extender mensajes omitido"
|
|
226
|
+
)
|
|
220
227
|
);
|
|
221
228
|
return;
|
|
222
229
|
}
|
|
@@ -226,10 +233,17 @@ const module = defineNuxtModule({
|
|
|
226
233
|
locales: [{ code: "es", file: "es.json" }]
|
|
227
234
|
});
|
|
228
235
|
});
|
|
229
|
-
logger.
|
|
236
|
+
logger.ready(green("Internacionalizaci\xF3n inicializada"));
|
|
230
237
|
}
|
|
231
238
|
function setupComponents() {
|
|
232
239
|
if (options.use.components) {
|
|
240
|
+
addComponentsDir({
|
|
241
|
+
path: resolve("./runtime/components/shared"),
|
|
242
|
+
prefix: "",
|
|
243
|
+
pathPrefix: false,
|
|
244
|
+
global: true
|
|
245
|
+
});
|
|
246
|
+
logger.ready(green("Componentes globales registrados"));
|
|
233
247
|
addComponentsDir(
|
|
234
248
|
{
|
|
235
249
|
path: resolve("./runtime/components/ui"),
|
|
@@ -242,32 +256,25 @@ const module = defineNuxtModule({
|
|
|
242
256
|
prepend: true
|
|
243
257
|
}
|
|
244
258
|
);
|
|
245
|
-
logger.
|
|
246
|
-
addComponentsDir({
|
|
247
|
-
path: resolve("./runtime/components/shared"),
|
|
248
|
-
prefix: "",
|
|
249
|
-
pathPrefix: false,
|
|
250
|
-
global: true
|
|
251
|
-
});
|
|
252
|
-
logger.success("Componentes globales registrados");
|
|
259
|
+
logger.ready(green("Componentes Shadcn UI registrados"));
|
|
253
260
|
}
|
|
254
261
|
}
|
|
255
262
|
function setupAuth() {
|
|
256
263
|
if (options.use.sso) {
|
|
257
|
-
logger.
|
|
264
|
+
logger.ready(green("Iniciando m\xF3dulo de autenticaci\xF3n"));
|
|
258
265
|
addImportsDir(
|
|
259
266
|
["auth/stores", "auth/composables"].map(
|
|
260
267
|
(dir) => resolve(`./runtime/${dir}`)
|
|
261
268
|
)
|
|
262
269
|
);
|
|
263
|
-
logger.
|
|
264
|
-
logger.
|
|
270
|
+
logger.ready("\u251C\u2500\u2500 " + gray("Stores registrados"));
|
|
271
|
+
logger.ready("\u251C\u2500\u2500 " + gray("Composables registrados"));
|
|
265
272
|
addPlugin({
|
|
266
273
|
name: "auth",
|
|
267
274
|
src: resolve("./runtime/auth/plugins/auth"),
|
|
268
275
|
mode: "client"
|
|
269
276
|
});
|
|
270
|
-
logger.
|
|
277
|
+
logger.ready("\u251C\u2500\u2500 " + gray("Plugins registrados"));
|
|
271
278
|
addRouteMiddleware({
|
|
272
279
|
name: "authentication",
|
|
273
280
|
path: resolve("./runtime/auth/middleware/authentication"),
|
|
@@ -278,7 +285,7 @@ const module = defineNuxtModule({
|
|
|
278
285
|
path: resolve("./runtime/auth/middleware/authorization"),
|
|
279
286
|
global: true
|
|
280
287
|
});
|
|
281
|
-
logger.
|
|
288
|
+
logger.ready("\u251C\u2500\u2500 " + gray("Middlewares registrados"));
|
|
282
289
|
nuxt.options.runtimeConfig.public.unaNuxtModule = defu(
|
|
283
290
|
nuxt.options.runtimeConfig.public.unaNuxtModule,
|
|
284
291
|
{
|
|
@@ -306,24 +313,37 @@ const module = defineNuxtModule({
|
|
|
306
313
|
}
|
|
307
314
|
);
|
|
308
315
|
});
|
|
309
|
-
logger.
|
|
310
|
-
"\
|
|
316
|
+
logger.ready(
|
|
317
|
+
"\u2514\u2500\u2500 " + gray("Rutas registradas: ['/401', '/403', '/auth/sso/login']")
|
|
318
|
+
);
|
|
319
|
+
logger.ready(
|
|
320
|
+
green("M\xF3dulo de autenticaci\xF3n inicializado correctamente")
|
|
311
321
|
);
|
|
312
|
-
logger.success("\u2514\u2500\u2500 Autenticaci\xF3n configurada correctamente");
|
|
313
322
|
}
|
|
314
323
|
}
|
|
315
324
|
try {
|
|
316
|
-
|
|
317
|
-
|
|
325
|
+
console.log(banner);
|
|
326
|
+
console.log(yellow(bold(`\u279C v${version}
|
|
327
|
+
`)));
|
|
328
|
+
logger.start(cyan(bold("Registro del m\xF3dulo iniciado...")));
|
|
329
|
+
const startTime = Date.now();
|
|
318
330
|
setupAutoImports();
|
|
331
|
+
setupAuth();
|
|
332
|
+
setupComponents();
|
|
319
333
|
await setupTailwindPlugin();
|
|
320
|
-
setupI18n();
|
|
321
334
|
addTemplates();
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
logger.start(
|
|
335
|
+
setupI18n();
|
|
336
|
+
const endTime = Date.now();
|
|
337
|
+
logger.start(
|
|
338
|
+
cyan(
|
|
339
|
+
bold(
|
|
340
|
+
"Registro del m\xF3dulo completado " + magenta(`(${endTime - startTime} ms)
|
|
341
|
+
`)
|
|
342
|
+
)
|
|
343
|
+
)
|
|
344
|
+
);
|
|
325
345
|
} catch (error) {
|
|
326
|
-
logger.error("Error al inicializar el m\xF3dulo: ", error);
|
|
346
|
+
logger.error(red("Error al inicializar el m\xF3dulo: "), error);
|
|
327
347
|
throw error;
|
|
328
348
|
}
|
|
329
349
|
}
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = StepperItemProps & {
|
|
|
4
4
|
class?: HTMLAttributes["class"];
|
|
5
5
|
};
|
|
6
6
|
declare var __VLS_7: {
|
|
7
|
-
state: "
|
|
7
|
+
state: "inactive" | "active" | "completed";
|
|
8
8
|
};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_7) => any;
|
|
@@ -4,7 +4,7 @@ type __VLS_Props = StepperItemProps & {
|
|
|
4
4
|
class?: HTMLAttributes["class"];
|
|
5
5
|
};
|
|
6
6
|
declare var __VLS_7: {
|
|
7
|
-
state: "
|
|
7
|
+
state: "inactive" | "active" | "completed";
|
|
8
8
|
};
|
|
9
9
|
type __VLS_Slots = {} & {
|
|
10
10
|
default?: (props: typeof __VLS_7) => any;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const text = [
|
|
2
|
+
`
|
|
3
|
+
\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
|
|
4
|
+
\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D\u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D
|
|
5
|
+
\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551
|
|
6
|
+
\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551
|
|
7
|
+
\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u255D \u2588\u2588\u2557 \u2588\u2588\u2551
|
|
8
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D
|
|
9
|
+
`
|
|
10
|
+
];
|
|
11
|
+
export const themeColor = "\x1B[38;2;220;38;38m";
|
|
12
|
+
export default text.map((line) => line.split("").join(themeColor)).join("\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "una-nuxt-module",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.41",
|
|
4
4
|
"description": "Módulo Nuxt para desarrollo CGI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,21 +42,6 @@
|
|
|
42
42
|
".nuxt/templates.css",
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
|
-
"scripts": {
|
|
46
|
-
"prepack": "nuxt-module-build build",
|
|
47
|
-
"dev": "npm run dev:prepare && nuxi dev playground",
|
|
48
|
-
"dev:https": "npm run dev:prepare && cd playground && npm run dev:https",
|
|
49
|
-
"dev:build": "nuxi build playground",
|
|
50
|
-
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
51
|
-
"release:major": "npm run test && npm run prepack && changelogen --release --major && npm publish && git push --follow-tags",
|
|
52
|
-
"release:minor": "npm run test && npm run prepack && changelogen --release --minor && npm publish && git push --follow-tags",
|
|
53
|
-
"release:patch": "npm run test && npm run prepack && changelogen --release --patch && npm publish && git push --follow-tags",
|
|
54
|
-
"lint": "eslint .",
|
|
55
|
-
"lint:fix": "eslint . --fix",
|
|
56
|
-
"test": "vitest run",
|
|
57
|
-
"test:watch": "vitest watch",
|
|
58
|
-
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
59
|
-
},
|
|
60
45
|
"dependencies": {
|
|
61
46
|
"@asgardeo/auth-spa": "3.3.2",
|
|
62
47
|
"@nuxt/fonts": "0.11.4",
|
|
@@ -111,5 +96,19 @@
|
|
|
111
96
|
"bugs": {
|
|
112
97
|
"url": "https://github.com/una-cgi/una-nuxt-module/issues"
|
|
113
98
|
},
|
|
114
|
-
"homepage": "https://github.com/una-cgi/una-nuxt-module#readme"
|
|
115
|
-
|
|
99
|
+
"homepage": "https://github.com/una-cgi/una-nuxt-module#readme",
|
|
100
|
+
"scripts": {
|
|
101
|
+
"dev": "pnpm run dev:prepare && nuxi dev playground",
|
|
102
|
+
"dev:https": "pnpm run dev:prepare && cd playground && pnpm run dev:https",
|
|
103
|
+
"dev:build": "nuxi build playground",
|
|
104
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
105
|
+
"release:major": "pnpm run test && pnpm run prepack && changelogen --release --major && pnpm publish && git push --follow-tags",
|
|
106
|
+
"release:minor": "pnpm run test && pnpm run prepack && changelogen --release --minor && pnpm publish && git push --follow-tags",
|
|
107
|
+
"release:patch": "pnpm run test && pnpm run prepack && changelogen --release --patch && pnpm publish && git push --follow-tags",
|
|
108
|
+
"lint": "eslint .",
|
|
109
|
+
"lint:fix": "eslint . --fix",
|
|
110
|
+
"test": "vitest run",
|
|
111
|
+
"test:watch": "vitest watch",
|
|
112
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
113
|
+
}
|
|
114
|
+
}
|