@lazycatcloud/lzc-cli 1.2.5 → 1.2.6
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.
|
@@ -21,16 +21,20 @@ export class DebugBridge {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
async install(lpkPath) {
|
|
24
|
+
async install(lpkPath, pkgId) {
|
|
25
25
|
if (!(await this.canPublicKey())) {
|
|
26
26
|
await this.sshCopyId();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const stream = fs.createReadStream(lpkPath);
|
|
30
|
-
const ssh = spawn(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const ssh = spawn(
|
|
31
|
+
this.sshCmd,
|
|
32
|
+
[`install --uid ${this.uid} --pkgId ${pkgId}`],
|
|
33
|
+
{
|
|
34
|
+
shell: true,
|
|
35
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
36
|
+
}
|
|
37
|
+
);
|
|
34
38
|
stream.pipe(ssh.stdin);
|
|
35
39
|
return new Promise((resolve, reject) => {
|
|
36
40
|
ssh.on("close", (code) => {
|
package/lib/app/lpk_installer.js
CHANGED
|
@@ -38,7 +38,7 @@ export class LpkInstaller {
|
|
|
38
38
|
let pkgPath = await builder.exec();
|
|
39
39
|
logger.info("开始部署应用");
|
|
40
40
|
const bridge = new DebugBridge();
|
|
41
|
-
await bridge.install(pkgPath);
|
|
41
|
+
await bridge.install(pkgPath, manifest["package"]);
|
|
42
42
|
const appUrl = `https://${manifest["application"]["subdomain"]}.${shellapi.boxname}.heiyu.space`;
|
|
43
43
|
logger.info(`👉 请在浏览器中访问 ${appUrl}`);
|
|
44
44
|
}
|
|
@@ -98,7 +98,7 @@ export class LpkInstaller {
|
|
|
98
98
|
|
|
99
99
|
const bridge = new DebugBridge();
|
|
100
100
|
logger.info("开始安装应用");
|
|
101
|
-
await bridge.install(pkgPath);
|
|
101
|
+
await bridge.install(pkgPath, manifest["package"]);
|
|
102
102
|
logger.info(`安装成功!`);
|
|
103
103
|
logger.info(
|
|
104
104
|
`👉 请在浏览器中访问 https://${manifest["application"]["subdomain"]}.${shellapi.boxname}.heiyu.space`
|