@infinity-cli/ipublish 1.2.2 → 1.2.3
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/dist/command/upload.js +8 -6
- package/package.json +2 -2
package/dist/command/upload.js
CHANGED
|
@@ -13,13 +13,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.uploadRemoteAction = exports.uploadRemoteWithConfig = void 0;
|
|
16
|
-
const
|
|
16
|
+
const shared_1 = require("@infinity-cli/shared");
|
|
17
17
|
const node_ssh_1 = require("node-ssh");
|
|
18
|
+
const ora_1 = __importDefault(require("ora"));
|
|
18
19
|
const path_1 = __importDefault(require("path"));
|
|
19
|
-
const util_1 = require("../util");
|
|
20
|
-
const shared_1 = require("@infinity-cli/shared");
|
|
21
20
|
const rimraf_1 = __importDefault(require("rimraf"));
|
|
22
|
-
const
|
|
21
|
+
const util_1 = require("../util");
|
|
22
|
+
const config_1 = require("./config");
|
|
23
23
|
const uploadRemoteWithConfig = (config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
24
|
let spinner;
|
|
25
25
|
const { ip, user, loginType, password, privateKey, from, to, cmd, cwd } = config;
|
|
@@ -84,8 +84,10 @@ const uploadRemoteWithConfig = (config) => __awaiter(void 0, void 0, void 0, fun
|
|
|
84
84
|
cwd: cwd ? cwd : to,
|
|
85
85
|
});
|
|
86
86
|
result.stdout && console.log('STDOUT: ' + result.stdout);
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
result.stderr && console.log('STDERR: ' + result.stderr);
|
|
88
|
+
if (result.code) {
|
|
89
|
+
console.error((0, shared_1.red)('Command failed with exit code: ' + result.code));
|
|
90
|
+
throw new Error(`Command failed: ${cmd}`);
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infinity-cli/ipublish",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"description": "上传服务器文件",
|
|
6
6
|
"main": "dist/lib/index.js",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"ora": "5",
|
|
36
36
|
"rimraf": "^3.0.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "2ad725ed52157bbde698356b225eb71d1dfabd7a"
|
|
39
39
|
}
|