veryfront 0.1.181 → 0.1.182
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/esm/deno.js +1 -1
- package/esm/src/rendering/orchestrator/pipeline.d.ts +2 -0
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +17 -10
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
- package/src/deno.js +1 -1
- package/src/src/rendering/orchestrator/pipeline.ts +28 -11
- package/src/src/utils/version-constant.ts +1 -1
package/esm/deno.js
CHANGED
|
@@ -76,6 +76,8 @@ export declare class RenderPipeline {
|
|
|
76
76
|
/** Resolve page data for SPA client-side navigation without rendering HTML. */
|
|
77
77
|
resolvePageData(slug: string, options?: RenderOptions): Promise<PageDataResponse>;
|
|
78
78
|
private extractMdxMetadata;
|
|
79
|
+
private serializeLayouts;
|
|
80
|
+
private serializeLayoutProps;
|
|
79
81
|
private resolveAppPath;
|
|
80
82
|
private resolveProjectUpdatedAt;
|
|
81
83
|
private resolvePageDataCss;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE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GAAG,YAAY,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,OAAO,qBAAqB,EAAE,sBAAsB,CAAC;CAC1E;AAyBD,qBAAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,kBAAkB,CAAqB;gBAEnC,MAAM,EAAE,oBAAoB;IAaxC;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAKxB,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,sBAAsB;YAIhB,0BAA0B;IAaxC;;;;;;;;;OASG;YACW,qBAAqB;IAyDnC;;;OAGG;YACW,mBAAmB;IAiGjC,OAAO,CAAC,uBAAuB;IAkCzB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IA+P9E,+EAA+E;IACzE,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC;YA+EzE,kBAAkB;IA2ChC,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,oBAAoB;YAYd,cAAc;IAW5B,OAAO,CAAC,uBAAuB;YAYjB,kBAAkB;YAmElB,uBAAuB;IAmBrC;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;CAetB"}
|
|
@@ -407,17 +407,9 @@ export class RenderPipeline {
|
|
|
407
407
|
const dataResolution = await this.resolveDataFetching(slug, pageInfo.entity.path, layoutResult.nestedLayouts, options);
|
|
408
408
|
const pageProps = dataResolution.pageProps;
|
|
409
409
|
const params = dataResolution.params;
|
|
410
|
-
const layoutProps =
|
|
411
|
-
for (const [layoutId, props] of dataResolution.layoutProps.entries()) {
|
|
412
|
-
layoutProps[layoutId] = props;
|
|
413
|
-
}
|
|
410
|
+
const layoutProps = this.serializeLayoutProps(dataResolution.layoutProps);
|
|
414
411
|
const { frontmatter, headings } = await this.extractMdxMetadata(pageType, pageInfo, slug, options, params);
|
|
415
|
-
const layouts = layoutResult.nestedLayouts
|
|
416
|
-
.filter((l) => l.componentPath || l.path)
|
|
417
|
-
.map((l) => ({
|
|
418
|
-
kind: l.kind,
|
|
419
|
-
path: extractRelativePathShared(l.componentPath || l.path || "", this.config.projectDir),
|
|
420
|
-
}));
|
|
412
|
+
const layouts = this.serializeLayouts(layoutResult.nestedLayouts);
|
|
421
413
|
const providers = [];
|
|
422
414
|
const projectUpdatedAt = this.resolveProjectUpdatedAt();
|
|
423
415
|
const appPath = await this.resolveAppPath();
|
|
@@ -477,6 +469,21 @@ export class RenderPipeline {
|
|
|
477
469
|
return { frontmatter: {}, headings: [] };
|
|
478
470
|
}
|
|
479
471
|
}
|
|
472
|
+
serializeLayouts(nestedLayouts) {
|
|
473
|
+
return nestedLayouts
|
|
474
|
+
.filter((layout) => layout.componentPath || layout.path)
|
|
475
|
+
.map((layout) => ({
|
|
476
|
+
kind: layout.kind,
|
|
477
|
+
path: extractRelativePathShared(layout.componentPath || layout.path || "", this.config.projectDir),
|
|
478
|
+
}));
|
|
479
|
+
}
|
|
480
|
+
serializeLayoutProps(layoutProps) {
|
|
481
|
+
const serialized = {};
|
|
482
|
+
for (const [layoutId, props] of layoutProps.entries()) {
|
|
483
|
+
serialized[layoutId] = props;
|
|
484
|
+
}
|
|
485
|
+
return serialized;
|
|
486
|
+
}
|
|
480
487
|
async resolveAppPath() {
|
|
481
488
|
for (const ext of LAYOUT_EXTENSIONS) {
|
|
482
489
|
const candidatePath = join(this.config.projectDir, `components/app.${ext}`);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.182";
|
|
2
2
|
//# sourceMappingURL=version-constant.d.ts.map
|
package/package.json
CHANGED
package/src/deno.js
CHANGED
|
@@ -664,11 +664,7 @@ export class RenderPipeline {
|
|
|
664
664
|
|
|
665
665
|
const pageProps: Record<string, unknown> = dataResolution.pageProps;
|
|
666
666
|
const params = dataResolution.params;
|
|
667
|
-
const layoutProps
|
|
668
|
-
|
|
669
|
-
for (const [layoutId, props] of dataResolution.layoutProps.entries()) {
|
|
670
|
-
layoutProps[layoutId] = props;
|
|
671
|
-
}
|
|
667
|
+
const layoutProps = this.serializeLayoutProps(dataResolution.layoutProps);
|
|
672
668
|
|
|
673
669
|
const { frontmatter, headings } = await this.extractMdxMetadata(
|
|
674
670
|
pageType,
|
|
@@ -678,12 +674,7 @@ export class RenderPipeline {
|
|
|
678
674
|
params,
|
|
679
675
|
);
|
|
680
676
|
|
|
681
|
-
const layouts = layoutResult.nestedLayouts
|
|
682
|
-
.filter((l: LayoutItem) => l.componentPath || l.path)
|
|
683
|
-
.map((l: LayoutItem) => ({
|
|
684
|
-
kind: l.kind,
|
|
685
|
-
path: extractRelativePathShared(l.componentPath || l.path || "", this.config.projectDir),
|
|
686
|
-
}));
|
|
677
|
+
const layouts = this.serializeLayouts(layoutResult.nestedLayouts);
|
|
687
678
|
|
|
688
679
|
const providers: string[] = [];
|
|
689
680
|
|
|
@@ -765,6 +756,32 @@ export class RenderPipeline {
|
|
|
765
756
|
}
|
|
766
757
|
}
|
|
767
758
|
|
|
759
|
+
private serializeLayouts(
|
|
760
|
+
nestedLayouts: LayoutItem[],
|
|
761
|
+
): Array<{ kind: LayoutItem["kind"]; path: string }> {
|
|
762
|
+
return nestedLayouts
|
|
763
|
+
.filter((layout: LayoutItem) => layout.componentPath || layout.path)
|
|
764
|
+
.map((layout: LayoutItem) => ({
|
|
765
|
+
kind: layout.kind,
|
|
766
|
+
path: extractRelativePathShared(
|
|
767
|
+
layout.componentPath || layout.path || "",
|
|
768
|
+
this.config.projectDir,
|
|
769
|
+
),
|
|
770
|
+
}));
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
private serializeLayoutProps(
|
|
774
|
+
layoutProps: Map<string, Record<string, unknown>>,
|
|
775
|
+
): Record<string, Record<string, unknown>> {
|
|
776
|
+
const serialized: Record<string, Record<string, unknown>> = {};
|
|
777
|
+
|
|
778
|
+
for (const [layoutId, props] of layoutProps.entries()) {
|
|
779
|
+
serialized[layoutId] = props;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
return serialized;
|
|
783
|
+
}
|
|
784
|
+
|
|
768
785
|
private async resolveAppPath(): Promise<string | undefined> {
|
|
769
786
|
for (const ext of LAYOUT_EXTENSIONS) {
|
|
770
787
|
const candidatePath = join(this.config.projectDir, `components/app.${ext}`);
|