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 +29 -19
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
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("
|
|
15
|
+
nuxt.hook("ready", async () => {
|
|
18
16
|
await validateRuntimeConfig(nuxt, options);
|
|
19
17
|
});
|
|
20
18
|
return;
|