@lazycatcloud/lzc-cli 1.3.4 → 1.3.5

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,3 +1,7 @@
1
+ # 1.3.5
2
+
3
+ 1. 支持自定义的公钥
4
+
1
5
  # 1.3.4
2
6
 
3
7
  1. 添加算力舱和浏览器插件打包
package/lib/utils.js CHANGED
@@ -579,22 +579,12 @@ export function findSshPublicKey() {
579
579
  throw error
580
580
  }
581
581
 
582
- // 定义公钥优先级列表
583
- const priorityKeys = [
584
- "id_ed25519.pub",
585
- "id_rsa.pub",
586
- "id_ecdsa.pub",
587
- "id_dsa.pub"
588
- ]
589
-
590
582
  let avaiableKeys = []
591
583
  try {
592
584
  // 获取 .ssh 目录下所有文件
593
585
  const files = fs.readdirSync(sshDir)
594
-
595
- // 首先检查优先级列表中的公钥
596
- for (const keyName of priorityKeys) {
597
- if (files.includes(keyName)) {
586
+ files.forEach((keyName) => {
587
+ if (keyName.endsWith(".pub")) {
598
588
  const keyPath = path.join(sshDir, keyName)
599
589
  // 验证文件是否可读
600
590
  try {
@@ -605,10 +595,9 @@ export function findSshPublicKey() {
605
595
  })
606
596
  } catch (error) {
607
597
  console.warn(`Found ${keyName} but cannot read it:`, error.message)
608
- continue
609
598
  }
610
599
  }
611
- }
600
+ })
612
601
 
613
602
  if (avaiableKeys.length == 0) {
614
603
  throw new Error(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-cli",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "lazycat cloud developer kit",
5
5
  "scripts": {
6
6
  "prepublishOnly": "node check-changelog.js"
@@ -1,5 +1,3 @@
1
- lzc-sdk-version: 0.1
2
-
3
1
  name: ${name} # app名称
4
2
  package: ${package} # app的唯一标识符
5
3
  version: 0.0.1 # app的版本
@@ -1,4 +1,3 @@
1
- lzc-sdk-version: 0.1
2
1
  name: helloworld
3
2
  package: cloud.lazycat.app.helloworld
4
3
  version: 0.0.1