@pronto-tools-and-more/pronto 6.4.0 → 6.6.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": "6.
|
|
3
|
+
"version": "6.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@lvce-editor/assert": "^1.3.0",
|
|
17
|
-
"@lvce-editor/ipc": "^
|
|
18
|
-
"@lvce-editor/json-rpc": "^
|
|
17
|
+
"@lvce-editor/ipc": "^11.0.1",
|
|
18
|
+
"@lvce-editor/json-rpc": "^4.0.0",
|
|
19
19
|
"@lvce-editor/verror": "^1.4.0",
|
|
20
|
-
"@pronto-tools-and-more/file-watcher": "6.
|
|
21
|
-
"@pronto-tools-and-more/files": "6.
|
|
22
|
-
"@pronto-tools-and-more/network-process": "6.
|
|
23
|
-
"@pronto-tools-and-more/sass-compiler": "6.
|
|
24
|
-
"@pronto-tools-and-more/components-renderer": "6.
|
|
25
|
-
"@pronto-tools-and-more/components": "6.
|
|
26
|
-
"@pronto-tools-and-more/schema-process": "6.
|
|
20
|
+
"@pronto-tools-and-more/file-watcher": "6.6.0",
|
|
21
|
+
"@pronto-tools-and-more/files": "6.6.0",
|
|
22
|
+
"@pronto-tools-and-more/network-process": "6.6.0",
|
|
23
|
+
"@pronto-tools-and-more/sass-compiler": "6.6.0",
|
|
24
|
+
"@pronto-tools-and-more/components-renderer": "6.6.0",
|
|
25
|
+
"@pronto-tools-and-more/components": "6.6.0",
|
|
26
|
+
"@pronto-tools-and-more/schema-process": "6.6.0",
|
|
27
27
|
"execa": "^9.3.1",
|
|
28
28
|
"express": "^4.21.0"
|
|
29
29
|
},
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { VError } from "@lvce-editor/verror";
|
|
2
|
+
import { join } from "path";
|
|
3
|
+
import * as Cwd from "../Cwd/Cwd.js";
|
|
4
|
+
import * as Exec from "../Exec/Exec.js";
|
|
5
|
+
|
|
6
|
+
export const format = async () => {
|
|
7
|
+
try {
|
|
8
|
+
const viewsJsonFolder = join(
|
|
9
|
+
Cwd.cwd,
|
|
10
|
+
"src",
|
|
11
|
+
"default",
|
|
12
|
+
"storefront",
|
|
13
|
+
"assets",
|
|
14
|
+
"views"
|
|
15
|
+
);
|
|
16
|
+
await Exec.exec("npx", ["prettier", "--write", "."], {
|
|
17
|
+
cwd: viewsJsonFolder,
|
|
18
|
+
});
|
|
19
|
+
} catch (error) {
|
|
20
|
+
throw new VError(error, `Failed to format code`);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
@@ -5,9 +5,11 @@ import * as Config from "../Config/Config.js";
|
|
|
5
5
|
import * as Cwd from "../Cwd/Cwd.js";
|
|
6
6
|
import * as DownloadZipFile from "../DownloadZipFile/DownloadZipFile.js";
|
|
7
7
|
import * as ExtractZip from "../ExtractZip/ExtractZip.js";
|
|
8
|
+
import * as Format from "../Format/Format.js";
|
|
8
9
|
import * as GetSessionId from "../GetSessionId/GetSessionId.js";
|
|
9
10
|
import * as ListContentZipFiles from "../ListContentZipFiles/ListContentZipFiles.js";
|
|
10
11
|
import * as NetworkProcess from "../NetworkProcess/NetworkProcess.js";
|
|
12
|
+
import * as Split from "../Split/Split.js";
|
|
11
13
|
|
|
12
14
|
export const pullCode = async () => {
|
|
13
15
|
try {
|
|
@@ -18,6 +20,7 @@ export const pullCode = async () => {
|
|
|
18
20
|
appId,
|
|
19
21
|
downloadBaseUrl,
|
|
20
22
|
listResourcesUrl,
|
|
23
|
+
splitViews,
|
|
21
24
|
} = Config;
|
|
22
25
|
const outFile = join(Cwd.cwd, ".tmp", "update.zip");
|
|
23
26
|
const outDir = join(Cwd.cwd, ".tmp", "update");
|
|
@@ -46,6 +49,19 @@ export const pullCode = async () => {
|
|
|
46
49
|
await rm(oldSrc, { recursive: true, force: true });
|
|
47
50
|
await rename(src, oldSrc);
|
|
48
51
|
await rename(outDir, src);
|
|
52
|
+
if (splitViews) {
|
|
53
|
+
const viewsFolderPath = join(
|
|
54
|
+
Cwd.cwd,
|
|
55
|
+
"src",
|
|
56
|
+
"default",
|
|
57
|
+
"storefront",
|
|
58
|
+
"assets",
|
|
59
|
+
"views"
|
|
60
|
+
);
|
|
61
|
+
await rm(viewsFolderPath, { recursive: true, force: true });
|
|
62
|
+
await Split.split();
|
|
63
|
+
await Format.format();
|
|
64
|
+
}
|
|
49
65
|
} catch (error) {
|
|
50
66
|
throw new VError(error, `Failed to pull code`);
|
|
51
67
|
} finally {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as Config from "../Config/Config.js";
|
|
2
|
-
import * as PushCodeTo from "../PushCodeTo/PushCodeTo.js";
|
|
3
2
|
import * as GetTag from "../GetTag/GetTag.js";
|
|
3
|
+
import * as PushCodeTo from "../PushCodeTo/PushCodeTo.js";
|
|
4
4
|
|
|
5
5
|
export const pushCode = async () => {
|
|
6
|
-
const { preview } = Config;
|
|
7
|
-
await PushCodeTo.pushCodeTo({ preview });
|
|
8
6
|
const tag = await GetTag.getTag();
|
|
9
|
-
console.log("tag is", tag);
|
|
10
|
-
console.log("config is", Config.pushToReleaseOnGitTag);
|
|
11
7
|
if (tag && Config.pushToReleaseOnGitTag) {
|
|
12
|
-
|
|
8
|
+
if (Config.pushToReleaseOnGitTag) {
|
|
9
|
+
await PushCodeTo.pushCodeTo({ preview: false });
|
|
10
|
+
}
|
|
11
|
+
} else {
|
|
12
|
+
await PushCodeTo.pushCodeTo({ preview: true });
|
|
13
13
|
}
|
|
14
14
|
};
|