dinou 4.0.4 → 4.0.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/CHANGELOG.md +6 -0
- package/dinou/core/build-static-pages.js +20 -23
- package/dinou/package.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [4.0.5]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Pass props to RootLayout in BuildStaticPages.
|
|
13
|
+
|
|
8
14
|
## [4.0.4]
|
|
9
15
|
|
|
10
16
|
### Fixed
|
|
@@ -902,7 +902,14 @@ async function buildStaticPages() {
|
|
|
902
902
|
for (const [layoutPath, dParams, slots] of layouts.reverse()) {
|
|
903
903
|
const layoutModule = await importModule(layoutPath);
|
|
904
904
|
const Layout = layoutModule.default ?? layoutModule;
|
|
905
|
-
|
|
905
|
+
const layoutFolderPath = path.dirname(layoutPath);
|
|
906
|
+
const resetLayoutPath = getFilePathAndDynamicParams(
|
|
907
|
+
[],
|
|
908
|
+
{},
|
|
909
|
+
layoutFolderPath,
|
|
910
|
+
"reset_layout",
|
|
911
|
+
false,
|
|
912
|
+
)[0];
|
|
906
913
|
const updatedSlots = {};
|
|
907
914
|
for (const [slotName, slotElement] of Object.entries(slots)) {
|
|
908
915
|
const alreadyFoundPath = slotElement.props?.__modulePath;
|
|
@@ -916,21 +923,12 @@ async function buildStaticPages() {
|
|
|
916
923
|
params: dParams,
|
|
917
924
|
/*searchParams: {},*/ ...updatedSlots,
|
|
918
925
|
};
|
|
919
|
-
if (index === layouts.length - 1) {
|
|
926
|
+
if (index === layouts.length - 1 || resetLayoutPath) {
|
|
920
927
|
props = { ...props, ...(pageFunctionsProps?.layout ?? {}) };
|
|
921
928
|
}
|
|
922
929
|
jsx = React.createElement(Layout, props, jsx);
|
|
923
930
|
jsx = { ...jsx, __modulePath: layoutPath };
|
|
924
|
-
|
|
925
|
-
if (
|
|
926
|
-
getFilePathAndDynamicParams(
|
|
927
|
-
[],
|
|
928
|
-
{},
|
|
929
|
-
layoutFolderPath,
|
|
930
|
-
"reset_layout",
|
|
931
|
-
false,
|
|
932
|
-
)[0]
|
|
933
|
-
) {
|
|
931
|
+
if (resetLayoutPath) {
|
|
934
932
|
break;
|
|
935
933
|
}
|
|
936
934
|
index++;
|
|
@@ -1177,6 +1175,14 @@ async function buildStaticPage(reqPath, isDynamic = null) {
|
|
|
1177
1175
|
for (const [layoutPath, dParams, slots] of layouts.reverse()) {
|
|
1178
1176
|
const layoutModule = await importModule(layoutPath);
|
|
1179
1177
|
const Layout = layoutModule.default ?? layoutModule;
|
|
1178
|
+
const layoutFolderPath = path.dirname(layoutPath);
|
|
1179
|
+
const resetLayoutPath = getFilePathAndDynamicParams(
|
|
1180
|
+
[],
|
|
1181
|
+
{},
|
|
1182
|
+
layoutFolderPath,
|
|
1183
|
+
"reset_layout",
|
|
1184
|
+
false,
|
|
1185
|
+
)[0];
|
|
1180
1186
|
const updatedSlots = {};
|
|
1181
1187
|
for (const [slotName, slotElement] of Object.entries(slots)) {
|
|
1182
1188
|
const alreadyFoundPath = slotElement.props?.__modulePath;
|
|
@@ -1191,7 +1197,7 @@ async function buildStaticPage(reqPath, isDynamic = null) {
|
|
|
1191
1197
|
// searchParams: {},
|
|
1192
1198
|
...updatedSlots,
|
|
1193
1199
|
};
|
|
1194
|
-
if (index === layouts.length - 1) {
|
|
1200
|
+
if (index === layouts.length - 1 || resetLayoutPath) {
|
|
1195
1201
|
layoutProps = {
|
|
1196
1202
|
...layoutProps,
|
|
1197
1203
|
...(pageFunctionsProps?.layout ?? {}),
|
|
@@ -1199,16 +1205,7 @@ async function buildStaticPage(reqPath, isDynamic = null) {
|
|
|
1199
1205
|
}
|
|
1200
1206
|
jsx = React.createElement(Layout, layoutProps, jsx);
|
|
1201
1207
|
jsx = { ...jsx, __modulePath: layoutPath };
|
|
1202
|
-
|
|
1203
|
-
if (
|
|
1204
|
-
getFilePathAndDynamicParams(
|
|
1205
|
-
[],
|
|
1206
|
-
{},
|
|
1207
|
-
layoutFolderPath,
|
|
1208
|
-
"reset_layout",
|
|
1209
|
-
false,
|
|
1210
|
-
)[0]
|
|
1211
|
-
) {
|
|
1208
|
+
if (resetLayoutPath) {
|
|
1212
1209
|
break;
|
|
1213
1210
|
}
|
|
1214
1211
|
index++;
|
package/dinou/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dinou",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.0.5",
|
|
4
|
+
"description": "Full-Stack React 19 framework with React Server Components, Server Functions, and Streaming SSR.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"dinou": "./cli.js"
|