nuxt-safe-runtime-config 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/README.md CHANGED
@@ -1,11 +1,32 @@
1
- # Nuxt Safe Runtime Config
2
-
3
- [![npm version][npm-version-src]][npm-version-href]
4
- [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
- [![License][license-src]][license-href]
6
- [![Nuxt][nuxt-src]][nuxt-href]
7
-
8
- Validate Nuxt runtime config at build time using **Zod**, **Valibot**, **ArkType**, or any Standard Schema compatible library.
1
+ <h1 align="center">
2
+ <img alt="Nuxt safe runtime config logo" loading="lazy" width="50" height="50" decoding="async" data-nimg="1" style="color:transparent" src="https://raw.githubusercontent.com/onmax/nuxt-safe-runtime-config/refs/heads/main/.github/logo.svg" />
3
+ </br>
4
+ Nuxt Safe Runtime Config</h1>
5
+ <p align="center">
6
+ Validate Nuxt runtime config at build time using <b>Zod</b>, <b>Valibot</b>, <b>ArkType</b>, or any Standard Schema compatible library.
7
+ </p>
8
+ <br/>
9
+
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/package/nuxt-safe-runtime-config">
12
+ <img src="https://img.shields.io/npm/v/nuxt-safe-runtime-config.svg" alt="npm version" />
13
+ </a>
14
+ <a href="https://www.npmjs.com/package/nuxt-safe-runtime-config">
15
+ <img src="https://img.shields.io/npm/dm/nuxt-safe-runtime-config.svg" alt="npm downloads" />
16
+ </a>
17
+ <a href="https://github.com/onmax/nuxt-safe-runtime-config/blob/main/LICENSE">
18
+ <img src="https://img.shields.io/github/license/onmax/nuxt-safe-runtime-config.svg" alt="License" />
19
+ </a>
20
+ <a href="https://nuxt.com">
21
+ <img src="https://img.shields.io/badge/Nuxt-3.0-00DC82.svg" alt="Nuxt" />
22
+ </a>
23
+
24
+ <p align="center">
25
+ <a href="https://github.com/nuxt/nuxt/discussions/32301">
26
+ 🔗 Related Nuxt RFC: Enable Standard Schema Validation in Nuxt Config
27
+ </a>
28
+ </p>
29
+ </p>
9
30
 
10
31
  ## Features
11
32
 
@@ -179,14 +200,3 @@ pnpm run release
179
200
  ```
180
201
 
181
202
  </details>
182
-
183
- <!-- Badges -->
184
-
185
- [npm-version-src]: https://img.shields.io/npm/v/nuxt-safe-runtime-config/latest.svg?style=flat&colorA=020420&colorB=00DC82
186
- [npm-version-href]: https://npmjs.com/package/nuxt-safe-runtime-config
187
- [npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-safe-runtime-config.svg?style=flat&colorA=020420&colorB=00DC82
188
- [npm-downloads-href]: https://npm.chart.dev/nuxt-safe-runtime-config
189
- [license-src]: https://img.shields.io/npm/l/nuxt-safe-runtime-config.svg?style=flat&colorA=020420&colorB=00DC82
190
- [license-href]: https://npmjs.com/package/nuxt-safe-runtime-config
191
- [nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
192
- [nuxt-href]: https://nuxt.com
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-safe-runtime-config",
3
3
  "configKey": "safeRuntimeConfig",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "3.5.0"
package/dist/module.mjs CHANGED
@@ -11,10 +11,8 @@ const module = defineNuxtModule({
11
11
  // No default schema, users must provide their own
12
12
  },
13
13
  setup(options, nuxt) {
14
- if (!options.$schema)
15
- return;
16
14
  if (nuxt.options.dev) {
17
- nuxt.hook("modules:done", async () => {
15
+ nuxt.hook("ready", async () => {
18
16
  await validateRuntimeConfig(nuxt, options);
19
17
  });
20
18
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-safe-runtime-config",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "description": "Validate Nuxt runtime config with Standard Schema at build time",
6
6
  "author": {
7
7
  "name": "onmax"