@lazycatcloud/lzc-cli 1.2.48 → 1.2.50
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 +8 -0
- package/lib/appstore/index.js +23 -1
- package/package.json +1 -1
- package/template/_lpk/init_debug_bridge.sh +1 -1
package/changelog.md
CHANGED
package/lib/appstore/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Publish } from "./publish.js"
|
|
2
|
+
import logger from "loglevel"
|
|
2
3
|
import { PrePublish } from "./prePublish.js"
|
|
3
|
-
import { reLogin } from "./login.js"
|
|
4
|
+
import { reLogin, request } from "./login.js"
|
|
4
5
|
import fs from "node:fs"
|
|
5
6
|
|
|
6
7
|
export function appstoreCommand(program) {
|
|
@@ -62,6 +63,27 @@ export function appstoreCommand(program) {
|
|
|
62
63
|
}
|
|
63
64
|
await p.publish(pkgPath, changelog)
|
|
64
65
|
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
command: "copy-image <imageName>",
|
|
69
|
+
desc: "复制镜像至懒猫微服官方源",
|
|
70
|
+
handler: async ({ imageName }) => {
|
|
71
|
+
const baseUrl = "https://developer.lazycat.cloud/api/v2/developer"
|
|
72
|
+
logger.info(
|
|
73
|
+
`Waiting ... ( copy ${imageName} to lazycat offical registry)`
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
try {
|
|
77
|
+
const resp = await request(`${baseUrl}/push-image?image=${imageName}`)
|
|
78
|
+
if (resp.ok) {
|
|
79
|
+
logger.info("lazycat-registry:", await resp.text())
|
|
80
|
+
} else {
|
|
81
|
+
logger.error("error: ", await resp.text())
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.error(err)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
65
87
|
}
|
|
66
88
|
]
|
|
67
89
|
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ if ${LZCBUSYBOX} netstat -tln | grep ':22222' >/dev/null; then
|
|
|
33
33
|
else
|
|
34
34
|
echo "启动 rsync daemon."
|
|
35
35
|
rsync --daemon --no-detach --config=/lzcapp/pkg/content/devshell/rsyncd.conf &
|
|
36
|
-
while ! nc -z localhost 873; do
|
|
36
|
+
while ! ${LZCBUSYBOX} nc -z localhost 873; do
|
|
37
37
|
sleep 1
|
|
38
38
|
done
|
|
39
39
|
echo "rsync daemon 已成功监听 873 端口"
|