@lazycatcloud/lzc-cli 1.2.22 → 1.2.25
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/lib/shellapi.js +7 -6
- package/lib/utils.js +6 -6
- package/package.json +18 -18
- package/template/_lpk/Dockerfile.in +1 -1
- package/template/_lpk/devshell/Dockerfile +1 -1
- package/template/_lpk/lite.manifest.yml.in +2 -2
- package/template/_lpk/manifest.yml.in +1 -1
- package/template/_lpk/vue.lzc-build.yml.in +3 -3
- package/template/golang/lzc-build.yml +3 -3
- package/template/ionic_vue3/lzc-build.yml +3 -3
- package/template/lite/lzc-build.yml +4 -4
- package/template/ionic_vue3/package-lock.json +0 -8100
package/lib/shellapi.js
CHANGED
|
@@ -14,12 +14,13 @@ const bannerfileContent = `˄=ᆽ=ᐟ \\`;
|
|
|
14
14
|
*/
|
|
15
15
|
function getShellAPIConfigDir() {
|
|
16
16
|
const home = os.homedir();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
let suffix = "/.config/hportal-client";
|
|
18
|
+
if (process.platform === "darwin") {
|
|
19
|
+
suffix = "/Library/Application Support/hportal-client";
|
|
20
|
+
} else if (process.platform === "win32") {
|
|
21
|
+
suffix = "\\AppData\\Roaming\\hportal-client";
|
|
22
|
+
}
|
|
23
|
+
const SHELLAPI_CONFIG_DIR = path.join(home, suffix);
|
|
23
24
|
return SHELLAPI_CONFIG_DIR;
|
|
24
25
|
}
|
|
25
26
|
|
package/lib/utils.js
CHANGED
|
@@ -14,7 +14,7 @@ import zlib from "node:zlib";
|
|
|
14
14
|
import process from "node:process";
|
|
15
15
|
import { spawnSync } from "node:child_process";
|
|
16
16
|
import logger from "loglevel";
|
|
17
|
-
import tar from "tar";
|
|
17
|
+
import * as tar from "tar";
|
|
18
18
|
|
|
19
19
|
export const envsubstr = async (templateContents, args) => {
|
|
20
20
|
const parse = await importDefault("envsub/js/envsub-parser.js");
|
|
@@ -61,7 +61,7 @@ export function dumpToYaml(template, target) {
|
|
|
61
61
|
styles: {
|
|
62
62
|
"!!null": "empty", // dump null as ""
|
|
63
63
|
},
|
|
64
|
-
})
|
|
64
|
+
}),
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -89,7 +89,7 @@ export async function envTemplateFile(templateFile, env) {
|
|
|
89
89
|
"!!null": "empty", // dump null as ""
|
|
90
90
|
},
|
|
91
91
|
}),
|
|
92
|
-
{ options }
|
|
92
|
+
{ options },
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -173,7 +173,7 @@ export function isFileExist(path) {
|
|
|
173
173
|
try {
|
|
174
174
|
fs.accessSync(
|
|
175
175
|
path,
|
|
176
|
-
fs.constants.W_OK | fs.constants.R_OK | fs.constants.F_OK
|
|
176
|
+
fs.constants.W_OK | fs.constants.R_OK | fs.constants.F_OK,
|
|
177
177
|
);
|
|
178
178
|
return true;
|
|
179
179
|
} catch {
|
|
@@ -220,7 +220,7 @@ export class Downloader {
|
|
|
220
220
|
received +
|
|
221
221
|
" bytes downloaded out of " +
|
|
222
222
|
total +
|
|
223
|
-
" bytes."
|
|
223
|
+
" bytes.",
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
|
|
@@ -329,7 +329,7 @@ export async function tarContentDir(from, to, cwd = "./") {
|
|
|
329
329
|
gid: 0,
|
|
330
330
|
},
|
|
331
331
|
},
|
|
332
|
-
from
|
|
332
|
+
from,
|
|
333
333
|
)
|
|
334
334
|
.pipe(dest)
|
|
335
335
|
.on("close", () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lazycatcloud/lzc-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.25",
|
|
4
4
|
"description": "lazycat cloud developer kit",
|
|
5
5
|
"files": [
|
|
6
6
|
"template",
|
|
@@ -18,31 +18,31 @@
|
|
|
18
18
|
"license": "ISC",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@balena/dockerignore": "^1.0.2",
|
|
21
|
-
"@grpc/grpc-js": "^1.
|
|
22
|
-
"@grpc/proto-loader": "^0.7.
|
|
23
|
-
"archiver": "^
|
|
24
|
-
"chalk": "^
|
|
25
|
-
"chokidar": "^3.
|
|
21
|
+
"@grpc/grpc-js": "^1.11.1",
|
|
22
|
+
"@grpc/proto-loader": "^0.7.13",
|
|
23
|
+
"archiver": "^7.0.1",
|
|
24
|
+
"chalk": "^5.3.0",
|
|
25
|
+
"chokidar": "^3.6.0",
|
|
26
26
|
"command-exists": "^1.2.9",
|
|
27
|
-
"dockerfile-ast": "^0.
|
|
28
|
-
"envsub": "^4.0
|
|
29
|
-
"fast-glob": "^3.2
|
|
27
|
+
"dockerfile-ast": "^0.6.1",
|
|
28
|
+
"envsub": "^4.1.0",
|
|
29
|
+
"fast-glob": "^3.3.2",
|
|
30
30
|
"form-data": "^4.0.0",
|
|
31
|
-
"ignore": "^5.2
|
|
32
|
-
"inquirer": "^
|
|
33
|
-
"isbinaryfile": "^
|
|
31
|
+
"ignore": "^5.3.2",
|
|
32
|
+
"inquirer": "^10.1.8",
|
|
33
|
+
"isbinaryfile": "^5.0.2",
|
|
34
34
|
"js-yaml": "^4.1.0",
|
|
35
35
|
"lodash.debounce": "^4.0.8",
|
|
36
36
|
"lodash.merge": "^4.6.2",
|
|
37
37
|
"lodash.mergewith": "^4.6.2",
|
|
38
|
-
"loglevel": "^1.
|
|
39
|
-
"node-fetch": "^
|
|
40
|
-
"tar": "^
|
|
41
|
-
"yargs": "^17.
|
|
38
|
+
"loglevel": "^1.9.1",
|
|
39
|
+
"node-fetch": "^3.3.2",
|
|
40
|
+
"tar": "^7.4.3",
|
|
41
|
+
"yargs": "^17.7.2"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/command-exists": "^1.2.
|
|
45
|
-
"prettier": "^
|
|
44
|
+
"@types/command-exists": "^1.2.3",
|
|
45
|
+
"prettier": "^3.3.3"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"registry": "https://registry.npmjs.org",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
lzc-sdk-version: 0.1
|
|
2
2
|
|
|
3
|
-
package: ${package}
|
|
3
|
+
package: ${package} # app的唯一标识符
|
|
4
4
|
version: ${version} # app的版本
|
|
5
5
|
name: ${name} # app名称
|
|
6
6
|
description: ${description} # app描述
|
|
@@ -13,7 +13,7 @@ author: ${author} # app author
|
|
|
13
13
|
application:
|
|
14
14
|
subdomain: ${subdomain} #期望的app域名
|
|
15
15
|
routes:
|
|
16
|
-
- /=https://
|
|
16
|
+
- /=https://lazycat.cloud
|
|
17
17
|
handlers:
|
|
18
18
|
error_page_templates:
|
|
19
19
|
502: /lzcapp/pkg/content/502.html.tpl
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 整个文件中,可以通过 ${var} 的方式,使用 manifest
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest 字段指定的文件定义的值
|
|
2
2
|
|
|
3
3
|
# buildscript
|
|
4
4
|
# - 可以为构建脚本的路径地址
|
|
@@ -30,7 +30,7 @@ icon: ./lazycat.png
|
|
|
30
30
|
# devshell:
|
|
31
31
|
# routes:
|
|
32
32
|
# - /=http://127.0.0.1:3000
|
|
33
|
-
# image: registry.lazycat.cloud/lzc-cli/devshell:
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
34
34
|
|
|
35
35
|
# devshell 指定构建Dockerfile
|
|
36
36
|
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
@@ -42,7 +42,7 @@ icon: ./lazycat.png
|
|
|
42
42
|
# build: .
|
|
43
43
|
|
|
44
44
|
# dvshell 指定开发依赖的情况
|
|
45
|
-
# 这种情况下,选用
|
|
45
|
+
# 这种情况下,选用 alpine:latest 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
46
|
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
47
|
devshell:
|
|
48
48
|
routes:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 整个文件中,可以通过 ${var} 的方式,使用 manifest
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest 字段指定的文件定义的值
|
|
2
2
|
|
|
3
3
|
# buildscript
|
|
4
4
|
# - 可以为构建脚本的路径地址
|
|
@@ -30,7 +30,7 @@ icon: ./lazycat.png
|
|
|
30
30
|
# devshell:
|
|
31
31
|
# routes:
|
|
32
32
|
# - /=http://127.0.0.1:3000
|
|
33
|
-
# image: registry.lazycat.cloud/lzc-cli/devshell:
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
34
34
|
|
|
35
35
|
# devshell 指定构建Dockerfile
|
|
36
36
|
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
@@ -42,7 +42,7 @@ icon: ./lazycat.png
|
|
|
42
42
|
# build: .
|
|
43
43
|
|
|
44
44
|
# dvshell 指定开发依赖的情况
|
|
45
|
-
# 这种情况下,选用
|
|
45
|
+
# 这种情况下,选用 alpine:latest 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
46
|
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
47
|
devshell:
|
|
48
48
|
routes:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 整个文件中,可以通过 ${var} 的方式,使用 manifest
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest 字段指定的文件定义的值
|
|
2
2
|
|
|
3
3
|
# buildscript
|
|
4
4
|
# - 可以为构建脚本的路径地址
|
|
@@ -30,7 +30,7 @@ icon: ./lazycat.png
|
|
|
30
30
|
# devshell:
|
|
31
31
|
# routes:
|
|
32
32
|
# - /=http://127.0.0.1:3000
|
|
33
|
-
# image: registry.lazycat.cloud/lzc-cli/devshell:
|
|
33
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
34
34
|
|
|
35
35
|
# devshell 指定构建Dockerfile
|
|
36
36
|
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
@@ -42,7 +42,7 @@ icon: ./lazycat.png
|
|
|
42
42
|
# build: .
|
|
43
43
|
|
|
44
44
|
# dvshell 指定开发依赖的情况
|
|
45
|
-
# 这种情况下,选用
|
|
45
|
+
# 这种情况下,选用 alpine:latest 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
46
|
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
47
|
devshell:
|
|
48
48
|
routes:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 整个文件中,可以通过 ${var} 的方式,使用 manifest
|
|
1
|
+
# 整个文件中,可以通过 ${var} 的方式,使用 manifest 字段指定的文件定义的值
|
|
2
2
|
|
|
3
3
|
# buildscript
|
|
4
4
|
# - 可以为构建脚本的路径地址
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# buildscript: ./build.sh
|
|
7
7
|
|
|
8
8
|
# manifest: 指定 lpk 包的 manifest.yml 文件路径
|
|
9
|
-
|
|
9
|
+
manifest: ./lzc-manifest.yml
|
|
10
10
|
|
|
11
11
|
# contentdir: 指定打包的内容,将会打包到 lpk 中
|
|
12
12
|
contentdir: ./error_pages
|
|
@@ -29,7 +29,7 @@ icon: ./lazycat.png
|
|
|
29
29
|
# devshell:
|
|
30
30
|
# routes:
|
|
31
31
|
# - /=http://127.0.0.1:3000
|
|
32
|
-
# image: registry.lazycat.cloud/lzc-cli/devshell:
|
|
32
|
+
# image: registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
33
33
|
|
|
34
34
|
# devshell 指定构建Dockerfile
|
|
35
35
|
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
@@ -41,7 +41,7 @@ icon: ./lazycat.png
|
|
|
41
41
|
# build: .
|
|
42
42
|
|
|
43
43
|
# dvshell 指定开发依赖的情况
|
|
44
|
-
# 这种情况下,选用
|
|
44
|
+
# 这种情况下,选用 alpine:latest 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
45
45
|
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
46
46
|
# devshell:
|
|
47
47
|
# routes:
|