@pronto-tools-and-more/pronto 13.3.0 → 13.5.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": "13.
|
|
3
|
+
"version": "13.5.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": "13.
|
|
21
|
-
"@pronto-tools-and-more/components-renderer": "13.
|
|
22
|
-
"@pronto-tools-and-more/components": "13.
|
|
23
|
-
"@pronto-tools-and-more/custom-js-functions": "13.
|
|
24
|
-
"@pronto-tools-and-more/diff-process": "13.
|
|
25
|
-
"@pronto-tools-and-more/file-watcher": "13.
|
|
26
|
-
"@pronto-tools-and-more/files": "13.
|
|
27
|
-
"@pronto-tools-and-more/network-process": "13.
|
|
28
|
-
"@pronto-tools-and-more/sass-compiler": "13.
|
|
29
|
-
"@pronto-tools-and-more/schema-process": "13.
|
|
30
|
-
"@pronto-tools-and-more/type-checker": "13.
|
|
20
|
+
"@pronto-tools-and-more/api": "13.5.0",
|
|
21
|
+
"@pronto-tools-and-more/components-renderer": "13.5.0",
|
|
22
|
+
"@pronto-tools-and-more/components": "13.5.0",
|
|
23
|
+
"@pronto-tools-and-more/custom-js-functions": "13.5.0",
|
|
24
|
+
"@pronto-tools-and-more/diff-process": "13.5.0",
|
|
25
|
+
"@pronto-tools-and-more/file-watcher": "13.5.0",
|
|
26
|
+
"@pronto-tools-and-more/files": "13.5.0",
|
|
27
|
+
"@pronto-tools-and-more/network-process": "13.5.0",
|
|
28
|
+
"@pronto-tools-and-more/sass-compiler": "13.5.0",
|
|
29
|
+
"@pronto-tools-and-more/schema-process": "13.5.0",
|
|
30
|
+
"@pronto-tools-and-more/type-checker": "13.5.0",
|
|
31
31
|
"execa": "^9.5.2",
|
|
32
32
|
"express": "^4.21.2"
|
|
33
33
|
},
|
|
@@ -52,9 +52,8 @@ const getNewMainJsContentInternal = ({ content, pdfSnippet }) => {
|
|
|
52
52
|
return newerContent;
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
let internal = getNewMainJsContentInternal({ content, pdfSnippet });
|
|
55
|
+
const fixStorefrontUrl1 = (internal) => {
|
|
56
|
+
// disabled due to broken
|
|
58
57
|
const needleIndex = internal.indexOf("assets/experience.config.json");
|
|
59
58
|
if (needleIndex === -1) {
|
|
60
59
|
console.log("RET 0");
|
|
@@ -80,10 +79,40 @@ export const getNewMainJsContent = ({ content, pdfSnippet }) => {
|
|
|
80
79
|
return internal;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
const snippet = `.replace("resource://dynamic/storefront", "")
|
|
82
|
+
const snippet = `.replace("resource://dynamic/storefront", "")`;
|
|
84
83
|
const internal2 =
|
|
85
84
|
internal.slice(0, closeIndex + 1) +
|
|
86
85
|
snippet +
|
|
87
86
|
internal.slice(closeIndex + 1);
|
|
88
87
|
return internal2;
|
|
89
88
|
};
|
|
89
|
+
|
|
90
|
+
const RE_FIX = /fixResourceUrl\((\w+)\)\s*\{/;
|
|
91
|
+
|
|
92
|
+
const fixStorefrontUrl2 = (internal) => {
|
|
93
|
+
const fixUrlMatch = internal.match(RE_FIX);
|
|
94
|
+
if (!fixUrlMatch) {
|
|
95
|
+
return internal;
|
|
96
|
+
}
|
|
97
|
+
const index = fixUrlMatch.index;
|
|
98
|
+
const raw = fixUrlMatch[0];
|
|
99
|
+
const varName = fixUrlMatch[1];
|
|
100
|
+
const pre = internal.slice(0, index);
|
|
101
|
+
const middle1 = raw;
|
|
102
|
+
const middle2 = `if(Math){return ${varName}.replace("resource://dynamic/storefront", "")}`;
|
|
103
|
+
const post = internal.slice(index + raw.length);
|
|
104
|
+
const all = pre + middle1 + middle2 + post;
|
|
105
|
+
return all;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// monkeypatch main.js to support pdf viewer
|
|
109
|
+
export const getNewMainJsContent = ({ content, pdfSnippet }) => {
|
|
110
|
+
let internal = getNewMainJsContentInternal({ content, pdfSnippet });
|
|
111
|
+
if (Math) {
|
|
112
|
+
// disabled due to broken
|
|
113
|
+
internal = content;
|
|
114
|
+
}
|
|
115
|
+
internal = fixStorefrontUrl1(internal);
|
|
116
|
+
internal = fixStorefrontUrl2(internal);
|
|
117
|
+
return internal;
|
|
118
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '13.
|
|
1
|
+
export const version = '13.5.0'
|