@constela/start 1.2.22 → 1.2.23
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.
|
@@ -2782,7 +2782,7 @@ async function processLayouts(pageInfo, layoutsDir, routeParams = {}) {
|
|
|
2782
2782
|
};
|
|
2783
2783
|
return updatedPageInfo;
|
|
2784
2784
|
}
|
|
2785
|
-
async function renderPageToHtml(program, params, runtimePath, cssPath, externalImports) {
|
|
2785
|
+
async function renderPageToHtml(program, params, runtimePath, cssPath, externalImports, widgets) {
|
|
2786
2786
|
const normalizedProgram = {
|
|
2787
2787
|
...program,
|
|
2788
2788
|
view: normalizeViewNode(structuredClone(program.view))
|
|
@@ -2799,7 +2799,8 @@ async function renderPageToHtml(program, params, runtimePath, cssPath, externalI
|
|
|
2799
2799
|
path: "/"
|
|
2800
2800
|
};
|
|
2801
2801
|
const cssLinkTag = cssPath ? `<link rel="stylesheet" href="${cssPath}">` : void 0;
|
|
2802
|
-
const
|
|
2802
|
+
const widgetConfigs = widgets?.map((w) => ({ id: w.id, program: w.program }));
|
|
2803
|
+
const hydrationScript = generateHydrationScript(normalizedProgram, widgetConfigs, routeContext);
|
|
2803
2804
|
const wrapOptions = {};
|
|
2804
2805
|
if (runtimePath) {
|
|
2805
2806
|
wrapOptions.runtimePath = runtimePath;
|
|
@@ -2944,7 +2945,7 @@ async function build2(options) {
|
|
|
2944
2945
|
processedPageInfo = await processLayouts(boundPageInfo, layoutsDir, params);
|
|
2945
2946
|
}
|
|
2946
2947
|
const program = await convertToCompiledProgram(processedPageInfo);
|
|
2947
|
-
const html = await renderPageToHtml(program, params, runtimePath, cssPath, processedPageInfo.page.externalImports);
|
|
2948
|
+
const html = await renderPageToHtml(program, params, runtimePath, cssPath, processedPageInfo.page.externalImports, processedPageInfo.widgets);
|
|
2948
2949
|
await mkdir2(dirname5(outputPath), { recursive: true });
|
|
2949
2950
|
await writeFile(outputPath, html, "utf-8");
|
|
2950
2951
|
generatedFiles.push(outputPath);
|
|
@@ -2983,7 +2984,7 @@ async function build2(options) {
|
|
|
2983
2984
|
pageInfo = await processLayouts(pageInfo, layoutsDir, {});
|
|
2984
2985
|
}
|
|
2985
2986
|
const program = await convertToCompiledProgram(pageInfo);
|
|
2986
|
-
const html = await renderPageToHtml(program, {}, runtimePath, cssPath, pageInfo.page.externalImports);
|
|
2987
|
+
const html = await renderPageToHtml(program, {}, runtimePath, cssPath, pageInfo.page.externalImports, pageInfo.widgets);
|
|
2987
2988
|
await mkdir2(dirname5(outputPath), { recursive: true });
|
|
2988
2989
|
await writeFile(outputPath, html, "utf-8");
|
|
2989
2990
|
generatedFiles.push(outputPath);
|
package/dist/cli/index.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/start",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"description": "Meta-framework for Constela applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"tailwindcss": "^4.0.0",
|
|
46
46
|
"@constela/compiler": "0.7.1",
|
|
47
47
|
"@constela/core": "0.7.0",
|
|
48
|
-
"@constela/router": "8.0.0",
|
|
49
48
|
"@constela/runtime": "0.10.3",
|
|
50
|
-
"@constela/server": "3.0.1"
|
|
49
|
+
"@constela/server": "3.0.1",
|
|
50
|
+
"@constela/router": "8.0.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/mdast": "^4.0.4",
|