@duffcloudservices/cms 0.13.3 → 0.13.5
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 +6 -2
- package/dist/{chunk-OGAJX4KM.js → chunk-GBHJVHXR.js} +116 -3
- package/dist/chunk-GBHJVHXR.js.map +1 -0
- package/dist/{chunk-64BUBTW7.js → chunk-W5Q6SOAP.js} +35 -3
- package/dist/chunk-W5Q6SOAP.js.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/{installSeoHead-EE0Z7UmK.d.ts → installSeoHead-CuVdVCis.d.ts} +1 -1
- package/dist/plugins/index.d.ts +12 -6
- package/dist/plugins/index.js +49 -33
- package/dist/plugins/index.js.map +1 -1
- package/dist/seo/index.d.ts +132 -7
- package/dist/seo/index.js +2 -2
- package/dist/{vitepressTransform-Ds5Hff8t.d.ts → vitepressTransform-CZ_IB3dq.d.ts} +47 -1
- package/package.json +9 -3
- package/src/components/LiteMediaEmbed.test.ts +74 -1
- package/src/components/ManagedImage.test.ts +16 -1
- package/src/components/PreviewRibbon.vue +11 -3
- package/src/components/ResponsiveImage.test.ts +16 -1
- package/src/components/raw-source-imports.test.ts +128 -4
- package/src/composables/resolveApiBaseUrl.test.ts +71 -0
- package/src/composables/resolveApiBaseUrl.ts +49 -0
- package/src/composables/useReleaseNotes.ts +3 -1
- package/src/composables/useSiteVersion.ts +3 -1
- package/dist/chunk-64BUBTW7.js.map +0 -1
- package/dist/chunk-OGAJX4KM.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
3
|
-
import { U as UseSeoReturn, G as GlobalSeoConfig } from './vitepressTransform-
|
|
4
|
-
export { A as AI_BOTS, y as BlogMeta, x as BreadcrumbCrumb, v as BuildLlmsParams, u as BuildRobotsParams, B as BuildSitemapParams, E as ContentConfig, C as CreateSeoTransformPageDataOptions, D as DcsRobotsOptions, F as FaqSource, X as HeadOverrides, P as PageSeoConfig, R as ResolvedPageOverrides, T as ResolvedPageSeo, z as ReviewSource, w as SchemaObject, O as SeoAlternateConfig, I as SeoAuthorConfig, H as SeoConfiguration, K as SeoImagesConfig, L as SeoOpenGraphConfig, S as SeoPageContext, r as SeoPageTypeRule, N as SeoSchemaConfig, J as SeoSocialConfig, M as SeoTwitterConfig, Q as SeoVerificationConfig, W as UseSeoConfig, t as VitePressHeadConfig, V as VitePressPageData, q as absolutizeUrl, j as breadcrumbTrailFromRoute, k as buildBlogPosting, h as buildBreadcrumbList, l as buildFaqPage, g as buildGlobalGraph, f as buildLlmsTxt, m as buildReviewSchemaParts, e as buildRobotsTxt, a as buildSitemapXml, b as buildVitePressSeoHead, c as createSeoTransformPageData, d as defaultRelativePathToRoute, o as filterRealFaq, n as filterRealReviews, p as findReviewItemsForPage, i as isRouteIndexable, s as slugToTitle } from './vitepressTransform-
|
|
5
|
-
export { l as HeadLinkTag, H as HeadMetaTag, m as HeadScriptTag, o as HeadTagOverrides, I as InstallSeoHeadOptions, R as ResolvedHeadTags, q as SeoHeadClientLike, t as SeoHeadEntryLike, u as SeoHeadInput, v as SeoHeadPageRoute, w as SeoHeadPagesManifest, x as SeoHeadResolution, y as SeoHeadResolutionReason, p as SeoHeadRouteLike, S as SeoHeadRouterLike, b as buildHeadTags, k as buildSeoHeadRouteMap, f as escapeJsonLd, g as generateJsonLd, a as generateOpenGraphMeta, c as generateTwitterMeta, j as installSeoHead, h as isManagedLinkRel, i as isManagedMetaTag, n as normalizeSeoHeadPath, d as renderHeadTags, r as resolvePageSeo, s as spliceHeadHtml, e as stripManagedHeadTags } from './installSeoHead-
|
|
3
|
+
import { U as UseSeoReturn, G as GlobalSeoConfig } from './vitepressTransform-CZ_IB3dq.js';
|
|
4
|
+
export { A as AI_BOTS, y as BlogMeta, x as BreadcrumbCrumb, v as BuildLlmsParams, u as BuildRobotsParams, B as BuildSitemapParams, E as ContentConfig, C as CreateSeoTransformPageDataOptions, D as DcsRobotsOptions, F as FaqSource, X as HeadOverrides, P as PageSeoConfig, R as ResolvedPageOverrides, T as ResolvedPageSeo, z as ReviewSource, w as SchemaObject, O as SeoAlternateConfig, I as SeoAuthorConfig, H as SeoConfiguration, K as SeoImagesConfig, L as SeoOpenGraphConfig, S as SeoPageContext, r as SeoPageTypeRule, N as SeoSchemaConfig, J as SeoSocialConfig, M as SeoTwitterConfig, Q as SeoVerificationConfig, W as UseSeoConfig, t as VitePressHeadConfig, V as VitePressPageData, q as absolutizeUrl, j as breadcrumbTrailFromRoute, k as buildBlogPosting, h as buildBreadcrumbList, l as buildFaqPage, g as buildGlobalGraph, f as buildLlmsTxt, m as buildReviewSchemaParts, e as buildRobotsTxt, a as buildSitemapXml, b as buildVitePressSeoHead, c as createSeoTransformPageData, d as defaultRelativePathToRoute, o as filterRealFaq, n as filterRealReviews, p as findReviewItemsForPage, i as isRouteIndexable, s as slugToTitle } from './vitepressTransform-CZ_IB3dq.js';
|
|
5
|
+
export { l as HeadLinkTag, H as HeadMetaTag, m as HeadScriptTag, o as HeadTagOverrides, I as InstallSeoHeadOptions, R as ResolvedHeadTags, q as SeoHeadClientLike, t as SeoHeadEntryLike, u as SeoHeadInput, v as SeoHeadPageRoute, w as SeoHeadPagesManifest, x as SeoHeadResolution, y as SeoHeadResolutionReason, p as SeoHeadRouteLike, S as SeoHeadRouterLike, b as buildHeadTags, k as buildSeoHeadRouteMap, f as escapeJsonLd, g as generateJsonLd, a as generateOpenGraphMeta, c as generateTwitterMeta, j as installSeoHead, h as isManagedLinkRel, i as isManagedMetaTag, n as normalizeSeoHeadPath, d as renderHeadTags, r as resolvePageSeo, s as spliceHeadHtml, e as stripManagedHeadTags } from './installSeoHead-CuVdVCis.js';
|
|
6
6
|
import { ImageContext, ResponsiveImageResult } from '@duffcloudservices/cms-core';
|
|
7
7
|
export { ImageContext, ResponsiveImageOptions, ResponsiveImageResult, ResponsiveSource, isCdnAssetUrl, resolveResponsiveImage } from '@duffcloudservices/cms-core';
|
|
8
8
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import './chunk-
|
|
2
|
-
import { resolvePageSeo, generateJsonLd, buildHeadTags } from './chunk-
|
|
3
|
-
export { AI_BOTS, absolutizeUrl, breadcrumbTrailFromRoute, buildBlogPosting, buildBreadcrumbList, buildFaqPage, buildGlobalGraph, buildHeadTags, buildLlmsTxt, buildReviewSchemaParts, buildRobotsTxt, buildSeoHeadRouteMap, buildSitemapXml, buildVitePressSeoHead, createSeoTransformPageData, defaultRelativePathToRoute, escapeJsonLd, filterRealFaq, filterRealReviews, findReviewItemsForPage, generateJsonLd, generateOpenGraphMeta, generateTwitterMeta, installSeoHead, isManagedLinkRel, isManagedMetaTag, isRouteIndexable, normalizeSeoHeadPath, renderHeadTags, resolvePageSeo, slugToTitle, spliceHeadHtml, stripManagedHeadTags } from './chunk-
|
|
1
|
+
import './chunk-GBHJVHXR.js';
|
|
2
|
+
import { resolvePageSeo, generateJsonLd, buildHeadTags } from './chunk-W5Q6SOAP.js';
|
|
3
|
+
export { AI_BOTS, absolutizeUrl, breadcrumbTrailFromRoute, buildBlogPosting, buildBreadcrumbList, buildFaqPage, buildGlobalGraph, buildHeadTags, buildLlmsTxt, buildReviewSchemaParts, buildRobotsTxt, buildSeoHeadRouteMap, buildSitemapXml, buildVitePressSeoHead, createSeoTransformPageData, defaultRelativePathToRoute, escapeJsonLd, filterRealFaq, filterRealReviews, findReviewItemsForPage, generateJsonLd, generateOpenGraphMeta, generateTwitterMeta, installSeoHead, isManagedLinkRel, isManagedMetaTag, isRouteIndexable, normalizeSeoHeadPath, renderHeadTags, resolvePageSeo, slugToTitle, spliceHeadHtml, stripManagedHeadTags } from './chunk-W5Q6SOAP.js';
|
|
4
4
|
import { shallowRef, getCurrentInstance, onMounted, onBeforeUnmount, ref, computed, readonly, toValue, onUnmounted } from 'vue';
|
|
5
5
|
import { isCdnAssetUrl, resolveResponsiveImage, readPlatformJson, isPlatformFetchError, platformFetch } from '@duffcloudservices/cms-core';
|
|
6
6
|
export { isCdnAssetUrl, resolveResponsiveImage } from '@duffcloudservices/cms-core';
|
|
@@ -613,6 +613,23 @@ function createSiteSEO(_siteDefaults) {
|
|
|
613
613
|
return useSEO(pageSlug, pagePath);
|
|
614
614
|
};
|
|
615
615
|
}
|
|
616
|
+
|
|
617
|
+
// src/composables/resolveApiBaseUrl.ts
|
|
618
|
+
var API_BASE_URL_ENV = "VITE_API_BASE_URL";
|
|
619
|
+
var warned = false;
|
|
620
|
+
function resolveApiBaseUrl(raw, caller) {
|
|
621
|
+
const value = (raw ?? "").trim();
|
|
622
|
+
if (value !== "") return value.replace(/\/+$/, "");
|
|
623
|
+
if (!warned) {
|
|
624
|
+
warned = true;
|
|
625
|
+
console.warn(
|
|
626
|
+
`[dcs-cms] ${caller}: ${API_BASE_URL_ENV} is not set; API reads go relative to this origin. The production origin is no longer assumed (C-1062) - set it in .env for local and preview builds.`
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
return "";
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
// src/composables/useReleaseNotes.ts
|
|
616
633
|
function getEnvVar2(key, defaultValue = "") {
|
|
617
634
|
try {
|
|
618
635
|
if (typeof import.meta !== "undefined" && import.meta.env) {
|
|
@@ -627,7 +644,7 @@ var releaseNotesCache = /* @__PURE__ */ new Map();
|
|
|
627
644
|
var CACHE_TTL = 5 * 60 * 1e3;
|
|
628
645
|
function useReleaseNotes(version, options = {}) {
|
|
629
646
|
const { fetchOnMount = true } = options;
|
|
630
|
-
const apiBaseUrl = getEnvVar2(
|
|
647
|
+
const apiBaseUrl = resolveApiBaseUrl(getEnvVar2(API_BASE_URL_ENV), "useReleaseNotes");
|
|
631
648
|
const siteSlug = getEnvVar2("VITE_SITE_SLUG", "");
|
|
632
649
|
const releaseNote = ref(null);
|
|
633
650
|
const isLoading = ref(false);
|
|
@@ -707,7 +724,7 @@ var versionCache = null;
|
|
|
707
724
|
var CACHE_TTL2 = 10 * 60 * 1e3;
|
|
708
725
|
function useSiteVersion(options = {}) {
|
|
709
726
|
const { fetchOnMount = true } = options;
|
|
710
|
-
const apiBaseUrl = getEnvVar3(
|
|
727
|
+
const apiBaseUrl = resolveApiBaseUrl(getEnvVar3(API_BASE_URL_ENV), "useSiteVersion");
|
|
711
728
|
void getEnvVar3("VITE_SITE_SLUG", "");
|
|
712
729
|
const version = ref(null);
|
|
713
730
|
const isLoading = ref(false);
|