@lazycatcloud/lzc-cli 2.0.0-pre.1 → 2.0.0-pre.3
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/README.md +24 -0
- package/changelog.md +16 -0
- package/lib/app/index.js +1 -1
- package/lib/app/lpk_build.js +5 -8
- package/lib/app/lpk_build_images.js +387 -213
- package/lib/app/lpk_build_images_local.js +425 -0
- package/lib/app/lpk_build_images_pack_local.js +409 -0
- package/lib/app/lpk_devshell.js +6 -2
- package/lib/app/project_deploy.js +46 -2
- package/lib/debug_bridge.js +139 -29
- package/lib/i18n/locales/en/translation.json +2 -2
- package/lib/utils.js +1 -1
- package/package.json +1 -1
- package/scripts/smoke/template-project.mjs +1 -1
- package/template/_lpk/README.md +1 -0
- package/template/vue/src/App.vue +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,30 @@ lzc-cli appstore publish
|
|
|
56
56
|
|
|
57
57
|
[changelog](./changelog.md)
|
|
58
58
|
|
|
59
|
+
#### images 本地构建
|
|
60
|
+
|
|
61
|
+
`lzc-build.yml:images.<alias>.builder` 支持两种模式:
|
|
62
|
+
|
|
63
|
+
1. `remote`:默认值。在微服上的 developer tools 中构建镜像。
|
|
64
|
+
2. `local`:在开发机本地构建镜像,再上传给 developer tools 生成最终的 `images/` 与 `images.lock`。
|
|
65
|
+
|
|
66
|
+
示例:
|
|
67
|
+
|
|
68
|
+
```yml
|
|
69
|
+
images:
|
|
70
|
+
app-runtime:
|
|
71
|
+
builder: local
|
|
72
|
+
dockerfile: ./images/Dockerfile
|
|
73
|
+
context: ./images
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
说明:
|
|
77
|
+
|
|
78
|
+
1. `builder=local` 的目标平台会自动从当前目标微服获取,例如 `linux/amd64`。
|
|
79
|
+
2. `builder=local` 依赖开发机本地可用的 Docker/buildx 兼容命令。
|
|
80
|
+
3. 基础镜像需要开发机自己能够拉取;如果当前网络环境有限制,建议显式使用可访问的镜像地址。
|
|
81
|
+
4. `upstream-match` 对 `builder=remote` 与 `builder=local` 都生效;`builder=local` 会优先读取本地构建器元数据,必要时再根据 Dockerfile 的最终基底镜像推导上游层。
|
|
82
|
+
|
|
59
83
|
#### box add-by-ssh 远端直连模式
|
|
60
84
|
|
|
61
85
|
当运行环境无法使用 `hclient` 时,可通过 `box add-by-ssh` 配置远端 ssh 目标,由 `lzc-cli` 直连 `lzcos ssh` 并在远端执行 debug bridge 命令。
|
package/changelog.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0-pre.3](https://gitee.com/linakesi/lzc-cli/compare/v2.0.0-pre.2...v2.0.0-pre.3) (2026-03-12)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- refresh the backend template assets and set `mini_os_version` to `v1.5.0`
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- use top-level override semantics for dev build config
|
|
12
|
+
|
|
13
|
+
## [2.0.0-pre.2](https://gitee.com/linakesi/lzc-cli/compare/v2.0.0-pre.1...v2.0.0-pre.2) (2026-03-12)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- publish the current LPK v2 preview through the `lpkv2` dist-tag
|
|
18
|
+
|
|
3
19
|
## [2.0.0-pre.1](https://gitee.com/linakesi/lzc-cli/compare/v1.3.17...v2.0.0-pre.1) (2026-03-11)
|
|
4
20
|
|
|
5
21
|
### Features
|
package/lib/app/index.js
CHANGED
|
@@ -114,7 +114,7 @@ export function lpkProjectCommand(program) {
|
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
throw new Error('
|
|
117
|
+
throw new Error('Missing project directory name. Use "lzc-cli project create <name>" to create a new project, or "lzc-cli project create --in-place" to initialize the current directory.');
|
|
118
118
|
},
|
|
119
119
|
},
|
|
120
120
|
{
|
package/lib/app/lpk_build.js
CHANGED
|
@@ -11,7 +11,6 @@ import yaml from 'js-yaml';
|
|
|
11
11
|
import { buildConfiguredImagesToTempDir } from './lpk_build_images.js';
|
|
12
12
|
import { pipeline } from 'node:stream/promises';
|
|
13
13
|
import { t } from '../i18n/index.js';
|
|
14
|
-
import mergeWith from 'lodash.mergewith';
|
|
15
14
|
|
|
16
15
|
async function archiveFolderTo(appDir, out, format = 'zip') {
|
|
17
16
|
return new Promise(async (resolve, reject) => {
|
|
@@ -298,12 +297,10 @@ function formatBytes(bytes) {
|
|
|
298
297
|
}
|
|
299
298
|
|
|
300
299
|
function mergeBuildOptions(baseOptions, topOptions) {
|
|
301
|
-
return
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
return undefined;
|
|
306
|
-
});
|
|
300
|
+
return {
|
|
301
|
+
...(baseOptions ?? {}),
|
|
302
|
+
...(topOptions ?? {}),
|
|
303
|
+
};
|
|
307
304
|
}
|
|
308
305
|
|
|
309
306
|
function applyPkgIdSuffix(packageId, suffix) {
|
|
@@ -374,7 +371,7 @@ function resolveParentBuildConfigPath(optionsFilePath) {
|
|
|
374
371
|
}
|
|
375
372
|
const parentPath = path.join(path.dirname(optionsFilePath), 'lzc-build.yml');
|
|
376
373
|
if (!isFileExist(parentPath)) {
|
|
377
|
-
|
|
374
|
+
return '';
|
|
378
375
|
}
|
|
379
376
|
return parentPath;
|
|
380
377
|
}
|