@lazycatcloud/lzc-cli 2.0.0-pre.6 → 2.0.0-pre.7

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/changelog.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.0-pre.7](https://gitee.com/linakesi/lzc-cli/compare/v2.0.0-pre.6...v2.0.0-pre.7) (2026-03-26)
4
+
5
+ ### Features
6
+
7
+ - dump more failed message when installing lpk
8
+
3
9
  ## [2.0.0-pre.6](https://gitee.com/linakesi/lzc-cli/compare/v2.0.0-pre.5...v2.0.0-pre.6) (2026-03-25)
4
10
 
5
11
  ### Features
@@ -64,13 +64,18 @@ function extractInstallErrorDetail(rawOutput = '') {
64
64
  return detailMatch[1].replace(/\\"/g, '"').replace(/\\n/g, '\n').trim();
65
65
  }
66
66
 
67
- const descMatch = text.match(/rpc error:\s*code\s*=\s*\S+\s*desc\s*=\s*([^\n\r]+)/i);
67
+ const descMatch = text.match(/rpc error:\s*code\s*=\s*\S+\s*desc\s*=\s*([\s\S]*)/i);
68
68
  if (descMatch && descMatch[1]) {
69
- return descMatch[1].trim();
69
+ const detail = descMatch[1]
70
+ .split(/\nUsage:\s*\n|\nUsage:\s*/i)[0]
71
+ .trim();
72
+ if (detail) {
73
+ return detail;
74
+ }
70
75
  }
71
76
 
72
77
  const lines = text
73
- .split(/\r?\n/)
78
+ .split(/[\r\n]+/)
74
79
  .map((line) => line.trim())
75
80
  .filter((line) => {
76
81
  if (!line) {
@@ -82,7 +87,7 @@ function extractInstallErrorDetail(rawOutput = '') {
82
87
  return true;
83
88
  });
84
89
  if (lines.length > 0) {
85
- return lines[0];
90
+ return lines[lines.length - 1];
86
91
  }
87
92
 
88
93
  return t('lzc_cli.lib.debug_bridge.install_fail', 'install 失败');
@@ -1279,3 +1284,7 @@ export class DebugBridge {
1279
1284
  process.exit(1);
1280
1285
  }
1281
1286
  }
1287
+
1288
+ export const __test__ = {
1289
+ extractInstallErrorDetail,
1290
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-cli",
3
- "version": "2.0.0-pre.6",
3
+ "version": "2.0.0-pre.7",
4
4
  "description": "lazycat cloud developer kit",
5
5
  "scripts": {
6
6
  "release": "release-it patch",