nuxt-ignis 0.3.2 → 0.3.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.
Files changed (54) hide show
  1. package/.data/content/contents.sqlite +0 -0
  2. package/.nuxt/components.d.ts +224 -224
  3. package/.nuxt/content/components.ts +56 -56
  4. package/.nuxt/dev/index.mjs +15 -7
  5. package/.nuxt/dev/index.mjs.map +1 -1
  6. package/.nuxt/eslint.config.mjs +1 -1
  7. package/.nuxt/imports.d.ts +16 -14
  8. package/.nuxt/manifest/latest.json +1 -1
  9. package/.nuxt/manifest/meta/dev.json +1 -1
  10. package/.nuxt/nitro.json +3 -3
  11. package/.nuxt/nuxt.d.ts +10 -10
  12. package/.nuxt/tsconfig.json +12 -12
  13. package/.nuxt/tsconfig.server.json +6 -6
  14. package/.nuxt/types/imports.d.ts +52 -50
  15. package/.nuxt/types/plugins.d.ts +2 -1
  16. package/.nuxt/types/schema.d.ts +40 -26
  17. package/app.vue +2 -2
  18. package/components/AppFeatureList.vue +5 -0
  19. package/composables/useValibot.ts +16 -0
  20. package/composables/useZod.ts +16 -0
  21. package/features.ts +45 -5
  22. package/i18n/locales/en.json +2 -0
  23. package/nuxt.config.ts +14 -4
  24. package/package.json +12 -8
  25. package/plugins/errorHandler.ts +26 -0
  26. package/test/config/default.txt +16 -0
  27. package/test/config/equipment-1-composable.txt +22 -0
  28. package/test/config/equipment-2-plugins.txt +23 -0
  29. package/test/config/equipment-all.txt +28 -0
  30. package/test/config.test.ts +47 -0
  31. package/test/features/db-neon.txt +3 -3
  32. package/test/features/db-off.txt +3 -3
  33. package/test/features/db-supabase.txt +3 -3
  34. package/test/features/default.txt +3 -3
  35. package/test/features/enable-all.txt +4 -4
  36. package/test/features/equipment.txt +3 -0
  37. package/test/features/forms-formkit.txt +3 -3
  38. package/test/features/forms-off.txt +3 -3
  39. package/test/features/forms-vueform.txt +3 -3
  40. package/test/features/ui-nuxt-ui.txt +3 -3
  41. package/test/features/ui-off.txt +3 -3
  42. package/test/features/ui-tailwind.txt +4 -4
  43. package/test/features/validation-off.txt +3 -0
  44. package/test/features/validation-valibot.txt +4 -0
  45. package/test/features/validation-zod.txt +4 -0
  46. package/test/features.test.ts +48 -0
  47. package/utils/config/content.ts +35 -0
  48. package/utils/config/vueform.ts +25 -0
  49. package/utils/consola.ts +23 -13
  50. package/utils/content.ts +12 -25
  51. package/utils/vueform.ts +14 -11
  52. package/vueform.config.ts +3 -5
  53. package/utils/config/content.config.ts +0 -12
  54. package/utils/config/vueform.config.ts +0 -20
@@ -13,10 +13,6 @@ declare module '@nuxt/schema' {
13
13
  * Configuration for `@nuxt/image`
14
14
  */
15
15
  ["image"]: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? O : Record<string, any>
16
- /**
17
- * Configuration for `@pinia/nuxt`
18
- */
19
- ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
20
16
  /**
21
17
  * Configuration for `@nuxt/scripts`
22
18
  */
@@ -29,6 +25,10 @@ declare module '@nuxt/schema' {
29
25
  * Configuration for `@vueuse/nuxt`
30
26
  */
31
27
  ["vueuse"]: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
28
+ /**
29
+ * Configuration for `@pinia/nuxt`
30
+ */
31
+ ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
32
32
  /**
33
33
  * Configuration for `@nuxt/icon`
34
34
  */
@@ -123,10 +123,6 @@ declare module '@nuxt/schema' {
123
123
  * Configuration for `@nuxt/image`
124
124
  */
125
125
  ["image"]?: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
126
- /**
127
- * Configuration for `@pinia/nuxt`
128
- */
129
- ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
130
126
  /**
131
127
  * Configuration for `@nuxt/scripts`
132
128
  */
@@ -139,6 +135,10 @@ declare module '@nuxt/schema' {
139
135
  * Configuration for `@vueuse/nuxt`
140
136
  */
141
137
  ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
138
+ /**
139
+ * Configuration for `@pinia/nuxt`
140
+ */
141
+ ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
142
142
  /**
143
143
  * Configuration for `@nuxt/icon`
144
144
  */
@@ -219,7 +219,7 @@ declare module '@nuxt/schema' {
219
219
  * Configuration for `@nuxt/telemetry`
220
220
  */
221
221
  ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
222
- modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@nuxt/icon", Exclude<NuxtConfig["icon"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@nuxt/ui", Exclude<NuxtConfig["ui"], boolean>] | ["nuxt-neon", Exclude<NuxtConfig["neon"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@vueform/nuxt", Exclude<NuxtConfig["vueform"], boolean>] | ["C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-site-config@3.1.9_magi_f0f38b684fdcd54347382cd1d38f79a6/node_modules/nuxt-site-config/dist/module", Exclude<NuxtConfig["site"], boolean>] | ["@nuxtjs/robots", Exclude<NuxtConfig["robots"], boolean>] | ["@nuxtjs/sitemap", Exclude<NuxtConfig["sitemap"], boolean>] | ["nuxt-og-image", Exclude<NuxtConfig["ogImage"], boolean>] | ["nuxt-schema-org", Exclude<NuxtConfig["schemaOrg"], boolean>] | ["nuxt-link-checker", Exclude<NuxtConfig["linkChecker"], boolean>] | ["nuxt-seo-utils", Exclude<NuxtConfig["seo"], boolean>] | ["@nuxtjs/seo", Exclude<NuxtConfig["nuxtseo"], boolean>] | ["@nuxtjs/mdc", Exclude<NuxtConfig["mdc"], boolean>] | ["@nuxt/content", Exclude<NuxtConfig["content"], boolean>] | ["nuxt-auth-utils", Exclude<NuxtConfig["auth"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
222
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/icon", Exclude<NuxtConfig["icon"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@nuxt/ui", Exclude<NuxtConfig["ui"], boolean>] | ["nuxt-neon", Exclude<NuxtConfig["neon"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@vueform/nuxt", Exclude<NuxtConfig["vueform"], boolean>] | ["C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-site-config@3.1.9_magi_f0f38b684fdcd54347382cd1d38f79a6/node_modules/nuxt-site-config/dist/module", Exclude<NuxtConfig["site"], boolean>] | ["@nuxtjs/robots", Exclude<NuxtConfig["robots"], boolean>] | ["@nuxtjs/sitemap", Exclude<NuxtConfig["sitemap"], boolean>] | ["nuxt-og-image", Exclude<NuxtConfig["ogImage"], boolean>] | ["nuxt-schema-org", Exclude<NuxtConfig["schemaOrg"], boolean>] | ["nuxt-link-checker", Exclude<NuxtConfig["linkChecker"], boolean>] | ["nuxt-seo-utils", Exclude<NuxtConfig["seo"], boolean>] | ["@nuxtjs/seo", Exclude<NuxtConfig["nuxtseo"], boolean>] | ["@nuxtjs/mdc", Exclude<NuxtConfig["mdc"], boolean>] | ["@nuxt/content", Exclude<NuxtConfig["content"], boolean>] | ["nuxt-auth-utils", Exclude<NuxtConfig["auth"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
223
223
  }
224
224
  }
225
225
  declare module 'nuxt/schema' {
@@ -239,11 +239,6 @@ declare module 'nuxt/schema' {
239
239
  * @see https://www.npmjs.com/package/@nuxt/image
240
240
  */
241
241
  ["image"]: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? O : Record<string, any>
242
- /**
243
- * Configuration for `@pinia/nuxt`
244
- * @see https://www.npmjs.com/package/@pinia/nuxt
245
- */
246
- ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
247
242
  /**
248
243
  * Configuration for `@nuxt/scripts`
249
244
  * @see https://www.npmjs.com/package/@nuxt/scripts
@@ -259,6 +254,11 @@ declare module 'nuxt/schema' {
259
254
  * @see https://www.npmjs.com/package/@vueuse/nuxt
260
255
  */
261
256
  ["vueuse"]: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
257
+ /**
258
+ * Configuration for `@pinia/nuxt`
259
+ * @see https://www.npmjs.com/package/@pinia/nuxt
260
+ */
261
+ ["pinia"]: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? O : Record<string, any>
262
262
  /**
263
263
  * Configuration for `@nuxt/icon`
264
264
  * @see https://www.npmjs.com/package/@nuxt/icon
@@ -376,11 +376,6 @@ declare module 'nuxt/schema' {
376
376
  * @see https://www.npmjs.com/package/@nuxt/image
377
377
  */
378
378
  ["image"]?: typeof import("@nuxt/image").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
379
- /**
380
- * Configuration for `@pinia/nuxt`
381
- * @see https://www.npmjs.com/package/@pinia/nuxt
382
- */
383
- ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
384
379
  /**
385
380
  * Configuration for `@nuxt/scripts`
386
381
  * @see https://www.npmjs.com/package/@nuxt/scripts
@@ -396,6 +391,11 @@ declare module 'nuxt/schema' {
396
391
  * @see https://www.npmjs.com/package/@vueuse/nuxt
397
392
  */
398
393
  ["vueuse"]?: typeof import("@vueuse/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
394
+ /**
395
+ * Configuration for `@pinia/nuxt`
396
+ * @see https://www.npmjs.com/package/@pinia/nuxt
397
+ */
398
+ ["pinia"]?: typeof import("@pinia/nuxt").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
399
399
  /**
400
400
  * Configuration for `@nuxt/icon`
401
401
  * @see https://www.npmjs.com/package/@nuxt/icon
@@ -496,7 +496,7 @@ declare module 'nuxt/schema' {
496
496
  * @see https://www.npmjs.com/package/@nuxt/telemetry
497
497
  */
498
498
  ["telemetry"]?: typeof import("@nuxt/telemetry").default extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
499
- modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@nuxt/icon", Exclude<NuxtConfig["icon"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@nuxt/ui", Exclude<NuxtConfig["ui"], boolean>] | ["nuxt-neon", Exclude<NuxtConfig["neon"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@vueform/nuxt", Exclude<NuxtConfig["vueform"], boolean>] | ["C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-site-config@3.1.9_magi_f0f38b684fdcd54347382cd1d38f79a6/node_modules/nuxt-site-config/dist/module", Exclude<NuxtConfig["site"], boolean>] | ["@nuxtjs/robots", Exclude<NuxtConfig["robots"], boolean>] | ["@nuxtjs/sitemap", Exclude<NuxtConfig["sitemap"], boolean>] | ["nuxt-og-image", Exclude<NuxtConfig["ogImage"], boolean>] | ["nuxt-schema-org", Exclude<NuxtConfig["schemaOrg"], boolean>] | ["nuxt-link-checker", Exclude<NuxtConfig["linkChecker"], boolean>] | ["nuxt-seo-utils", Exclude<NuxtConfig["seo"], boolean>] | ["@nuxtjs/seo", Exclude<NuxtConfig["nuxtseo"], boolean>] | ["@nuxtjs/mdc", Exclude<NuxtConfig["mdc"], boolean>] | ["@nuxt/content", Exclude<NuxtConfig["content"], boolean>] | ["nuxt-auth-utils", Exclude<NuxtConfig["auth"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
499
+ modules?: (undefined | null | false | NuxtModule<any> | string | [NuxtModule | string, Record<string, any>] | ["@nuxt/eslint", Exclude<NuxtConfig["eslint"], boolean>] | ["@nuxt/fonts", Exclude<NuxtConfig["fonts"], boolean>] | ["@nuxt/image", Exclude<NuxtConfig["image"], boolean>] | ["@nuxt/scripts", Exclude<NuxtConfig["scripts"], boolean>] | ["nuxt-security", Exclude<NuxtConfig["security"], boolean>] | ["@vueuse/nuxt", Exclude<NuxtConfig["vueuse"], boolean>] | ["@pinia/nuxt", Exclude<NuxtConfig["pinia"], boolean>] | ["@nuxt/icon", Exclude<NuxtConfig["icon"], boolean>] | ["@nuxtjs/color-mode", Exclude<NuxtConfig["colorMode"], boolean>] | ["@nuxt/ui", Exclude<NuxtConfig["ui"], boolean>] | ["nuxt-neon", Exclude<NuxtConfig["neon"], boolean>] | ["@nuxtjs/i18n", Exclude<NuxtConfig["i18n"], boolean>] | ["@vueform/nuxt", Exclude<NuxtConfig["vueform"], boolean>] | ["C:/Git/nuxt-ignis/core/node_modules/.pnpm/nuxt-site-config@3.1.9_magi_f0f38b684fdcd54347382cd1d38f79a6/node_modules/nuxt-site-config/dist/module", Exclude<NuxtConfig["site"], boolean>] | ["@nuxtjs/robots", Exclude<NuxtConfig["robots"], boolean>] | ["@nuxtjs/sitemap", Exclude<NuxtConfig["sitemap"], boolean>] | ["nuxt-og-image", Exclude<NuxtConfig["ogImage"], boolean>] | ["nuxt-schema-org", Exclude<NuxtConfig["schemaOrg"], boolean>] | ["nuxt-link-checker", Exclude<NuxtConfig["linkChecker"], boolean>] | ["nuxt-seo-utils", Exclude<NuxtConfig["seo"], boolean>] | ["@nuxtjs/seo", Exclude<NuxtConfig["nuxtseo"], boolean>] | ["@nuxtjs/mdc", Exclude<NuxtConfig["mdc"], boolean>] | ["@nuxt/content", Exclude<NuxtConfig["content"], boolean>] | ["nuxt-auth-utils", Exclude<NuxtConfig["auth"], boolean>] | ["@nuxt/test-utils/module", Exclude<NuxtConfig["testUtils"], boolean>] | ["@nuxt/devtools", Exclude<NuxtConfig["devtools"], boolean>] | ["@nuxt/telemetry", Exclude<NuxtConfig["telemetry"], boolean>])[],
500
500
  }
501
501
  interface RuntimeConfig {
502
502
  app: {
@@ -1217,6 +1217,8 @@ declare module 'nuxt/schema' {
1217
1217
  level: string,
1218
1218
  },
1219
1219
 
1220
+ error: boolean,
1221
+
1220
1222
  ssr: boolean,
1221
1223
 
1222
1224
  pages: boolean,
@@ -1227,6 +1229,8 @@ declare module 'nuxt/schema' {
1227
1229
  db: string,
1228
1230
 
1229
1231
  forms: string,
1232
+
1233
+ validation: string,
1230
1234
  },
1231
1235
 
1232
1236
  core: {
@@ -1236,15 +1240,13 @@ declare module 'nuxt/schema' {
1236
1240
 
1237
1241
  image: boolean,
1238
1242
 
1239
- pinia: boolean,
1240
-
1241
- time: boolean,
1242
-
1243
1243
  scripts: boolean,
1244
1244
 
1245
1245
  security: boolean,
1246
1246
 
1247
1247
  vueuse: boolean,
1248
+
1249
+ pinia: boolean,
1248
1250
  },
1249
1251
 
1250
1252
  ui: boolean,
@@ -1273,8 +1275,16 @@ declare module 'nuxt/schema' {
1273
1275
 
1274
1276
  vueform: boolean,
1275
1277
 
1278
+ valibot: boolean,
1279
+
1280
+ zod: boolean,
1281
+
1276
1282
  content: boolean,
1277
1283
 
1284
+ seo: boolean,
1285
+
1286
+ auth: boolean,
1287
+
1278
1288
  openprops: boolean,
1279
1289
 
1280
1290
  pslo: {
@@ -1283,9 +1293,13 @@ declare module 'nuxt/schema' {
1283
1293
  content: boolean,
1284
1294
  },
1285
1295
 
1286
- seo: boolean,
1296
+ equipment: {
1297
+ enabled: boolean,
1287
1298
 
1288
- auth: boolean,
1299
+ composables: string,
1300
+
1301
+ plugins: string,
1302
+ },
1289
1303
 
1290
1304
  warn: {
1291
1305
  duplicates: boolean,
package/app.vue CHANGED
@@ -21,11 +21,11 @@ useHead({
21
21
  })
22
22
  initConsola()
23
23
 
24
- log.info('Nuxt Ignis was here!')
25
-
26
24
  const config = useRuntimeConfig().public.ignis
27
25
  const pages = config.pages
28
26
  const ui = config.ui || config.preset.ui
27
+
28
+ log.info('Nuxt Ignis initialized')
29
29
  </script>
30
30
 
31
31
  <style scoped>
@@ -30,6 +30,8 @@
30
30
  <AppFeature :active="i18n" :text="useIgnisT('features.i18n')" />
31
31
  <AppFeature :active="vueform" :text="useIgnisT('features.vueform')" />
32
32
  <AppFeature :active="formkit" :text="useIgnisT('features.formkit')" />
33
+ <AppFeature :active="valibot" :text="useIgnisT('features.valibot')" />
34
+ <AppFeature :active="zod" :text="useIgnisT('features.zod')" />
33
35
  <AppFeature :active="content" :text="useIgnisT('features.content')" />
34
36
  <AppFeature :active="seo" :text="useIgnisT('features.seo')" />
35
37
  <AppFeature :active="auth" :text="useIgnisT('features.auth')" />
@@ -63,6 +65,9 @@ const i18n = setup.i18n.enabled
63
65
  const forms = setup.preset.forms
64
66
  const vueform = forms === 'vueform' || (forms === 'off' && setup.vueform)
65
67
  const formkit = forms === 'formkit' || (forms === 'off' && setup.formkit.enabled)
68
+ const validation = setup.preset.validation
69
+ const valibot = validation === 'valibot' || (validation === 'off' && setup.valibot)
70
+ const zod = validation === 'zod' || (validation === 'off' && setup.zod)
66
71
  const content = setup.content
67
72
  const seo = setup.seo
68
73
  const auth = setup.auth
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Exposes Valibot schema validation functions. Requires `NUXT_PUBLIC_IGNIS_PRESET_VALIDATION=valibot` or `NUXT_PUBLIC_IGNIS_VALIBOT=true` to work properly.
3
+ *
4
+ * Usage: `const v = (await useValibot())!`
5
+ *
6
+ * @returns Valibot `v` object for schema validation
7
+ */
8
+ export const useValibot = async () => {
9
+ const config = useRuntimeConfig().public.ignis
10
+ if (config.preset.validation === 'valibot' || config.valibot === true) {
11
+ const valibot = await import('valibot')
12
+ return valibot
13
+ } else {
14
+ log.warn('Valibot is not enabled (set NUXT_PUBLIC_IGNIS_PRESET_VALIDATION=valibot or NUXT_PUBLIC_IGNIS_VALIBOT=true)')
15
+ }
16
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Exposes Zod schema validation functions. Requires `NUXT_PUBLIC_IGNIS_PRESET_VALIDATION=zod` or `NUXT_PUBLIC_IGNIS_ZOD=true` to work properly.
3
+ *
4
+ * Usage: `const z = (await useZod())!`
5
+ *
6
+ * @returns Zod `z` object for schema validation
7
+ */
8
+ export const useZod = async () => {
9
+ const config = useRuntimeConfig().public.ignis
10
+ if (config.preset.validation === 'zod' || config.zod === true) {
11
+ const zod = await import('zod/v4')
12
+ return zod.z
13
+ } else {
14
+ log.warn('Zod is not enabled (set NUXT_PUBLIC_IGNIS_PRESET_VALIDATION=zod or NUXT_PUBLIC_IGNIS_ZOD=true)')
15
+ }
16
+ }
package/features.ts CHANGED
@@ -38,11 +38,6 @@ export function setFeatures() {
38
38
  nuxtConfig.modules.push('@nuxt/image')
39
39
  }
40
40
 
41
- // https://pinia.vuejs.org/ssr/nuxt.html
42
- if (process.env.NUXT_PUBLIC_IGNIS_CORE_PINIA !== 'false') {
43
- nuxtConfig.modules.push('@pinia/nuxt')
44
- }
45
-
46
41
  // https://scripts.nuxt.com/
47
42
  if (process.env.NUXT_PUBLIC_IGNIS_CORE_SCRIPTS !== 'false') {
48
43
  nuxtConfig.modules.push('@nuxt/scripts')
@@ -58,6 +53,11 @@ export function setFeatures() {
58
53
  nuxtConfig.modules.push('@vueuse/nuxt')
59
54
  }
60
55
 
56
+ // https://pinia.vuejs.org/ssr/nuxt.html
57
+ if (process.env.NUXT_PUBLIC_IGNIS_CORE_PINIA !== 'false') {
58
+ nuxtConfig.modules.push('@pinia/nuxt')
59
+ }
60
+
61
61
  // 2. optional modules & features
62
62
  // (excluded unless enabled)
63
63
 
@@ -176,6 +176,19 @@ export function setFeatures() {
176
176
  }, nuxtConfig)
177
177
  }
178
178
 
179
+ // validation
180
+ let validationPreset = process.env.NUXT_PUBLIC_IGNIS_PRESET_VALIDATION
181
+ if (validationPreset && !['zod', 'valibot'].includes(validationPreset)) {
182
+ // surpress other values
183
+ process.env.NUXT_PUBLIC_IGNIS_PRESET_VALIDATION = validationPreset = 'off'
184
+ }
185
+ if (validationPreset === 'zod' || process.env.NUXT_PUBLIC_IGNIS_ZOD === 'true') {
186
+ extras.push('zod')
187
+ }
188
+ if (validationPreset === 'valibot' || process.env.NUXT_PUBLIC_IGNIS_VALIBOT === 'true') {
189
+ extras.push('valibot')
190
+ }
191
+
179
192
  // seo
180
193
  // 2025/04 - must be before @nuxt/content (https://nuxtseo.com/docs/nuxt-seo/guides/nuxt-content)
181
194
  if (process.env.NUXT_PUBLIC_IGNIS_SEO === 'true') {
@@ -201,6 +214,29 @@ export function setFeatures() {
201
214
  nuxtConfig.modules.push('nuxt-auth-utils')
202
215
  }
203
216
 
217
+ // https://www.vue.equipment/
218
+ if (process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_ENABLED === 'true') {
219
+ nuxtConfig.modules.push('@maas/vue-equipment/nuxt')
220
+ // composables to be included
221
+ if (process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_COMPOSABLES) {
222
+ // values MUST be delimited by "," (spaces will be trimmed)
223
+ nuxtConfig = defu({
224
+ vueEquipment: {
225
+ composables: process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_COMPOSABLES.split(',').map(p => p?.trim()),
226
+ },
227
+ }, nuxtConfig)
228
+ }
229
+ // plugins to be included
230
+ if (process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_PLUGINS) {
231
+ // values MUST be delimited by "," (spaces will be trimmed)
232
+ nuxtConfig = defu({
233
+ vueEquipment: {
234
+ plugins: process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_PLUGINS.split(',').map(p => p?.trim()),
235
+ },
236
+ }, nuxtConfig)
237
+ }
238
+ }
239
+
204
240
  // Open Props CSS
205
241
  if (process.env.NUXT_PUBLIC_IGNIS_OPENPROPS === 'true') {
206
242
  extras.push('Open Props CSS')
@@ -249,6 +285,10 @@ export function setFeatures() {
249
285
  if (used.includes('@vueform/nuxt') && used.includes('@formkit/nuxt')) {
250
286
  log.warn('You have both Form solution provider modules (Vueform and Formkit) active, which is not recommended. If this is intentional, you can use `process.env.NUXT_PUBLIC_IGNIS_WARN_DUPLICATES=false` to surpress this warning.')
251
287
  }
288
+ // validation - not imported as modules
289
+ if (extras.includes('zod') && extras.includes('valibot')) {
290
+ log.warn('You have both validation libraries (Zod and Valibot) active, which is not recommended. If this is intentional, you can use `process.env.NUXT_PUBLIC_IGNIS_WARN_DUPLICATES=false` to surpress this warning.')
291
+ }
252
292
  }
253
293
 
254
294
  // 5. verify results
@@ -24,6 +24,8 @@
24
24
  "neon" : "Neon for DB services",
25
25
  "formkit" : "FormKit for input forms",
26
26
  "vueform" : "Vueform for input forms",
27
+ "valibot" : "Valibot for schema validation",
28
+ "zod": "Zod for schema validation",
27
29
  "content" : "Nuxt Content for creating and editing content",
28
30
  "seo" : "Nuxt SEO collection of SEO-related modules",
29
31
  "auth" : "Nuxt Auth Utils for easy and secure authentication",
package/nuxt.config.ts CHANGED
@@ -47,6 +47,9 @@ const nuxtConfig = defu(ignisFeatures, {
47
47
  level: 'info',
48
48
  },
49
49
 
50
+ // central error handler
51
+ error: true, // true/false
52
+
50
53
  // nuxt-related config
51
54
  ssr: true, // true/false
52
55
  pages: true, // true/false
@@ -56,6 +59,7 @@ const nuxtConfig = defu(ignisFeatures, {
56
59
  ui: 'off', // nuxt-ui/tailwind/off
57
60
  db: 'off', // neon/supabase/off
58
61
  forms: 'off', // formkit/vueform/off
62
+ validation: 'off', // valibot/zod/off
59
63
  },
60
64
 
61
65
  // core modules
@@ -64,11 +68,10 @@ const nuxtConfig = defu(ignisFeatures, {
64
68
  eslint: true,
65
69
  fonts: true,
66
70
  image: true,
67
- pinia: true,
68
- time: true,
69
71
  scripts: true,
70
72
  security: true,
71
73
  vueuse: true,
74
+ pinia: true,
72
75
  },
73
76
 
74
77
  // optional modules
@@ -87,14 +90,21 @@ const nuxtConfig = defu(ignisFeatures, {
87
90
  config: './formkit.config.ts', // path to config file
88
91
  },
89
92
  vueform: false, // true/false
93
+ valibot: false, // true/false
94
+ zod: false, // true/false
90
95
  content: false, // true/false
96
+ seo: false, // true/false
97
+ auth: false, // true/false
91
98
  openprops: false, // true/false
92
99
  pslo: {
93
100
  enabled: false, // true/false (elrh-pslo will (not) be used)
94
101
  content: false, // true/false (elrh-pslo will (not) be aplied on nuxt-content)
95
102
  },
96
- seo: false, // true/false
97
- auth: false, // true/false
103
+ equipment: {
104
+ enabled: false, // true/false
105
+ composables: '', // list of Vue Equipment composables
106
+ plugins: '', // list of Vue Equipment plugins
107
+ },
98
108
 
99
109
  // extra behavior
100
110
  warn: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-ignis",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Enhanced and customizable Nuxt application starter pack",
5
5
  "keywords": [
6
6
  "nuxt",
@@ -26,7 +26,8 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@formkit/nuxt": "1.6.9",
29
- "@nuxt/content": "3.5.1",
29
+ "@maas/vue-equipment": "1.0.0-beta.30",
30
+ "@nuxt/content": "3.6.1",
30
31
  "@nuxt/eslint": "1.4.1",
31
32
  "@nuxt/fonts": "0.11.4",
32
33
  "@nuxt/image": "1.10.0",
@@ -34,14 +35,15 @@
34
35
  "@nuxt/ui": "3.1.3",
35
36
  "@nuxtjs/i18n": "9.5.5",
36
37
  "@nuxtjs/seo": "3.0.3",
37
- "@nuxtjs/supabase": "1.5.1",
38
+ "@nuxtjs/supabase": "1.5.2",
38
39
  "@nuxtjs/tailwindcss": "6.14.0",
39
40
  "@pinia/nuxt": "0.11.1",
40
- "@vueform/nuxt": "1.15.0",
41
- "@vueuse/core": "13.3.0",
42
- "@vueuse/nuxt": "13.3.0",
43
- "@tailwindcss/vite": "4.1.8",
41
+ "@tailwindcss/vite": "4.1.10",
42
+ "@vueform/nuxt": "1.16.0",
43
+ "@vueuse/core": "13.4.0",
44
+ "@vueuse/nuxt": "13.4.0",
44
45
  "consola": "3.4.2",
46
+ "date-fns": "4.1.0",
45
47
  "defu": "6.1.4",
46
48
  "elrh-pslo": "1.1.6",
47
49
  "nuxt-auth-utils": "0.5.20",
@@ -51,7 +53,9 @@
51
53
  "open-props": "1.7.15",
52
54
  "pinia": "3.0.3",
53
55
  "postcss-jit-props": "1.0.16",
54
- "typescript": "5.8.3"
56
+ "typescript": "5.8.3",
57
+ "valibot": "1.1.0",
58
+ "zod": "3.25.67"
55
59
  },
56
60
  "devDependencies": {
57
61
  "nuxt": "3.17.5",
@@ -0,0 +1,26 @@
1
+ // This registeres custom error and warn handlers within Nuxt Ignis app.
2
+ // You can set NUXT_PUBLIC_IGNIS_ERROR to 'false' to disable this feature.
3
+
4
+ export default defineNuxtPlugin((nuxtApp) => {
5
+ if (useRuntimeConfig().public.ignis.error) {
6
+ nuxtApp.vueApp.config.errorHandler = (err, instance, info) => {
7
+ log.error(err)
8
+ // capture additional context
9
+ log.debug(`Nuxt Ignis error handler - raw error:\n${err}`)
10
+ log.debug(`Nuxt Ignis error handler - source:\n${instance?.$options?.__name || 'Unknown'} (${instance?.$options?.__file || '???'})`)
11
+ log.debug(`Nuxt Ignis error handler - additional error context:\n${info}`)
12
+ }
13
+ nuxtApp.vueApp.config.warnHandler = (msg, instance, trace) => {
14
+ log.warn(msg)
15
+ // capture additional context
16
+ log.debug(`Nuxt Ignis warn handler - raw warning:\n${msg}`)
17
+ log.debug(`Nuxt Ignis warn handler - source:\n${instance?.$options?.__name || 'Unknown'} (${instance?.$options?.__file || '???'})`)
18
+ log.debug(`Nuxt Ignis warn handler - additional warn context:\n${trace}`)
19
+ }
20
+ // set NUXT_PUBLIC_IGNIS_ERROR=false to turn them off
21
+ log.info('Nuxt Ignis error/warn handlers were registered')
22
+ } else {
23
+ // set NUXT_PUBLIC_IGNIS_ERROR=true to turn them on
24
+ log.info('Nuxt Ignis error/warn handlers were NOT registered')
25
+ }
26
+ })
@@ -0,0 +1,16 @@
1
+ {
2
+ "modules": [
3
+ "@nuxt/eslint",
4
+ "@nuxt/fonts",
5
+ "@nuxt/image",
6
+ "@nuxt/scripts",
7
+ "nuxt-security",
8
+ "@vueuse/nuxt",
9
+ "@pinia/nuxt",
10
+ ],
11
+ "vue": {
12
+ "compilerOptions": {
13
+ "isCustomElement": [Function],
14
+ },
15
+ },
16
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "modules": [
3
+ "@nuxt/eslint",
4
+ "@nuxt/fonts",
5
+ "@nuxt/image",
6
+ "@nuxt/scripts",
7
+ "nuxt-security",
8
+ "@vueuse/nuxt",
9
+ "@pinia/nuxt",
10
+ "@maas/vue-equipment/nuxt",
11
+ ],
12
+ "vue": {
13
+ "compilerOptions": {
14
+ "isCustomElement": [Function],
15
+ },
16
+ },
17
+ "vueEquipment": {
18
+ "composables": [
19
+ "useScrollTo",
20
+ ],
21
+ },
22
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "modules": [
3
+ "@nuxt/eslint",
4
+ "@nuxt/fonts",
5
+ "@nuxt/image",
6
+ "@nuxt/scripts",
7
+ "nuxt-security",
8
+ "@vueuse/nuxt",
9
+ "@pinia/nuxt",
10
+ "@maas/vue-equipment/nuxt",
11
+ ],
12
+ "vue": {
13
+ "compilerOptions": {
14
+ "isCustomElement": [Function],
15
+ },
16
+ },
17
+ "vueEquipment": {
18
+ "plugins": [
19
+ "MagicMenu",
20
+ "MagicModal",
21
+ ],
22
+ },
23
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "modules": [
3
+ "@nuxt/eslint",
4
+ "@nuxt/fonts",
5
+ "@nuxt/image",
6
+ "@nuxt/scripts",
7
+ "nuxt-security",
8
+ "@vueuse/nuxt",
9
+ "@pinia/nuxt",
10
+ "@maas/vue-equipment/nuxt",
11
+ ],
12
+ "vue": {
13
+ "compilerOptions": {
14
+ "isCustomElement": [Function],
15
+ },
16
+ },
17
+ "vueEquipment": {
18
+ "composables": [
19
+ "useCountdown",
20
+ "useScrollTo",
21
+ ],
22
+ "plugins": [
23
+ "MagicMenu",
24
+ "MagicModal",
25
+ "MagicCookie",
26
+ ],
27
+ },
28
+ }
@@ -0,0 +1,47 @@
1
+ import { beforeEach, describe, expect, test } from 'vitest'
2
+ import { setFeatures } from '../features'
3
+
4
+ // `setFeatures()` is the core function that evaluates the environment variables
5
+ // and decides which features to enable in the user's Nuxt application
6
+ // this suite test the nuxtConfig object output, whether it matches the intended values
7
+
8
+ describe('nuxtConfig unit tests', () => {
9
+ // store original process.env to restore it after tests
10
+ const OLD_ENV = process.env
11
+
12
+ beforeEach(() => {
13
+ // restore env before each test
14
+ process.env = { ...OLD_ENV }
15
+ })
16
+
17
+ // output with no settings provided
18
+
19
+ test('nuxtConfig - default output', async () => {
20
+ const nuxtConfig = setFeatures()
21
+ await expect(nuxtConfig).toMatchFileSnapshot('./config/default.txt')
22
+ })
23
+
24
+ // Vue Equipment
25
+
26
+ test('nuxtConfig - Vue Equipment - 1 composable', async () => {
27
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_ENABLED = 'true'
28
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_COMPOSABLES = 'useScrollTo'
29
+ const nuxtConfig = setFeatures()
30
+ await expect(nuxtConfig).toMatchFileSnapshot('./config/equipment-1-composable.txt')
31
+ })
32
+
33
+ test('setFeatures() - Vue Equipment - 2 plugins', async () => {
34
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_ENABLED = 'true'
35
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_PLUGINS = 'MagicMenu, MagicModal'
36
+ const nuxtConfig = setFeatures()
37
+ await expect(nuxtConfig).toMatchFileSnapshot('./config/equipment-2-plugins.txt')
38
+ })
39
+
40
+ test('setFeatures() - Vue Equipment - composables + plugins', async () => {
41
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_ENABLED = 'true'
42
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_COMPOSABLES = 'useCountdown,useScrollTo'
43
+ process.env.NUXT_PUBLIC_IGNIS_EQUIPMENT_PLUGINS = 'MagicMenu, MagicModal , MagicCookie'
44
+ const nuxtConfig = setFeatures()
45
+ await expect(nuxtConfig).toMatchFileSnapshot('./config/equipment-all.txt')
46
+ })
47
+ })
@@ -1,3 +1,3 @@
1
- Nuxt Ignis will start using following settings:
2
- Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @pinia/nuxt, @nuxt/scripts, nuxt-security, @vueuse/nuxt, nuxt-neon
3
- Nuxt: log-level=info[default]
1
+ Nuxt Ignis will start using following settings:
2
+ Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @nuxt/scripts, nuxt-security, @vueuse/nuxt, @pinia/nuxt, nuxt-neon
3
+ Nuxt: log-level=info[default]
@@ -1,3 +1,3 @@
1
- Nuxt Ignis will start using following settings:
2
- Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @pinia/nuxt, @nuxt/scripts, nuxt-security, @vueuse/nuxt
3
- Nuxt: log-level=info[default]
1
+ Nuxt Ignis will start using following settings:
2
+ Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @nuxt/scripts, nuxt-security, @vueuse/nuxt, @pinia/nuxt
3
+ Nuxt: log-level=info[default]
@@ -1,3 +1,3 @@
1
- Nuxt Ignis will start using following settings:
2
- Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @pinia/nuxt, @nuxt/scripts, nuxt-security, @vueuse/nuxt, @nuxtjs/supabase
3
- Nuxt: log-level=info[default]
1
+ Nuxt Ignis will start using following settings:
2
+ Modules: @nuxt/eslint, @nuxt/fonts, @nuxt/image, @nuxt/scripts, nuxt-security, @vueuse/nuxt, @pinia/nuxt, @nuxtjs/supabase
3
+ Nuxt: log-level=info[default]