@decocms/start 1.2.4 → 1.2.6
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/package.json +1 -1
- package/src/cms/resolve.ts +20 -0
package/package.json
CHANGED
package/src/cms/resolve.ts
CHANGED
|
@@ -627,7 +627,17 @@ async function resolveRawSection(
|
|
|
627
627
|
section: unknown,
|
|
628
628
|
rctx: ResolveContext,
|
|
629
629
|
): Promise<ResolvedSection[]> {
|
|
630
|
+
const sectionRt = (section as any)?.__resolveType;
|
|
631
|
+
if (String(sectionRt).includes("eader")) {
|
|
632
|
+
console.log(`[RAW-SECTION-ENTER] sectionRt="${sectionRt}"`);
|
|
633
|
+
}
|
|
634
|
+
|
|
630
635
|
const resolved = await internalResolve(section, rctx);
|
|
636
|
+
|
|
637
|
+
if (String(sectionRt).includes("eader")) {
|
|
638
|
+
console.log(`[RAW-SECTION-RESOLVED] resolved type=${typeof resolved} isObj=${resolved && typeof resolved === 'object'} keys=${resolved && typeof resolved === 'object' ? Object.keys(resolved as any).join(',') : 'N/A'}`);
|
|
639
|
+
}
|
|
640
|
+
|
|
631
641
|
if (!resolved || typeof resolved !== "object") return [];
|
|
632
642
|
|
|
633
643
|
const items = Array.isArray(resolved) ? resolved : [resolved];
|
|
@@ -639,6 +649,11 @@ async function resolveRawSection(
|
|
|
639
649
|
if (!obj.__resolveType) continue;
|
|
640
650
|
|
|
641
651
|
const resolveType = obj.__resolveType as string;
|
|
652
|
+
|
|
653
|
+
if (resolveType.includes("eader")) {
|
|
654
|
+
console.log(`[RAW-SECTION] resolveType="${resolveType}" objKeys=[${Object.keys(obj).join(",")}]`);
|
|
655
|
+
}
|
|
656
|
+
|
|
642
657
|
const sectionLoader = getSection(resolveType);
|
|
643
658
|
if (!sectionLoader) {
|
|
644
659
|
console.warn(`[CMS] No component registered for: ${resolveType}`);
|
|
@@ -647,6 +662,11 @@ async function resolveRawSection(
|
|
|
647
662
|
|
|
648
663
|
const { __resolveType: _, ...rawProps } = obj;
|
|
649
664
|
const props = normalizeNestedSections(rawProps) as Record<string, unknown>;
|
|
665
|
+
|
|
666
|
+
if (resolveType.includes("eader")) {
|
|
667
|
+
console.log(`[RAW-SECTION] rawPropKeys=[${Object.keys(rawProps).join(",")}] normalizedPropKeys=[${Object.keys(props).join(",")}]`);
|
|
668
|
+
}
|
|
669
|
+
|
|
650
670
|
results.push({
|
|
651
671
|
component: resolveType,
|
|
652
672
|
props,
|