@nitronjs/framework 0.2.16 → 0.2.18
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/lib/Build/Manager.js +1 -1
- package/lib/View/View.js +9 -2
- package/package.json +1 -1
package/lib/Build/Manager.js
CHANGED
package/lib/View/View.js
CHANGED
|
@@ -348,7 +348,10 @@ class View {
|
|
|
348
348
|
React.createElement(Component, params)
|
|
349
349
|
);
|
|
350
350
|
} else {
|
|
351
|
-
element =
|
|
351
|
+
element = Component(params);
|
|
352
|
+
if (element && typeof element.then === "function") {
|
|
353
|
+
element = await element;
|
|
354
|
+
}
|
|
352
355
|
}
|
|
353
356
|
|
|
354
357
|
if (layoutModules.length > 0) {
|
|
@@ -357,7 +360,11 @@ class View {
|
|
|
357
360
|
|
|
358
361
|
for (let i = layoutModules.length - 1; i >= 0; i--) {
|
|
359
362
|
const LayoutComponent = layoutModules[i].default;
|
|
360
|
-
element =
|
|
363
|
+
element = LayoutComponent({ children: element });
|
|
364
|
+
|
|
365
|
+
if (element && typeof element.then === "function") {
|
|
366
|
+
element = await element;
|
|
367
|
+
}
|
|
361
368
|
}
|
|
362
369
|
|
|
363
370
|
html = await this.#renderToHtml(element);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nitronjs/framework",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.18",
|
|
4
4
|
"description": "NitronJS is a modern and extensible Node.js MVC framework built on Fastify. It focuses on clean architecture, modular structure, and developer productivity, offering built-in routing, middleware, configuration management, CLI tooling, and native React integration for scalable full-stack applications.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"njs": "./cli/njs.js"
|