@vigilkids/cms-nuxt 0.5.2 → 0.5.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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.5.4] - 2026-06-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added route-policy-aware CMS site runtime support for preview, revalidation, sitemap, and resource route generation.
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Updated the `@vigilkids/cms-client` peer dependency to `^0.3.3`.
|
|
17
|
+
|
|
8
18
|
## [0.5.1] - 2026-06-05
|
|
9
19
|
|
|
10
20
|
### Fixed
|
package/dist/module.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../../src/runtime/plugins/site-config.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"site-config.d.ts","sourceRoot":"","sources":["../../../src/runtime/plugins/site-config.ts"],"names":[],"mappings":";AAcA,wBAgBE"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineNuxtPlugin, useRequestFetch, useRuntimeConfig } from "#imports";
|
|
2
2
|
import { useCmsSiteConfig } from "../composables/useCmsSiteConfig.js";
|
|
3
|
+
async function fetchClientSiteConfig() {
|
|
4
|
+
const response = await fetch("/api/cms/site-config", {
|
|
5
|
+
headers: { Accept: "application/json" }
|
|
6
|
+
});
|
|
7
|
+
if (!response.ok) {
|
|
8
|
+
throw new Error(`CMS site config request failed with status ${response.status}`);
|
|
9
|
+
}
|
|
10
|
+
return await response.json();
|
|
11
|
+
}
|
|
3
12
|
export default defineNuxtPlugin(async () => {
|
|
4
13
|
const config = useRuntimeConfig();
|
|
5
14
|
const cmsConfig = config.public.cms;
|
|
@@ -8,7 +17,6 @@ export default defineNuxtPlugin(async () => {
|
|
|
8
17
|
}
|
|
9
18
|
const siteConfig = useCmsSiteConfig();
|
|
10
19
|
if (!siteConfig.value) {
|
|
11
|
-
|
|
12
|
-
siteConfig.value = await requestFetch("/api/cms/site-config");
|
|
20
|
+
siteConfig.value = import.meta.server ? await useRequestFetch()("/api/cms/site-config") : await fetchClientSiteConfig();
|
|
13
21
|
}
|
|
14
22
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vigilkids/cms-nuxt",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Nuxt 3 module for OnEx CMS — composables, server routes, middleware, sitemap",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/module.mjs",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"vue": "^3.4.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@vigilkids/cms-client": "^0.3.
|
|
47
|
+
"@vigilkids/cms-client": "^0.3.3",
|
|
48
48
|
"nuxt": ">=3.15.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependenciesMeta": {
|