remote-deploy-cli 1.3.3 → 1.3.4
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/lib/client/index.js +17 -17
- package/package.json +1 -1
package/lib/client/index.js
CHANGED
|
@@ -16,25 +16,25 @@ export const deploy = async (type, serverUrl, secret) => {
|
|
|
16
16
|
if (result.output.stdout) console.log(result.output.stdout);
|
|
17
17
|
if (result.output.stderr) console.log(result.output.stderr);
|
|
18
18
|
logger.log('---------------------');
|
|
19
|
-
} else
|
|
20
|
-
logger.
|
|
19
|
+
} else {
|
|
20
|
+
logger.error('Server reported failure.');
|
|
21
|
+
console.error(result);
|
|
22
|
+
}
|
|
23
|
+
} catch (err) {
|
|
24
|
+
throw err;
|
|
25
|
+
}
|
|
26
|
+
} else if (type === 'custom') {
|
|
27
|
+
logger.info('Sending custom deployment instruction to server machine...');
|
|
21
28
|
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
try {
|
|
30
|
+
const result = await sendCommand(serverUrl, '/deploy/custom', secret, {});
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} else {
|
|
32
|
-
logger.error('Server reported failure.');
|
|
33
|
-
console.error(result);
|
|
34
|
-
}
|
|
35
|
-
} catch (err) {
|
|
36
|
-
throw err;
|
|
37
|
-
}
|
|
32
|
+
if (result.status === 'success') {
|
|
33
|
+
logger.success('Server successfully executed the custom deployment command.');
|
|
34
|
+
logger.log('--- Remote Output ---');
|
|
35
|
+
if (result.output.stdout) console.log(result.output.stdout);
|
|
36
|
+
if (result.output.stderr) console.log(result.output.stderr);
|
|
37
|
+
logger.log('---------------------');
|
|
38
38
|
} else {
|
|
39
39
|
logger.error('Server reported failure.');
|
|
40
40
|
console.error(result);
|