selfnify-host 1.0.1 → 1.0.2
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/host.js +4 -3
- package/package.json +1 -1
package/host.js
CHANGED
|
@@ -9,7 +9,7 @@ const https = require('https');
|
|
|
9
9
|
const crypto = require('crypto');
|
|
10
10
|
const readline = require('readline');
|
|
11
11
|
|
|
12
|
-
const VERSION = '1.0.
|
|
12
|
+
const VERSION = '1.0.2';
|
|
13
13
|
const DEFAULT_URL = 'https://host.lume.dpdns.org';
|
|
14
14
|
const CONFIG_DIR = path.join(os.homedir(), '.selfnify');
|
|
15
15
|
const CONFIG_FILE = path.join(CONFIG_DIR, 'host.json');
|
|
@@ -695,7 +695,7 @@ async function deploy(opts, flags) {
|
|
|
695
695
|
|
|
696
696
|
await next('Uploading', async ({ progress }) => {
|
|
697
697
|
if (bot.status === 'installing') throw new CliError('an install is already running for this bot, try again in a minute');
|
|
698
|
-
if (bot.status === 'running') {
|
|
698
|
+
if (bot.status === 'running' && lang !== 'rust') {
|
|
699
699
|
progress('stopping old version');
|
|
700
700
|
await request('POST', bp(name, '/stop'));
|
|
701
701
|
}
|
|
@@ -735,7 +735,8 @@ async function deploy(opts, flags) {
|
|
|
735
735
|
|
|
736
736
|
let finalLine = '';
|
|
737
737
|
await next('Starting', async () => {
|
|
738
|
-
|
|
738
|
+
const swap = bot.status === 'running' && lang === 'rust';
|
|
739
|
+
await request('POST', bp(name, swap ? '/restart' : '/start'));
|
|
739
740
|
await sleep(4000);
|
|
740
741
|
const now = await request('GET', bp(name));
|
|
741
742
|
if (now.status !== 'running') {
|