@lazycatcloud/lzc-cli 1.2.57 → 1.2.58

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,8 @@
1
+ # 1.2.58
2
+
3
+ 1. 使用 127.0.0.1 替代 localhost 避免解析错误
4
+ 2. 修复最新版本检测
5
+
1
6
  # 1.2.57
2
7
 
3
8
  1. 支持独立添加公钥到开发者工具中去 `lzc-cli box add-public-key`
@@ -231,7 +231,7 @@ export class DebugBridge {
231
231
  code == 0
232
232
  ? resolve(
233
233
  compareVersions("0.1.12", backendVersion) >= 0
234
- ? `localhost:5000/${tag}`
234
+ ? `127.0.0.1:5000/${tag}`
235
235
  : `dev.${this.boxname}.heiyu.space/${tag}`
236
236
  )
237
237
  : reject(`在盒子中构建 image 失败`)
package/lib/utils.js CHANGED
@@ -56,7 +56,7 @@ export async function getLatestVersion(controller, pkgName = pkgInfo.name) {
56
56
  })
57
57
  const content = await data.json()
58
58
  const latestVersion = content["tags"]["latest"]
59
- if (latestVersion != pkgInfo.version) {
59
+ if (semver.lt(pkgInfo.version, latestVersion)) {
60
60
  logger.warn(
61
61
  `检测到 ${pkgName} 最新版本为 ${latestVersion},使用 'npm i -g ${pkgName}@${latestVersion}' 升级到最新版本!`
62
62
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-cli",
3
- "version": "1.2.57",
3
+ "version": "1.2.58",
4
4
  "description": "lazycat cloud developer kit",
5
5
  "scripts": {
6
6
  "prepublishOnly": "node check-changelog.js"