@pronto-tools-and-more/pronto 9.18.0 → 9.19.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pronto-tools-and-more/pronto",
|
3
|
-
"version": "9.
|
3
|
+
"version": "9.19.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "src/main.js",
|
6
6
|
"type": "module",
|
@@ -17,15 +17,15 @@
|
|
17
17
|
"@lvce-editor/ipc": "^11.1.0",
|
18
18
|
"@lvce-editor/json-rpc": "^5.0.0",
|
19
19
|
"@lvce-editor/verror": "^1.5.0",
|
20
|
-
"@pronto-tools-and-more/file-watcher": "9.
|
21
|
-
"@pronto-tools-and-more/files": "9.
|
22
|
-
"@pronto-tools-and-more/network-process": "9.
|
23
|
-
"@pronto-tools-and-more/sass-compiler": "9.
|
24
|
-
"@pronto-tools-and-more/components-renderer": "9.
|
25
|
-
"@pronto-tools-and-more/components": "9.
|
26
|
-
"@pronto-tools-and-more/schema-process": "9.
|
27
|
-
"@pronto-tools-and-more/diff-process": "9.
|
28
|
-
"@pronto-tools-and-more/type-checker": "9.
|
20
|
+
"@pronto-tools-and-more/file-watcher": "9.19.0",
|
21
|
+
"@pronto-tools-and-more/files": "9.19.0",
|
22
|
+
"@pronto-tools-and-more/network-process": "9.19.0",
|
23
|
+
"@pronto-tools-and-more/sass-compiler": "9.19.0",
|
24
|
+
"@pronto-tools-and-more/components-renderer": "9.19.0",
|
25
|
+
"@pronto-tools-and-more/components": "9.19.0",
|
26
|
+
"@pronto-tools-and-more/schema-process": "9.19.0",
|
27
|
+
"@pronto-tools-and-more/diff-process": "9.19.0",
|
28
|
+
"@pronto-tools-and-more/type-checker": "9.19.0",
|
29
29
|
"execa": "^9.5.1",
|
30
30
|
"express": "^4.21.1"
|
31
31
|
},
|
package/src/parts/App/App.js
CHANGED
@@ -2,6 +2,7 @@ import express from "express";
|
|
2
2
|
import { join } from "node:path";
|
3
3
|
import * as FilesPath from "../FilesPath/FilesPath.js";
|
4
4
|
import * as HandleCss from "../HandleCss/HandleCss.js";
|
5
|
+
import * as HandleFeaturesJson from "../HandleFeaturesJson/HandleFeaturesJson.js";
|
5
6
|
import * as HandleIndex from "../HandleIndex/HandleIndex.js";
|
6
7
|
import * as HandleMainJs from "../HandleMainJs/HandleMainJs.js";
|
7
8
|
import * as HandleViews from "../HandleViews/HandleViews.js";
|
@@ -61,6 +62,13 @@ export const create = ({
|
|
61
62
|
resourceDynamicUrlsInViewsJson,
|
62
63
|
})
|
63
64
|
);
|
65
|
+
app.get(
|
66
|
+
"/assets/features.json",
|
67
|
+
HandleFeaturesJson.handleFeaturesJson({
|
68
|
+
storeFrontPath,
|
69
|
+
filesPath: FilesPath.filesPath,
|
70
|
+
})
|
71
|
+
);
|
64
72
|
app.use("*", HandleCss.handleCss(storeFrontPath));
|
65
73
|
app.use(express.static(FilesPath.filesPath));
|
66
74
|
if (mode === "slim") {
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { existsSync } from "fs";
|
2
|
+
import { readFile } from "fs/promises";
|
3
|
+
import { join } from "path";
|
4
|
+
|
5
|
+
export const handleFeaturesJson =
|
6
|
+
({ storeFrontPath, filesPath }) =>
|
7
|
+
async (req, res) => {
|
8
|
+
res.setHeader("Content-Type", "application/json");
|
9
|
+
const pathsToTry = [
|
10
|
+
join(storeFrontPath, "assets", "features.json"),
|
11
|
+
join(
|
12
|
+
filesPath,
|
13
|
+
"framework",
|
14
|
+
"src",
|
15
|
+
"default",
|
16
|
+
"storefront",
|
17
|
+
"assets",
|
18
|
+
"features.json"
|
19
|
+
),
|
20
|
+
];
|
21
|
+
for (const pathToTry of pathsToTry) {
|
22
|
+
if (existsSync(pathToTry)) {
|
23
|
+
const content = await readFile(pathToTry);
|
24
|
+
res.end(content);
|
25
|
+
return;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
res.end("not-found");
|
29
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export const version = '9.
|
1
|
+
export const version = '9.19.0'
|