@pronto-tools-and-more/pronto 14.7.0 → 14.9.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": "14.
|
|
3
|
+
"version": "14.9.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
"@lvce-editor/ipc": "^13.7.0",
|
|
18
18
|
"@lvce-editor/json-rpc": "^5.4.0",
|
|
19
19
|
"@lvce-editor/verror": "^1.6.0",
|
|
20
|
-
"@pronto-tools-and-more/api": "14.
|
|
21
|
-
"@pronto-tools-and-more/components-renderer": "14.
|
|
22
|
-
"@pronto-tools-and-more/components": "14.
|
|
23
|
-
"@pronto-tools-and-more/custom-js-functions": "14.
|
|
24
|
-
"@pronto-tools-and-more/diff-process": "14.
|
|
25
|
-
"@pronto-tools-and-more/file-watcher": "14.
|
|
26
|
-
"@pronto-tools-and-more/files": "14.
|
|
27
|
-
"@pronto-tools-and-more/network-process": "14.
|
|
28
|
-
"@pronto-tools-and-more/sass-compiler": "14.
|
|
29
|
-
"@pronto-tools-and-more/schema-process": "14.
|
|
30
|
-
"@pronto-tools-and-more/type-checker": "14.
|
|
20
|
+
"@pronto-tools-and-more/api": "14.9.0",
|
|
21
|
+
"@pronto-tools-and-more/components-renderer": "14.9.0",
|
|
22
|
+
"@pronto-tools-and-more/components": "14.9.0",
|
|
23
|
+
"@pronto-tools-and-more/custom-js-functions": "14.9.0",
|
|
24
|
+
"@pronto-tools-and-more/diff-process": "14.9.0",
|
|
25
|
+
"@pronto-tools-and-more/file-watcher": "14.9.0",
|
|
26
|
+
"@pronto-tools-and-more/files": "14.9.0",
|
|
27
|
+
"@pronto-tools-and-more/network-process": "14.9.0",
|
|
28
|
+
"@pronto-tools-and-more/sass-compiler": "14.9.0",
|
|
29
|
+
"@pronto-tools-and-more/schema-process": "14.9.0",
|
|
30
|
+
"@pronto-tools-and-more/type-checker": "14.9.0",
|
|
31
31
|
"execa": "^9.5.2",
|
|
32
32
|
"express": "^4.21.2"
|
|
33
33
|
},
|
package/src/parts/App/App.js
CHANGED
|
@@ -10,6 +10,7 @@ import * as HandleFeaturesJson from "../HandleFeaturesJson/HandleFeaturesJson.js
|
|
|
10
10
|
import * as HandleIndex from "../HandleIndex/HandleIndex.js";
|
|
11
11
|
import * as HandleMainJs from "../HandleMainJs/HandleMainJs.js";
|
|
12
12
|
import * as HandleViews from "../HandleViews/HandleViews.js";
|
|
13
|
+
import * as HandleWidgetsJson from "../HandleWidgetsJson/HandleWidgetsJson.js";
|
|
13
14
|
import * as ProxyPath from "../ProxyPath/ProxyPath.js";
|
|
14
15
|
|
|
15
16
|
export const create = ({
|
|
@@ -114,6 +115,14 @@ export const create = ({
|
|
|
114
115
|
useFrameWorkLatest,
|
|
115
116
|
})
|
|
116
117
|
);
|
|
118
|
+
app.get(
|
|
119
|
+
"/storefront/assets/widgets.json",
|
|
120
|
+
HandleWidgetsJson.handleWidgetsJson({
|
|
121
|
+
storeFrontPath,
|
|
122
|
+
filesPath: FilesPath.filesPath,
|
|
123
|
+
useFrameWorkLatest,
|
|
124
|
+
})
|
|
125
|
+
);
|
|
117
126
|
app.get(
|
|
118
127
|
"/assets/scripts/custom.server.js",
|
|
119
128
|
HandleCustomServer.handleCustomServerJs({
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { existsSync } from "fs";
|
|
2
|
+
import { readFile } from "fs/promises";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
|
|
5
|
+
export const handleWidgetsJson =
|
|
6
|
+
({ storeFrontPath, filesPath, useFrameWorkLatest }) =>
|
|
7
|
+
async (req, res) => {
|
|
8
|
+
res.setHeader("Content-Type", "application/json");
|
|
9
|
+
const frameWorkName = useFrameWorkLatest ? "framework-latest" : "framework";
|
|
10
|
+
const pathsToTry = [
|
|
11
|
+
join(storeFrontPath, "assets", "widgets.json"),
|
|
12
|
+
join(
|
|
13
|
+
filesPath,
|
|
14
|
+
frameWorkName,
|
|
15
|
+
"src",
|
|
16
|
+
"default",
|
|
17
|
+
"storefront",
|
|
18
|
+
"assets",
|
|
19
|
+
"widgets.json"
|
|
20
|
+
),
|
|
21
|
+
];
|
|
22
|
+
for (const pathToTry of pathsToTry) {
|
|
23
|
+
if (existsSync(pathToTry)) {
|
|
24
|
+
const content = await readFile(pathToTry, "utf8");
|
|
25
|
+
const actualContent = content.replaceAll("resource://dynamic", "");
|
|
26
|
+
res.end(actualContent);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
res.end("not-found");
|
|
31
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '14.
|
|
1
|
+
export const version = '14.9.0'
|