@pronto-tools-and-more/pronto 5.7.1 → 5.8.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/pronto",
3
- "version": "5.7.1",
3
+ "version": "5.8.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -17,13 +17,13 @@
17
17
  "@lvce-editor/ipc": "^10.2.1",
18
18
  "@lvce-editor/json-rpc": "^3.0.0",
19
19
  "@lvce-editor/verror": "^1.4.0",
20
- "@pronto-tools-and-more/file-watcher": "5.7.1",
21
- "@pronto-tools-and-more/files": "5.7.1",
22
- "@pronto-tools-and-more/network-process": "5.7.1",
23
- "@pronto-tools-and-more/sass-compiler": "5.7.1",
24
- "@pronto-tools-and-more/components-renderer": "5.7.1",
25
- "@pronto-tools-and-more/components": "5.7.1",
26
- "@pronto-tools-and-more/schema-process": "5.7.1",
20
+ "@pronto-tools-and-more/file-watcher": "5.8.0",
21
+ "@pronto-tools-and-more/files": "5.8.0",
22
+ "@pronto-tools-and-more/network-process": "5.8.0",
23
+ "@pronto-tools-and-more/sass-compiler": "5.8.0",
24
+ "@pronto-tools-and-more/components-renderer": "5.8.0",
25
+ "@pronto-tools-and-more/components": "5.8.0",
26
+ "@pronto-tools-and-more/schema-process": "5.8.0",
27
27
  "execa": "^9.3.1",
28
28
  "express": "^4.19.2"
29
29
  },
@@ -48,6 +48,7 @@ export const build = async () => {
48
48
  storeFrontPath: join(Cwd.cwd, "src", "default", "storefront"),
49
49
  splitViews: Config.splitViews,
50
50
  reactComponents: Config.reactComponents,
51
+ pathPrefix: Config.pathPrefix,
51
52
  });
52
53
  await writeFile(
53
54
  join(dist, "src", "default", "storefront", "assets", "views.json"),
@@ -66,6 +66,8 @@ export const errorColor = config.errorColor || "red";
66
66
 
67
67
  export const validateSchema = config.validateSchema || false;
68
68
 
69
+ export const pathPrefix = config.pathPrefix || false;
70
+
69
71
  const pipelines = Object.values(builderConfig?.postProcessing?.pipelines || {});
70
72
  const sassPipeline = pipelines.find((pipeline) => pipeline.type === "sass");
71
73
 
@@ -7,12 +7,13 @@ export const getViewsResponse = async ({
7
7
  storeFrontPath,
8
8
  splitViews,
9
9
  reactComponents,
10
+ pathPrefix,
10
11
  }) => {
11
12
  if (reactComponents) {
12
- const content =
13
- await HandleViewsReactComponents.handleViewsReactComponents(
14
- storeFrontPath
15
- );
13
+ const content = await HandleViewsReactComponents.handleViewsReactComponents(
14
+ storeFrontPath,
15
+ pathPrefix
16
+ );
16
17
  return content;
17
18
  }
18
19
  if (splitViews) {
@@ -8,6 +8,7 @@ export const handleViews =
8
8
  storeFrontPath,
9
9
  splitViews,
10
10
  reactComponents,
11
+ pathPrefix: "",
11
12
  });
12
13
  res.end(content);
13
14
  };
@@ -8,7 +8,10 @@ import * as UnhandleIpc from "../UnhandleIpc/UnhandleIpc.js";
8
8
  import * as JsonRpc from "../JsonRpc/JsonRpc.js";
9
9
  import * as HandleViewsSplit from "../HandleViewsSplit/HandleViewsSplit.js";
10
10
 
11
- export const handleViewsReactComponents = async (storeFrontPath) => {
11
+ export const handleViewsReactComponents = async (
12
+ storeFrontPath,
13
+ pathPrefix
14
+ ) => {
12
15
  try {
13
16
  const componentsPath = join(
14
17
  storeFrontPath,
@@ -38,7 +41,8 @@ export const handleViewsReactComponents = async (storeFrontPath) => {
38
41
  ipc,
39
42
  "RenderViews.renderViews",
40
43
  componentsPath,
41
- tsconfigPath
44
+ tsconfigPath,
45
+ pathPrefix
42
46
  );
43
47
  UnhandleIpc.unhandleIpc(ipc);
44
48
  ipc.dispose();