@pronto-tools-and-more/components-renderer 12.29.0 → 12.30.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components-renderer",
3
- "version": "12.29.0",
3
+ "version": "12.30.0",
4
4
  "description": "",
5
5
  "main": "src/componentsRendererMain.js",
6
6
  "type": "module",
@@ -0,0 +1,8 @@
1
+ import * as FakeNode2 from "../FakeNode2/FakeNode2.js";
2
+
3
+ export const createFakeSection2 = (children) => {
4
+ return {
5
+ type: "section",
6
+ content: [...children, FakeNode2.fakeNode2],
7
+ };
8
+ };
@@ -0,0 +1,6 @@
1
+ // fake node (to allow using normal html)
2
+ export const fakeNode2 = {
3
+ type: "html",
4
+ tag: "x/custom",
5
+ content: "",
6
+ };
@@ -15,13 +15,14 @@ const getRealPathPrefix = (isBuild, pathPrefix) => {
15
15
  return pathPrefix;
16
16
  };
17
17
 
18
- export const renderViews = async (
19
- componentsPathMain,
18
+ export const renderViews = async ({
19
+ componentsPath,
20
20
  tsconfigPath,
21
21
  pathPrefix,
22
- isBuild
23
- ) => {
24
- Assert.string(componentsPathMain);
22
+ supportsNormalHtml,
23
+ isBuild,
24
+ }) => {
25
+ Assert.string(componentsPath);
25
26
  Assert.string(tsconfigPath);
26
27
 
27
28
  const assetDir = isBuild ? "resource://dynamic/storefront/assets" : "";
@@ -30,7 +31,7 @@ export const renderViews = async (
30
31
  const realPathPrefix = getRealPathPrefix(isBuild, pathPrefix);
31
32
  SetPathPrefix.setPathPrefix(realPathPrefix);
32
33
 
33
- const module = await LoadRoutes.loadRoutes(componentsPathMain);
34
+ const module = await LoadRoutes.loadRoutes(componentsPath);
34
35
  const values = Object.values(module);
35
36
  // TODO return views string instead of json for faster performance?
36
37
  const views = CreateViews.createViews(values);