@pronto-tools-and-more/pronto 12.29.0 → 12.30.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": "12.29.0",
3
+ "version": "12.30.0",
4
4
  "description": "",
5
5
  "main": "src/main.js",
6
6
  "type": "module",
@@ -17,16 +17,16 @@
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/file-watcher": "12.29.0",
21
- "@pronto-tools-and-more/files": "12.29.0",
22
- "@pronto-tools-and-more/network-process": "12.29.0",
23
- "@pronto-tools-and-more/sass-compiler": "12.29.0",
24
- "@pronto-tools-and-more/components-renderer": "12.29.0",
25
- "@pronto-tools-and-more/components": "12.29.0",
26
- "@pronto-tools-and-more/schema-process": "12.29.0",
27
- "@pronto-tools-and-more/diff-process": "12.29.0",
28
- "@pronto-tools-and-more/type-checker": "12.29.0",
29
- "@pronto-tools-and-more/custom-js-functions": "12.29.0",
20
+ "@pronto-tools-and-more/file-watcher": "12.30.0",
21
+ "@pronto-tools-and-more/files": "12.30.0",
22
+ "@pronto-tools-and-more/network-process": "12.30.0",
23
+ "@pronto-tools-and-more/sass-compiler": "12.30.0",
24
+ "@pronto-tools-and-more/components-renderer": "12.30.0",
25
+ "@pronto-tools-and-more/components": "12.30.0",
26
+ "@pronto-tools-and-more/schema-process": "12.30.0",
27
+ "@pronto-tools-and-more/diff-process": "12.30.0",
28
+ "@pronto-tools-and-more/type-checker": "12.30.0",
29
+ "@pronto-tools-and-more/custom-js-functions": "12.30.0",
30
30
  "execa": "^9.5.2",
31
31
  "express": "^4.21.2"
32
32
  },
@@ -1,6 +1,5 @@
1
1
  import * as ReplaceNeedle from "../ReplaceNeedle/ReplaceNeedle.js";
2
-
3
- const RE_THIS = /(\w+)(\s*)=(\s*)(this)/;
2
+ import * as GetVarName from "../GetVarName/GetVarName.js";
4
3
 
5
4
  // monkeypatch common.js to support normal html elements
6
5
  export const getNewCommonJsContent = ({ content, normalHtmlSnippet }) => {
@@ -84,13 +83,9 @@ export const getNewCommonJsContent = ({ content, normalHtmlSnippet }) => {
84
83
  if (this2Index === -1) {
85
84
  throw new Error("no needle found (5)");
86
85
  }
87
- const match = newContent.slice(configIndex).match(RE_THIS);
88
- if (!match) {
89
- throw new Error("match not found (6)");
90
- }
91
- const varName = match[0];
86
+ const varName = GetVarName.getVarName(newContent, configIndex);
92
87
  const occurrence2 = "this";
93
- const replacement2 = `this;globalThis.HACK__NORMAL_HTML_ELEMENTS_CHECK(this);`;
88
+ const replacement2 = `this;globalThis.HACK__NORMAL_HTML_ELEMENTS_CHECK_2(this);`;
94
89
 
95
90
  newContent = ReplaceNeedle.replaceNeedle(
96
91
  newContent,
@@ -104,7 +99,7 @@ export const getNewCommonJsContent = ({ content, normalHtmlSnippet }) => {
104
99
  throw new Error("no needle found (7)");
105
100
  }
106
101
  const occurrence3 = "changeDetectorRef.markForCheck()";
107
- const replacement3 = `changeDetectorRef.markForCheck();globalThis.HACK__NORMAL_HTML_ELEMENTS_RENDER(${varName});`;
102
+ const replacement3 = `changeDetectorRef.markForCheck();globalThis.HACK__NORMAL_HTML_ELEMENTS_RENDER_2(${varName});`;
108
103
  newContent = ReplaceNeedle.replaceNeedle(
109
104
  newContent,
110
105
  checkIndex,
@@ -0,0 +1,10 @@
1
+ const RE_THIS = /(\S+)(\s*)=(\s*)(this)/;
2
+
3
+ export const getVarName = (content, startIndex) => {
4
+ const match = content.slice(startIndex).match(RE_THIS);
5
+ if (!match) {
6
+ throw new Error("match not found (6)");
7
+ }
8
+ const varName = match[1];
9
+ return varName;
10
+ };
@@ -32,13 +32,12 @@ export const handleViewsReactComponents = async (
32
32
  tsconfigPath,
33
33
  isBuild
34
34
  );
35
- const result = await renderer.invoke(
36
- "RenderViews.renderViews",
35
+ const result = await renderer.invoke("RenderViews.renderViews", {
37
36
  componentsPath,
38
37
  tsconfigPath,
39
38
  pathPrefix,
40
- isBuild
41
- );
39
+ isBuild,
40
+ });
42
41
  renderer.dispose();
43
42
 
44
43
  const splitResult = await HandleViewsSplit.handleViewsSplit(storeFrontPath);
@@ -1 +1 @@
1
- export const version = '12.29.0'
1
+ export const version = '12.30.0'