@nuxt-ignis/validation 0.0.2 → 0.0.4
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.d.mts +4 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +10 -2
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/types.d.mts +7 -1
- package/package.json +2 -2
package/dist/module.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface
|
|
3
|
+
interface IgnisValidationOptions {
|
|
4
|
+
active?: boolean;
|
|
4
5
|
zod?: boolean;
|
|
5
6
|
valibot?: boolean;
|
|
6
7
|
}
|
|
7
|
-
declare const _default: _nuxt_schema.NuxtModule<
|
|
8
|
+
declare const _default: _nuxt_schema.NuxtModule<IgnisValidationOptions, IgnisValidationOptions, false>;
|
|
8
9
|
|
|
9
10
|
export { _default as default };
|
|
10
|
-
export type {
|
|
11
|
+
export type { IgnisValidationOptions };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -5,6 +5,14 @@ const module$1 = defineNuxtModule({
|
|
|
5
5
|
name: "@nuxt-ignis/validation",
|
|
6
6
|
configKey: "ignisValidation"
|
|
7
7
|
},
|
|
8
|
+
moduleDependencies(nuxt) {
|
|
9
|
+
console.warn("@nuxt-ignis/validation - module dependencies are being resolved");
|
|
10
|
+
const modules = {};
|
|
11
|
+
const nuxtOpts = nuxt.options;
|
|
12
|
+
nuxtOpts.ignisValidation || nuxtOpts.ignis?.validation;
|
|
13
|
+
console.warn("@nuxt-ignis/validation - no modules to be activated");
|
|
14
|
+
return modules;
|
|
15
|
+
},
|
|
8
16
|
setup(options, nuxt) {
|
|
9
17
|
const resolver = createResolver(import.meta.url);
|
|
10
18
|
nuxt.options.runtimeConfig.public.ignis ||= { zod: false, valibot: false };
|
|
@@ -13,14 +21,14 @@ const module$1 = defineNuxtModule({
|
|
|
13
21
|
if (options.zod === true) {
|
|
14
22
|
addImports([
|
|
15
23
|
{ name: "useZod", from: resolver.resolve("runtime/app/composables/useZod") },
|
|
16
|
-
{ name: "
|
|
24
|
+
{ name: "isValidByZod", from: resolver.resolve("runtime/app/utils/validationZod") }
|
|
17
25
|
]);
|
|
18
26
|
console.debug("zod validation enabled");
|
|
19
27
|
}
|
|
20
28
|
if (options.valibot === true) {
|
|
21
29
|
addImports([
|
|
22
30
|
{ name: "useValibot", from: resolver.resolve("runtime/app/composables/useValibot") },
|
|
23
|
-
{ name: "
|
|
31
|
+
{ name: "isValidByValibot", from: resolver.resolve("runtime/app/utils/validationValibot") }
|
|
24
32
|
]);
|
|
25
33
|
console.debug("valibot validation enabled");
|
|
26
34
|
}
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/types.d.mts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
6
|
+
|
|
1
7
|
export { default } from './module.mjs'
|
|
2
8
|
|
|
3
|
-
export { type
|
|
9
|
+
export { type IgnisValidationOptions } from './module.mjs'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt-ignis/validation",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Nuxt Ignis module - Validation features",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@nuxt/devtools": "^3.1.1",
|
|
39
|
-
"@nuxt/eslint-config": "^1.
|
|
39
|
+
"@nuxt/eslint-config": "^1.15.1",
|
|
40
40
|
"@nuxt/module-builder": "^1.0.2",
|
|
41
41
|
"@nuxt/schema": "4.3.1",
|
|
42
42
|
"@nuxt/test-utils": "^4.0.0",
|