@onderwijsin/nuxt-turnstile 0.3.1 → 0.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@onderwijsin/nuxt-turnstile",
3
3
  "configKey": "turnstile",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "compatibility": {
6
6
  "nuxt": "^4.0.0"
7
7
  },
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { enabled, resolveModuleName, resolveLoggerScope, moduleSetup, validateMo
4
4
  import { isRecord, hasKey, isArray, isString } from '@onderwijsin/nuxt-module-utils/shared';
5
5
  import { z } from 'zod';
6
6
 
7
- const version = "0.3.1";
7
+ const version = "0.3.2";
8
8
 
9
9
  const turnstileOptionsSchema = z.object({
10
10
  enabled,
@@ -63,12 +63,14 @@ const module$1 = defineNuxtModule({
63
63
  );
64
64
  nuxt.options.turnstile = defu(nuxt.options.turnstile, {});
65
65
  nuxt.options.turnstile.siteKey ??= options.siteKey;
66
- nuxt.hook("nitro:config", (nitro) => {
67
- const imports = nitro.imports;
68
- if (!isRecord(imports) || !hasKey(imports, "presets")) return;
69
- const presets = imports.presets;
70
- if (!isArray(presets)) return;
71
- imports.presets = presets.filter((preset) => !isUpstreamTurnstileVerifierPreset(preset));
66
+ nuxt.hook("modules:done", () => {
67
+ nuxt.hook("nitro:config", (nitro) => {
68
+ const imports = nitro.imports;
69
+ if (!isRecord(imports) || !hasKey(imports, "presets")) return;
70
+ const presets = imports.presets;
71
+ if (!isArray(presets)) return;
72
+ imports.presets = presets.filter((preset) => !isUpstreamTurnstileVerifierPreset(preset));
73
+ });
72
74
  });
73
75
  transpileRuntime(nuxt, runtimeDir);
74
76
  addImportsDir(resolver.resolve(runtimeDir, "app", "composables"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onderwijsin/nuxt-turnstile",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Nuxt Turnstile integration with client helpers and server-side validation.",
5
5
  "homepage": "https://github.com/onderwijsin/nuxt-modules#readme",
6
6
  "bugs": {