@lazycatcloud/lzc-cli 1.2.36 → 1.2.37

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.
@@ -16,8 +16,6 @@ import { LpkManifest } from "./lpk_create.js"
16
16
  import archiver from "archiver"
17
17
  import yaml from "js-yaml"
18
18
 
19
- const isMacos = process.platform == "darwin"
20
-
21
19
  async function archiveFolderTo(appDir, out, format = "zip") {
22
20
  return new Promise(async (resolve, reject) => {
23
21
  if (!fs.existsSync(appDir)) {
@@ -81,7 +79,7 @@ function localIp() {
81
79
  const regex = /inet6 (fc03:1136:[0-9a-fA-F:]+)[?:\/ ]/
82
80
 
83
81
  let output = ""
84
- if (isMacos) {
82
+ if (process.platform == "darwin") {
85
83
  const result = spawnSync("sh", ["-c", "ifconfig"], {
86
84
  encoding: "utf-8"
87
85
  })
@@ -90,6 +88,9 @@ function localIp() {
90
88
  return ""
91
89
  }
92
90
  output = result.stdout
91
+ } else if (process.platform == "win32") {
92
+ logger.debug(`当前 Windows 不支持使用 LocalIP 反代`)
93
+ return ""
93
94
  } else {
94
95
  const result = spawnSync("ip", ["addr", "show", "heiyu-0"], {
95
96
  encoding: "utf-8"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazycatcloud/lzc-cli",
3
- "version": "1.2.36",
3
+ "version": "1.2.37",
4
4
  "description": "lazycat cloud developer kit",
5
5
  "files": [
6
6
  "template",